diff --git a/test/browsertype-basic.spec.ts b/test/browsertype-basic.spec.ts index 099c10c4eb..1d16181b83 100644 --- a/test/browsertype-basic.spec.ts +++ b/test/browsertype-basic.spec.ts @@ -35,3 +35,9 @@ it('browserType.name should work', async ({browserType, isChromium, isFirefox, i else throw new Error('Unknown browser'); }); +it('should throw when trying to connect with not-chromium', (test, {browserName}) => { + test.skip(browserName === 'chromium'); +}, async ({browserType }) => { + const error = await browserType.connectOverCDP({wsEndpoint: 'foo'}).catch(e => e); + expect(error.message).toBe('Connecting over CDP is only supported in Chromium.'); +}); diff --git a/test/chromium/chromium.spec.ts b/test/chromium/chromium.spec.ts index 55e0f0240d..6a98a915de 100644 --- a/test/chromium/chromium.spec.ts +++ b/test/chromium/chromium.spec.ts @@ -91,7 +91,7 @@ describe('chromium', (suite, { browserName }) => { expect(serverRequest.headers.intervention).toContain('feature/5718547946799104'); }); - it('should connect to an existing cdp session 2', (test, {headful}) => { + it('should connect to an existing cdp session', (test, {headful}) => { test.skip(headful, 'Chromium currently doesn\'t support --remote-debugging-port and --remote-debugging-pipe at the same time.'); }, async ({browserType, testWorkerIndex, browserOptions, createUserDataDir }) => { const port = 9339 + testWorkerIndex;