mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
test: split out headful tests into headful.spec.js (#2657)
This commit is contained in:
13
test/test.js
13
test/test.js
@@ -35,7 +35,6 @@ const RESET_COLOR = '\x1b[0m';
|
||||
|
||||
const headless = (process.env.HEADLESS || 'true').trim().toLowerCase() === 'true';
|
||||
const executablePath = process.env.CHROME;
|
||||
const extensionPath = path.resolve(__dirname, '../test/assets/simple-extension');
|
||||
|
||||
if (executablePath)
|
||||
console.warn(`${YELLOW_COLOR}WARN: running tests with ${executablePath}${RESET_COLOR}`);
|
||||
@@ -50,15 +49,6 @@ const defaultBrowserOptions = {
|
||||
dumpio: (process.env.DUMPIO || 'false').trim().toLowerCase() === 'true',
|
||||
args: ['--no-sandbox']
|
||||
};
|
||||
const browserWithExtensionOptions = {
|
||||
headless: false,
|
||||
executablePath,
|
||||
args: [
|
||||
'--no-sandbox',
|
||||
`--disable-extensions-except=${extensionPath}`,
|
||||
`--load-extension=${extensionPath}`,
|
||||
],
|
||||
};
|
||||
|
||||
let parallel = 1;
|
||||
if (process.env.PPTR_PARALLEL_TESTS)
|
||||
@@ -153,12 +143,13 @@ describe('Page', function() {
|
||||
require('./jshandle.spec.js').addTests({testRunner, expect});
|
||||
require('./network.spec.js').addTests({testRunner, expect});
|
||||
require('./page.spec.js').addTests({testRunner, expect, puppeteer, DeviceDescriptors, headless});
|
||||
require('./target.spec.js').addTests({testRunner, expect, puppeteer, browserWithExtensionOptions});
|
||||
require('./target.spec.js').addTests({testRunner, expect, puppeteer});
|
||||
require('./tracing.spec.js').addTests({testRunner, expect});
|
||||
});
|
||||
|
||||
// Top-level tests that launch Browser themselves.
|
||||
require('./puppeteer.spec.js').addTests({testRunner, expect, PROJECT_ROOT, defaultBrowserOptions});
|
||||
require('./headful.spec.js').addTests({testRunner, expect, PROJECT_ROOT, defaultBrowserOptions});
|
||||
|
||||
if (process.env.COVERAGE) {
|
||||
describe('COVERAGE', function() {
|
||||
|
||||
Reference in New Issue
Block a user