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:
Andrey Lushnikov
2019-02-01 17:55:12 -08:00
committed by GitHub
parent 84fe6014e9
commit 6bb0350b4d
5 changed files with 89 additions and 18 deletions

View File

@@ -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);
}
});