chore: only test request interception for Chrome & FF
This commit is contained in:
parent
1377be2b27
commit
5274f2bd3c
|
|
@ -147,7 +147,6 @@ module.exports.addTests = ({testRunner, product, playwrightPath}) => {
|
||||||
require('./network.spec.js').addTests(testOptions);
|
require('./network.spec.js').addTests(testOptions);
|
||||||
require('./page.spec.js').addTests(testOptions);
|
require('./page.spec.js').addTests(testOptions);
|
||||||
require('./queryselector.spec.js').addTests(testOptions);
|
require('./queryselector.spec.js').addTests(testOptions);
|
||||||
require('./requestinterception.spec.js').addTests(testOptions);
|
|
||||||
require('./screenshot.spec.js').addTests(testOptions);
|
require('./screenshot.spec.js').addTests(testOptions);
|
||||||
require('./waittask.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/session.spec.js').addTests(testOptions);
|
||||||
require('./chromium/workers.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.
|
// Browser-level tests that are given a browser.
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ module.exports.addTests = function({testRunner, expect, FFOX, CHROME, WEBKIT}) {
|
||||||
const {it, fit, xit} = testRunner;
|
const {it, fit, xit} = testRunner;
|
||||||
const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;
|
const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;
|
||||||
|
|
||||||
describe.skip(WEBKIT)('Interception.enable', function() {
|
describe('Interception.enable', function() {
|
||||||
it('should intercept', async({page, server}) => {
|
it('should intercept', async({page, server}) => {
|
||||||
await page.interception.enable();
|
await page.interception.enable();
|
||||||
page.on('request', request => {
|
page.on('request', request => {
|
||||||
|
|
@ -275,7 +275,7 @@ module.exports.addTests = function({testRunner, expect, FFOX, CHROME, WEBKIT}) {
|
||||||
return e.message;
|
return e.message;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (CHROME || WEBKIT)
|
if (CHROME)
|
||||||
expect(result).toContain('Failed to fetch');
|
expect(result).toContain('Failed to fetch');
|
||||||
else
|
else
|
||||||
expect(result).toContain('NetworkError');
|
expect(result).toContain('NetworkError');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue