mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-14 21:53:35 +03:00
chore: group more feature test files
This commit is contained in:
parent
9249ccbc77
commit
51c975b098
@ -16,7 +16,7 @@
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const utils = require('./utils');
|
||||
const utils = require('../utils');
|
||||
|
||||
module.exports.addTests = function({testRunner, expect, FFOX, CHROME, WEBKIT}) {
|
||||
const {describe, xdescribe, fdescribe} = testRunner;
|
||||
@ -405,7 +405,7 @@ module.exports.addTests = function({testRunner, expect, FFOX, CHROME, WEBKIT}) {
|
||||
urls.add(request.url().split('/').pop());
|
||||
page.interception.continue(request);
|
||||
});
|
||||
await page.goto(pathToFileURL(path.join(__dirname, 'assets', 'one-style.html')));
|
||||
await page.goto(pathToFileURL(path.join(__dirname, '..', 'assets', 'one-style.html')));
|
||||
expect(urls.size).toBe(2);
|
||||
expect(urls.has('one-style.html')).toBe(true);
|
||||
expect(urls.has('one-style.css')).toBe(true);
|
||||
@ -536,7 +536,7 @@ module.exports.addTests = function({testRunner, expect, FFOX, CHROME, WEBKIT}) {
|
||||
it('should allow mocking binary responses', async({page, server}) => {
|
||||
await page.interception.enable();
|
||||
page.on('request', request => {
|
||||
const imageBuffer = fs.readFileSync(path.join(__dirname, 'assets', 'pptr.png'));
|
||||
const imageBuffer = fs.readFileSync(path.join(__dirname, '..', 'assets', 'pptr.png'));
|
||||
page.interception.fulfill(request, {
|
||||
contentType: 'image/png',
|
||||
body: imageBuffer
|
@ -150,9 +150,6 @@ module.exports.addTests = ({testRunner, product, playwrightPath}) => {
|
||||
require('./screenshot.spec.js').addTests(testOptions);
|
||||
require('./waittask.spec.js').addTests(testOptions);
|
||||
|
||||
require('./features/accessibility.spec.js').addTests(testOptions);
|
||||
require('./features/permissions.spec.js').addTests(testOptions);
|
||||
|
||||
if (CHROME) {
|
||||
require('./chromium/chromium.spec.js').addTests(testOptions);
|
||||
require('./chromium/coverage.spec.js').addTests(testOptions);
|
||||
@ -163,7 +160,9 @@ module.exports.addTests = ({testRunner, product, playwrightPath}) => {
|
||||
}
|
||||
|
||||
if (CHROME || FFOX) {
|
||||
require('./requestinterception.spec.js').addTests(testOptions);
|
||||
require('./features/accessibility.spec.js').addTests(testOptions);
|
||||
require('./features/permissions.spec.js').addTests(testOptions);
|
||||
require('./features/requestinterception.spec.js').addTests(testOptions);
|
||||
}
|
||||
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user