fix: use different test names for browser specific tests in launcher.spec.ts (#8250)

This commit is contained in:
Henrik Skupin 2022-04-20 11:16:42 +02:00 committed by Alex Rudenko
parent 9a9ec8f65b
commit c6cf1a9f27

View File

@ -404,7 +404,9 @@ describe('Launcher specs', function () {
await page.close(); await page.close();
await browser.close(); await browser.close();
}); });
itChromeOnly('should filter out ignored default arguments', async () => { itChromeOnly(
'should filter out ignored default arguments in Chrome',
async () => {
const { defaultBrowserOptions, puppeteer } = getTestState(); const { defaultBrowserOptions, puppeteer } = getTestState();
// Make sure we launch with `--enable-automation` by default. // Make sure we launch with `--enable-automation` by default.
const defaultArgs = puppeteer.defaultArgs(); const defaultArgs = puppeteer.defaultArgs();
@ -422,8 +424,11 @@ describe('Launcher specs', function () {
expect(spawnargs.indexOf(defaultArgs[1])).not.toBe(-1); expect(spawnargs.indexOf(defaultArgs[1])).not.toBe(-1);
expect(spawnargs.indexOf(defaultArgs[2])).toBe(-1); expect(spawnargs.indexOf(defaultArgs[2])).toBe(-1);
await browser.close(); await browser.close();
}); }
itFirefoxOnly('should filter out ignored default arguments', async () => { );
itFirefoxOnly(
'should filter out ignored default argument in Firefox',
async () => {
const { defaultBrowserOptions, puppeteer } = getTestState(); const { defaultBrowserOptions, puppeteer } = getTestState();
const defaultArgs = puppeteer.defaultArgs(); const defaultArgs = puppeteer.defaultArgs();
@ -440,8 +445,8 @@ describe('Launcher specs', function () {
expect(spawnargs.indexOf(defaultArgs[0])).toBe(-1); expect(spawnargs.indexOf(defaultArgs[0])).toBe(-1);
expect(spawnargs.indexOf(defaultArgs[1])).not.toBe(-1); expect(spawnargs.indexOf(defaultArgs[1])).not.toBe(-1);
await browser.close(); await browser.close();
}); }
);
it('should have default URL when launching browser', async function () { it('should have default URL when launching browser', async function () {
const { defaultBrowserOptions, puppeteer } = getTestState(); const { defaultBrowserOptions, puppeteer } = getTestState();
const browser = await puppeteer.launch(defaultBrowserOptions); const browser = await puppeteer.launch(defaultBrowserOptions);