Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ function rewriteError(error: Error): Protocol.Runtime.evaluateReturnValue {
throw new Error('Cannot serialize result: object reference chain is too long.');
if (error.message.includes('Object couldn\'t be returned by value'))
return { result: { type: 'undefined' } };
if (error.message.includes('Promise was collected'))
throw new Error('Resulting promise was garbage collected.');

if (error instanceof TypeError && error.message.startsWith('Converting circular structure to JSON'))
rewriteErrorMessage(error, error.message + ' Are you passing a nested JSHandle?');
Expand Down
2 changes: 0 additions & 2 deletions tests/library/defaultbrowsercontext-2.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import fs from 'fs';
import path from 'path';

it.skip(({ mode }) => mode !== 'default', 'Remote persistent contexts are not supported');
it.slow(({ browserName, isMac }) => browserName === 'firefox' && isMac && process.arch === 'x64', 'Persistent Firefox launches are slow on Intel macOS runners under load.');

it('should support hasTouch option', async ({ server, launchPersistent }) => {
const { page } = await launchPersistent({ hasTouch: true });
Expand Down Expand Up @@ -148,7 +147,6 @@ it('should goto about:blank on relaunched persistent context', {
annotation: { type: 'issue', description: 'https://github.com/microsoft/playwright/issues/41216' },
}, async ({ browserType, createUserDataDir, browserName, isBidi }) => {
it.fixme(browserName === 'firefox' && !isBidi);
it.slow();

const userDataDir = await createUserDataDir();

Expand Down
2 changes: 1 addition & 1 deletion tests/library/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const config: Config<PlaywrightWorkerOptions & PlaywrightTestOptions & TestModeW
timeout: 10000,
},
maxFailures: 200,
timeout: video ? 60000 : 30000,
timeout: video || (process.platform === 'darwin' && process.arch === 'x64') ? 60000 : 30000,
globalTimeout: 7200000,
workers: undefined,
fullyParallel: !process.env.CI,
Expand Down
1 change: 0 additions & 1 deletion tests/library/screencast.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ test('start should finish when page is closed', async ({ browser }, testInfo) =>
});

test('empty video', async ({ browser }, testInfo) => {
test.slow();
const size = { width: 800, height: 800 };
const context = await browser.newContext({ viewport: size });
const page = await context.newPage();
Expand Down
2 changes: 0 additions & 2 deletions tests/mcp/annotate.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ test('user-initiated annotate downloads zip with feedback.md', async ({ connectT
});

test('should capture annotations via show --annotate', async ({ connectToDashboard, cli, server }) => {
test.slow();
await cli('open', server.EMPTY_PAGE);
const bindTitle = `--playwright-internal--${crypto.randomUUID()}`;
await cli('show', { bindTitle });
Expand Down Expand Up @@ -495,7 +494,6 @@ test('should switch screencast to -s session on show --annotate', async ({ conne
});

test('should disengage annotate mode when --annotate client disconnects', async ({ connectToDashboard, cli, childProcess, cliEnv, mcpBrowser, mcpHeadless, server }) => {
test.slow();
await cli('open', server.EMPTY_PAGE);
const bindTitle = `--playwright-internal--${crypto.randomUUID()}`;
await cli('show', { bindTitle });
Expand Down
1 change: 0 additions & 1 deletion tests/mcp/test-run.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ Running 2 tests using 1 worker
});

test('test_run should stop when aborted', async ({ startClient }) => {
test.slow(true, 'Drives two full test-runner lifecycles (abort + restart)');
await writeFiles({
'slow.test.ts': `
import { test } from '@playwright/test';
Expand Down
10 changes: 10 additions & 0 deletions tests/page/page-evaluate.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -889,3 +889,13 @@ it('should ignore dangerous object keys', async ({ page }) => {
const result = await page.evaluate(arg => arg, input);
expect(result).toEqual({ safeKey: 'safeValue' });
});

it('promise collected', async ({ page, browserName }) => {
it.skip(browserName !== 'chromium', 'this is a chromium-only behavior');

const resultPromise = page.evaluate(() => new Promise<void>(() => {})).catch(e => e);
for (let i = 0; i < 20; i++)
await page.requestGC();
const error = await resultPromise;
expect(error.message).toContain('Resulting promise was garbage collected');
});
Loading