test(ui-mode): make retries (#23136)

This commit is contained in:
Pavel Feldman 2023-05-18 11:28:28 -07:00 committed by GitHub
parent 3395a28181
commit 2501bbb715
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 27 additions and 20 deletions

View File

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

View File

@ -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({

View File

@ -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': `

View File

@ -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({

View File

@ -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();

View File

@ -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': `

View File

@ -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({

View File

@ -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': `

View File

@ -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': `

View File

@ -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': `

View File

@ -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({

View File

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