test(ui-mode): make retries (#23136)
This commit is contained in:
parent
3395a28181
commit
2501bbb715
|
|
@ -128,6 +128,7 @@ import { expect as baseExpect } from './stable-test-runner';
|
||||||
|
|
||||||
// Slow tests are 90s.
|
// Slow tests are 90s.
|
||||||
export const expect = baseExpect.configure({ timeout: process.env.CI ? 75000 : 25000 });
|
export const expect = baseExpect.configure({ timeout: process.env.CI ? 75000 : 25000 });
|
||||||
|
export const retries = process.env.CI ? 3 : 0;
|
||||||
|
|
||||||
async function waitForLatch(latchFile: string) {
|
async function waitForLatch(latchFile: string) {
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,9 @@
|
||||||
* limitations under the License.
|
* 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 }) => {
|
test('should contain file attachment', async ({ runUITest }) => {
|
||||||
const { page } = await runUITest({
|
const { page } = await runUITest({
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,9 @@
|
||||||
* limitations under the License.
|
* 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 = {
|
const basicTestTree = {
|
||||||
'a.test.ts': `
|
'a.test.ts': `
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,9 @@
|
||||||
* limitations under the License.
|
* 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 }) => {
|
test('should print load errors', async ({ runUITest }) => {
|
||||||
const { page } = await runUITest({
|
const { page } = await runUITest({
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ManualPromise } from '../../packages/playwright-core/lib/utils/manualPromise';
|
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 }) => {
|
test('should update trace live', async ({ runUITest, server }) => {
|
||||||
const onePromise = new ManualPromise();
|
const onePromise = new ManualPromise();
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,9 @@
|
||||||
* limitations under the License.
|
* 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 = {
|
const basicTestTree = {
|
||||||
'a.test.ts': `
|
'a.test.ts': `
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,9 @@
|
||||||
* limitations under the License.
|
* 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 }) => {
|
test('should run global setup and teardown', async ({ runUITest }) => {
|
||||||
const { page, testProcess } = await runUITest({
|
const { page, testProcess } = await runUITest({
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,9 @@
|
||||||
* limitations under the License.
|
* 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 = {
|
const basicTestTree = {
|
||||||
'a.test.ts': `
|
'a.test.ts': `
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,9 @@
|
||||||
* limitations under the License.
|
* 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 = {
|
const basicTestTree = {
|
||||||
'a.test.ts': `
|
'a.test.ts': `
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,9 @@
|
||||||
* limitations under the License.
|
* 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 = {
|
const basicTestTree = {
|
||||||
'a.test.ts': `
|
'a.test.ts': `
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,9 @@
|
||||||
* limitations under the License.
|
* 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 }) => {
|
test('should watch files', async ({ runUITest, writeFiles }) => {
|
||||||
const { page } = await runUITest({
|
const { page } = await runUITest({
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { createImage } from './playwright-test-fixtures';
|
import { createImage } from './playwright-test-fixtures';
|
||||||
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 merge trace events', async ({ runUITest, server }) => {
|
test('should merge trace events', async ({ runUITest, server }) => {
|
||||||
test.fixme(true, 'https://github.com/microsoft/playwright/issues/23114');
|
test.fixme(true, 'https://github.com/microsoft/playwright/issues/23114');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue