Update tests/library/browsertype-connect.spec.ts

Signed-off-by: Max Schmitt <max@schmitt.mx>
This commit is contained in:
Max Schmitt 2024-10-30 15:08:45 +01:00
parent 0649e8d2ad
commit 664fcbfb29
2 changed files with 4 additions and 3 deletions

View file

@ -170,7 +170,7 @@ for (const kind of ['launchServer', 'run-server'] as const) {
}); });
test('should ignore page.pause when headed', async ({ connect, startRemoteServer, browserType, channel }) => { test('should ignore page.pause when headed', async ({ connect, startRemoteServer, browserType, channel }) => {
test.skip(channel === 'chromium-headless-shell', 'This test is only relevant in headed mode'); test.skip(channel === 'chromium-headless-shell', 'Headless Shell does not support headed mode');
const headless = (browserType as any)._defaultLaunchOptions.headless; const headless = (browserType as any)._defaultLaunchOptions.headless;
(browserType as any)._defaultLaunchOptions.headless = false; (browserType as any)._defaultLaunchOptions.headless = false;
const remoteServer = await startRemoteServer(kind); const remoteServer = await startRemoteServer(kind);

View file

@ -232,10 +232,11 @@ it('should click a button when it overlays oopif', async function({ page, browse
expect(await page.evaluate(() => (window as any)['BUTTON_CLICKED'])).toBe(true); expect(await page.evaluate(() => (window as any)['BUTTON_CLICKED'])).toBe(true);
}); });
it('should report google.com frame with headed', async ({ browserType, server }) => { it('should report google.com frame with headed', async ({ browserType, server, channel }) => {
it.skip(channel === 'chromium-headless-shell', 'Headless Shell does not support headed mode');
// @see https://github.com/GoogleChrome/puppeteer/issues/2548 // @see https://github.com/GoogleChrome/puppeteer/issues/2548
// https://google.com is isolated by default in Chromium embedder. // https://google.com is isolated by default in Chromium embedder.
const browser = await browserType.launch(); const browser = await browserType.launch({ headless: false });
const page = await browser.newPage(); const page = await browser.newPage();
await page.goto(server.EMPTY_PAGE); await page.goto(server.EMPTY_PAGE);
await page.route('**/*', route => { await page.route('**/*', route => {