Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
fix(ui mode): ignore repeatEach (#22505)
Dmitry Gozmanbf0fab492714
diff --git a/packages/playwright-test/src/runner/uiMode.ts b/packages/playwright-test/src/runner/uiMode.tsindex 3146b08cb1..1aa6b856a1 100644--- a/packages/playwright-test/src/runner/uiMode.ts+++ b/packages/playwright-test/src/runner/uiMode.ts@@ -47,8 +47,10 @@ class UIMode {for (const project of config.projects)project.deps = [];- for (const p of config.projects)+ for (const p of config.projects) {p.project.retries = 0;+ p.project.repeatEach = 1;+ }config.configCLIOverrides.use = config.configCLIOverrides.use || {};config.configCLIOverrides.use.trace = { mode: 'on', sources: false };diff --git a/tests/playwright-test/ui-mode-test-run.spec.ts b/tests/playwright-test/ui-mode-test-run.spec.tsindex 1982bd6e34..a86d8c6d01 100644--- a/tests/playwright-test/ui-mode-test-run.spec.ts+++ b/tests/playwright-test/ui-mode-test-run.spec.ts@@ -330,3 +330,32 @@ test('should show test.fail as passing', async ({ runUITest }) => {await expect(page.getByTestId('status-line')).toHaveText('1/1 passed (100%)');});++test('should ignore repeatEach', async ({ runUITest }) => {+ const { page } = await runUITest({+ 'playwright.config.ts': `+ import { defineConfig } from '@playwright/test';+ export default defineConfig({+ repeatEach: 3,+ });+ `,+ 'a.test.ts': `+ import { test, expect } from '@playwright/test';+ test('should pass', () => {+ expect(1).toBe(1);+ });+ `,+ });+ await expect.poll(dumpTestTree(page), { timeout: 15000 }).toContain(`+ ▼ ◯ a.test.ts+ `);++ await page.getByTitle('Run all').click();++ await expect.poll(dumpTestTree(page), { timeout: 15000 }).toBe(`+ ▼ ✅ a.test.ts+ ✅ should pass+ `);++ await expect(page.getByTestId('status-line')).toHaveText('1/1 passed (100%)');+});