diff --git a/test/requestinterception.spec.js b/test/features/requestinterception.spec.js similarity index 99% rename from test/requestinterception.spec.js rename to test/features/requestinterception.spec.js index 0faaff9931..b342b90874 100644 --- a/test/requestinterception.spec.js +++ b/test/features/requestinterception.spec.js @@ -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 diff --git a/test/playwright.spec.js b/test/playwright.spec.js index 53cb1a0874..94e83a14fb 100644 --- a/test/playwright.spec.js +++ b/test/playwright.spec.js @@ -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); } });