fix(ui mode): ignore repeatEach (#22505)

Fixes #22498.
This commit is contained in:
Dmitry Gozman 2023-04-19 14:16:12 -07:00 committed by GitHub
parent 320b9d5dbb
commit bf0fab4927
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 1 deletions

View File

@ -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 };

View File

@ -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%)');
});