mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
test(firefox): introduce vendor-specific specs (#3890)
Certain Puppeteer methods do expose the inner browser - e.g. `browser.version()` depends on the browser we run. Split out these tests into a vendor-specific test suites. References #3889
This commit is contained in:
@@ -28,6 +28,7 @@ module.exports.addTests = ({testRunner, product, puppeteer, defaultBrowserOption
|
||||
const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;
|
||||
|
||||
const CHROME = product === 'Chromium';
|
||||
const FFOX = product === 'Firefox';
|
||||
|
||||
if (defaultBrowserOptions.executablePath) {
|
||||
console.warn(`${YELLOW_COLOR}WARN: running ${product} tests with ${defaultBrowserOptions.executablePath}${RESET_COLOR}`);
|
||||
@@ -48,6 +49,8 @@ module.exports.addTests = ({testRunner, product, puppeteer, defaultBrowserOption
|
||||
const testOptions = {
|
||||
testRunner,
|
||||
product,
|
||||
FFOX,
|
||||
CHROME,
|
||||
puppeteer,
|
||||
expect,
|
||||
defaultBrowserOptions,
|
||||
@@ -121,6 +124,9 @@ module.exports.addTests = ({testRunner, product, puppeteer, defaultBrowserOption
|
||||
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