mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
test(firefox): further unify Puppeteer-Firefox and Puppeteer tests (#3894)
This patch: - changes Puppeteer-Firefox plumbing of defaultBrowserOptions to align with the way we do it for Puppeteer. - plumbs puppeeteer-dependent Errors and DeviceDescriptors down to every test. - unifies a few tests between Puppeteer-Firefox and Puppeteer. **Note:** in future, we should expose errors as `puppeteer.errors` and device descriptors as `puppeteer.devices` to make it easy to pass around Puppeteer/Puppeteer-Firefox instance. References #3889.
This commit is contained in:
@@ -22,7 +22,7 @@ const {Matchers} = require('../utils/testrunner/');
|
||||
const YELLOW_COLOR = '\x1b[33m';
|
||||
const RESET_COLOR = '\x1b[0m';
|
||||
|
||||
module.exports.addTests = ({testRunner, product, puppeteer, defaultBrowserOptions}) => {
|
||||
module.exports.addTests = ({testRunner, product, puppeteer, Errors, DeviceDescriptors, defaultBrowserOptions}) => {
|
||||
const {describe, xdescribe, fdescribe} = testRunner;
|
||||
const {it, fit, xit} = testRunner;
|
||||
const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;
|
||||
@@ -52,6 +52,8 @@ module.exports.addTests = ({testRunner, product, puppeteer, defaultBrowserOption
|
||||
FFOX,
|
||||
CHROME,
|
||||
puppeteer,
|
||||
Errors,
|
||||
DeviceDescriptors,
|
||||
expect,
|
||||
defaultBrowserOptions,
|
||||
headless: !!defaultBrowserOptions.headless,
|
||||
|
||||
Reference in New Issue
Block a user