adjust expecations
This commit is contained in:
parent
f806c73806
commit
0649e8d2ad
|
|
@ -163,6 +163,7 @@ export async function openTraceViewerApp(url: string, browserName: string, optio
|
||||||
...options?.persistentContextOptions,
|
...options?.persistentContextOptions,
|
||||||
useWebSocket: isUnderTest(),
|
useWebSocket: isUnderTest(),
|
||||||
headless: !!options?.headless,
|
headless: !!options?.headless,
|
||||||
|
colorScheme: isUnderTest() ? 'light' : undefined,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ import net from 'net';
|
||||||
import type { SocksSocketClosedPayload, SocksSocketDataPayload, SocksSocketRequestedPayload } from '../../packages/playwright-core/src/common/socksProxy';
|
import type { SocksSocketClosedPayload, SocksSocketDataPayload, SocksSocketRequestedPayload } from '../../packages/playwright-core/src/common/socksProxy';
|
||||||
import { SocksProxy } from '../../packages/playwright-core/lib/common/socksProxy';
|
import { SocksProxy } from '../../packages/playwright-core/lib/common/socksProxy';
|
||||||
|
|
||||||
|
// Certain browsers perform telemetry requests which we want to ignore.
|
||||||
const kConnectHostsToIgnore = new Set([
|
const kConnectHostsToIgnore = new Set([
|
||||||
'www.bing.com:443',
|
'www.bing.com:443',
|
||||||
]);
|
]);
|
||||||
|
|
|
||||||
|
|
@ -169,9 +169,9 @@ for (const kind of ['launchServer', 'run-server'] as const) {
|
||||||
await browser.close();
|
await browser.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should ignore page.pause when headed', async ({ connect, startRemoteServer, browserType, headless }) => {
|
test('should ignore page.pause when headed', async ({ connect, startRemoteServer, browserType, channel }) => {
|
||||||
test.skip(headless, 'This test is only relevant in headed mode');
|
test.skip(channel === 'chromium-headless-shell', 'This test is only relevant in headed mode');
|
||||||
const originalHeadlessValue = (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);
|
||||||
const browser = await connect(remoteServer.wsEndpoint());
|
const browser = await connect(remoteServer.wsEndpoint());
|
||||||
|
|
@ -179,7 +179,7 @@ for (const kind of ['launchServer', 'run-server'] as const) {
|
||||||
const page = await browserContext.newPage();
|
const page = await browserContext.newPage();
|
||||||
await page.pause();
|
await page.pause();
|
||||||
await browser.close();
|
await browser.close();
|
||||||
(browserType as any)._defaultLaunchOptions.headless = originalHeadlessValue;
|
(browserType as any)._defaultLaunchOptions.headless = headless;
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should be able to visit ipv6 through localhost', async ({ connect, startRemoteServer, ipV6ServerPort }) => {
|
test('should be able to visit ipv6 through localhost', async ({ connect, startRemoteServer, ipV6ServerPort }) => {
|
||||||
|
|
|
||||||
|
|
@ -262,7 +262,7 @@ it('should work with the domain module', async ({ browserType, server, browserNa
|
||||||
if (browserName === 'firefox')
|
if (browserName === 'firefox')
|
||||||
expect(message).toBe('CLOSE_ABNORMAL');
|
expect(message).toBe('CLOSE_ABNORMAL');
|
||||||
else
|
else
|
||||||
expect(message).toContain(channel.includes('msedge') ? '' : ': 400');
|
expect(message).toContain(channel?.includes('msedge') ? '' : ': 400');
|
||||||
|
|
||||||
await browser.close();
|
await browser.close();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,7 @@ it('should emit error', async ({ page, server, browserName, channel }) => {
|
||||||
if (browserName === 'firefox')
|
if (browserName === 'firefox')
|
||||||
expect(message).toBe('CLOSE_ABNORMAL');
|
expect(message).toBe('CLOSE_ABNORMAL');
|
||||||
else
|
else
|
||||||
expect(message).toContain(channel.includes('msedge') ? '' : ': 400');
|
expect(message).toContain(channel?.includes('msedge') ? '' : ': 400');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should not have stray error events', async ({ page, server }) => {
|
it('should not have stray error events', async ({ page, server }) => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue