mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
chore(firefox): mark all Puppeteer tests that are failing on FF (#3924)
This patch: - introduces new testRunner methods `addTestDSL` and `addSuiteDSL` to add annotated test / suite. - introduces new test/suite declaration methods: `it_fails_ffox` and `describe_fails_ffox`. These are equal to `it`/`describe` for chromium tests and to `xit`/`xdescribe` for firefox. - marks all unsupported tests with `it_fails_ffox` - adds a new command-line flag `'--firefox-status'` to `//test/test.js`. This flag dumps current amount of tests that are intentionally skipped for Firefox. End goal: get rid of all `it_fails_ffox` and `describe_fails_ffox` tests. Drive-By: remove cookie tests "afterEach" hook that was removing cookies - it's not needed any more since every test is run in a designated browser context. References #3889
This commit is contained in:
@@ -23,8 +23,8 @@ const YELLOW_COLOR = '\x1b[33m';
|
||||
const RESET_COLOR = '\x1b[0m';
|
||||
|
||||
module.exports.addTests = ({testRunner, product, puppeteer, Errors, DeviceDescriptors}) => {
|
||||
const {describe, xdescribe, fdescribe} = testRunner;
|
||||
const {it, fit, xit} = testRunner;
|
||||
const {describe, xdescribe, fdescribe, describe_fails_ffox} = testRunner;
|
||||
const {it, fit, xit, it_fails_ffox} = testRunner;
|
||||
const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;
|
||||
|
||||
const CHROME = product === 'Chromium';
|
||||
@@ -117,8 +117,10 @@ module.exports.addTests = ({testRunner, product, puppeteer, Errors, DeviceDescri
|
||||
|
||||
// Page-level tests that are given a browser, a context and a page.
|
||||
// Each test is launched in a new browser context.
|
||||
require('./accessibility.spec.js').addTests(testOptions);
|
||||
require('./browser.spec.js').addTests(testOptions);
|
||||
require('./click.spec.js').addTests(testOptions);
|
||||
require('./cookies.spec.js').addTests(testOptions);
|
||||
require('./dialog.spec.js').addTests(testOptions);
|
||||
require('./elementhandle.spec.js').addTests(testOptions);
|
||||
require('./emulation.spec.js').addTests(testOptions);
|
||||
@@ -129,19 +131,17 @@ module.exports.addTests = ({testRunner, product, puppeteer, Errors, DeviceDescri
|
||||
require('./keyboard.spec.js').addTests(testOptions);
|
||||
require('./mouse.spec.js').addTests(testOptions);
|
||||
require('./navigation.spec.js').addTests(testOptions);
|
||||
require('./network.spec.js').addTests(testOptions);
|
||||
require('./page.spec.js').addTests(testOptions);
|
||||
require('./screenshot.spec.js').addTests(testOptions);
|
||||
require('./queryselector.spec.js').addTests(testOptions);
|
||||
require('./target.spec.js').addTests(testOptions);
|
||||
require('./touchscreen.spec.js').addTests(testOptions);
|
||||
require('./waittask.spec.js').addTests(testOptions);
|
||||
require('./worker.spec.js').addTests(testOptions);
|
||||
if (CHROME) {
|
||||
require('./CDPSession.spec.js').addTests(testOptions);
|
||||
require('./accessibility.spec.js').addTests(testOptions);
|
||||
require('./cookies.spec.js').addTests(testOptions);
|
||||
require('./coverage.spec.js').addTests(testOptions);
|
||||
require('./network.spec.js').addTests(testOptions);
|
||||
require('./worker.spec.js').addTests(testOptions);
|
||||
require('./chromiumonly.spec.js').addTests(testOptions);
|
||||
} else {
|
||||
require('./firefoxonly.spec.js').addTests(testOptions);
|
||||
|
||||
Reference in New Issue
Block a user