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
test(ui-mode): make retries (#23136)
Pavel Feldman2501bbb71589
diff --git a/tests/playwright-test/ui-mode-fixtures.ts b/tests/playwright-test/ui-mode-fixtures.tsindex 0bd52a997b..7b9fdf55a0 100644--- a/tests/playwright-test/ui-mode-fixtures.ts+++ b/tests/playwright-test/ui-mode-fixtures.ts@@ -128,6 +128,7 @@ import { expect as baseExpect } from './stable-test-runner';// Slow tests are 90s.export const expect = baseExpect.configure({ timeout: process.env.CI ? 75000 : 25000 });+export const retries = process.env.CI ? 3 : 0;async function waitForLatch(latchFile: string) {const fs = require('fs');diff --git a/tests/playwright-test/ui-mode-test-attachments.spec.ts b/tests/playwright-test/ui-mode-test-attachments.spec.tsindex b6cceb0d5f..59aefdb70b 100644--- a/tests/playwright-test/ui-mode-test-attachments.spec.ts+++ b/tests/playwright-test/ui-mode-test-attachments.spec.ts@@ -14,7 +14,9 @@* limitations under the License.*/-import { test, expect } from './ui-mode-fixtures';+import { test, expect, retries } from './ui-mode-fixtures';++test.describe.configure({ mode: 'parallel', retries });test('should contain file attachment', async ({ runUITest }) => {const { page } = await runUITest({diff --git a/tests/playwright-test/ui-mode-test-filters.spec.ts b/tests/playwright-test/ui-mode-test-filters.spec.tsindex 24476eadf7..3e21392b66 100644--- a/tests/playwright-test/ui-mode-test-filters.spec.ts+++ b/tests/playwright-test/ui-mode-test-filters.spec.ts@@ -14,9 +14,9 @@* limitations under the License.*/-import { test, expect, dumpTestTree } from './ui-mode-fixtures';+import { test, expect, retries, dumpTestTree } from './ui-mode-fixtures';-test.describe.configure({ mode: 'parallel' });+test.describe.configure({ mode: 'parallel', retries });const basicTestTree = {'a.test.ts': `diff --git a/tests/playwright-test/ui-mode-test-output.spec.ts b/tests/playwright-test/ui-mode-test-output.spec.tsindex 31d0fe3b3c..f9d414f883 100644--- a/tests/playwright-test/ui-mode-test-output.spec.ts+++ b/tests/playwright-test/ui-mode-test-output.spec.ts@@ -14,9 +14,9 @@* limitations under the License.*/-import { test, expect } from './ui-mode-fixtures';+import { test, expect, retries } from './ui-mode-fixtures';-test.describe.configure({ mode: 'parallel' });+test.describe.configure({ mode: 'parallel', retries });test('should print load errors', async ({ runUITest }) => {const { page } = await runUITest({diff --git a/tests/playwright-test/ui-mode-test-progress.spec.ts b/tests/playwright-test/ui-mode-test-progress.spec.tsindex 0197d89798..01c91bf476 100644--- a/tests/playwright-test/ui-mode-test-progress.spec.ts+++ b/tests/playwright-test/ui-mode-test-progress.spec.ts@@ -15,7 +15,9 @@*/import { ManualPromise } from '../../packages/playwright-core/lib/utils/manualPromise';-import { test, expect, dumpTestTree } from './ui-mode-fixtures';+import { test, expect, retries, dumpTestTree } from './ui-mode-fixtures';++test.describe.configure({ mode: 'parallel', retries });test('should update trace live', async ({ runUITest, server }) => {const onePromise = new ManualPromise();diff --git a/tests/playwright-test/ui-mode-test-run.spec.ts b/tests/playwright-test/ui-mode-test-run.spec.tsindex 286fada894..b52283bce8 100644--- a/tests/playwright-test/ui-mode-test-run.spec.ts+++ b/tests/playwright-test/ui-mode-test-run.spec.ts@@ -14,8 +14,9 @@* limitations under the License.*/-import { test, expect, dumpTestTree } from './ui-mode-fixtures';-test.describe.configure({ mode: 'parallel' });+import { test, expect, retries, dumpTestTree } from './ui-mode-fixtures';++test.describe.configure({ mode: 'parallel', retries });const basicTestTree = {'a.test.ts': `diff --git a/tests/playwright-test/ui-mode-test-setup.spec.ts b/tests/playwright-test/ui-mode-test-setup.spec.tsindex f5025a9488..58f143f50f 100644--- a/tests/playwright-test/ui-mode-test-setup.spec.ts+++ b/tests/playwright-test/ui-mode-test-setup.spec.ts@@ -14,9 +14,9 @@* limitations under the License.*/-import { test, expect } from './ui-mode-fixtures';+import { test, expect, retries } from './ui-mode-fixtures';-test.describe.configure({ mode: 'parallel' });+test.describe.configure({ mode: 'parallel', retries });test('should run global setup and teardown', async ({ runUITest }) => {const { page, testProcess } = await runUITest({diff --git a/tests/playwright-test/ui-mode-test-source.spec.ts b/tests/playwright-test/ui-mode-test-source.spec.tsindex 3f1373a205..8e7a35f5db 100644--- a/tests/playwright-test/ui-mode-test-source.spec.ts+++ b/tests/playwright-test/ui-mode-test-source.spec.ts@@ -14,9 +14,9 @@* limitations under the License.*/-import { test, expect, dumpTestTree } from './ui-mode-fixtures';+import { test, expect, retries, dumpTestTree } from './ui-mode-fixtures';-test.describe.configure({ mode: 'parallel' });+test.describe.configure({ mode: 'parallel', retries });const basicTestTree = {'a.test.ts': `diff --git a/tests/playwright-test/ui-mode-test-tree.spec.ts b/tests/playwright-test/ui-mode-test-tree.spec.tsindex 56256bad4a..986dac7337 100644--- a/tests/playwright-test/ui-mode-test-tree.spec.ts+++ b/tests/playwright-test/ui-mode-test-tree.spec.ts@@ -14,9 +14,9 @@* limitations under the License.*/-import { test, expect, dumpTestTree } from './ui-mode-fixtures';+import { test, expect, retries, dumpTestTree } from './ui-mode-fixtures';-test.describe.configure({ mode: 'parallel' });+test.describe.configure({ mode: 'parallel', retries });const basicTestTree = {'a.test.ts': `diff --git a/tests/playwright-test/ui-mode-test-update.spec.ts b/tests/playwright-test/ui-mode-test-update.spec.tsindex 77f520aef8..67102b55c0 100644--- a/tests/playwright-test/ui-mode-test-update.spec.ts+++ b/tests/playwright-test/ui-mode-test-update.spec.ts@@ -14,9 +14,9 @@* limitations under the License.*/-import { test, expect, dumpTestTree } from './ui-mode-fixtures';+import { test, expect, retries, dumpTestTree } from './ui-mode-fixtures';-test.describe.configure({ mode: 'parallel' });+test.describe.configure({ mode: 'parallel', retries });const basicTestTree = {'a.test.ts': `diff --git a/tests/playwright-test/ui-mode-test-watch.spec.ts b/tests/playwright-test/ui-mode-test-watch.spec.tsindex cca01d0b6d..4dae1f3355 100644--- a/tests/playwright-test/ui-mode-test-watch.spec.ts+++ b/tests/playwright-test/ui-mode-test-watch.spec.ts@@ -14,9 +14,9 @@* limitations under the License.*/-import { test, expect, dumpTestTree } from './ui-mode-fixtures';+import { test, expect, retries, dumpTestTree } from './ui-mode-fixtures';-test.describe.configure({ mode: 'parallel' });+test.describe.configure({ mode: 'parallel', retries });test('should watch files', async ({ runUITest, writeFiles }) => {const { page } = await runUITest({diff --git a/tests/playwright-test/ui-mode-trace.spec.ts b/tests/playwright-test/ui-mode-trace.spec.tsindex 9194e74add..e193b2ae5a 100644--- a/tests/playwright-test/ui-mode-trace.spec.ts+++ b/tests/playwright-test/ui-mode-trace.spec.ts@@ -15,8 +15,9 @@*/import { createImage } from './playwright-test-fixtures';-import { test, expect } from './ui-mode-fixtures';-test.describe.configure({ mode: 'parallel' });+import { test, expect, retries } from './ui-mode-fixtures';++test.describe.configure({ mode: 'parallel', retries });test('should merge trace events', async ({ runUITest, server }) => {test.fixme(true, 'https://github.com/microsoft/playwright/issues/23114');