chore: only test request interception for Chrome & FF

This commit is contained in:
Pavel 2019-12-06 17:37:45 -08:00
parent 1377be2b27
commit 5274f2bd3c
2 changed files with 7 additions and 3 deletions

View file

@ -147,7 +147,6 @@ module.exports.addTests = ({testRunner, product, playwrightPath}) => {
require('./network.spec.js').addTests(testOptions);
require('./page.spec.js').addTests(testOptions);
require('./queryselector.spec.js').addTests(testOptions);
require('./requestinterception.spec.js').addTests(testOptions);
require('./screenshot.spec.js').addTests(testOptions);
require('./waittask.spec.js').addTests(testOptions);
@ -162,6 +161,11 @@ module.exports.addTests = ({testRunner, product, playwrightPath}) => {
require('./chromium/session.spec.js').addTests(testOptions);
require('./chromium/workers.spec.js').addTests(testOptions);
}
if (CHROME || FFOX) {
require('./requestinterception.spec.js').addTests(testOptions);
}
});
// Browser-level tests that are given a browser.

View file

@ -23,7 +23,7 @@ module.exports.addTests = function({testRunner, expect, FFOX, CHROME, WEBKIT}) {
const {it, fit, xit} = testRunner;
const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;
describe.skip(WEBKIT)('Interception.enable', function() {
describe('Interception.enable', function() {
it('should intercept', async({page, server}) => {
await page.interception.enable();
page.on('request', request => {
@ -275,7 +275,7 @@ module.exports.addTests = function({testRunner, expect, FFOX, CHROME, WEBKIT}) {
return e.message;
}
});
if (CHROME || WEBKIT)
if (CHROME)
expect(result).toContain('Failed to fetch');
else
expect(result).toContain('NetworkError');