Skip to content

Commit

Permalink
test: set timeout 1500 for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalets committed May 7, 2024
1 parent 25259a9 commit 9cfe73f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
5 changes: 2 additions & 3 deletions test/reporter-cucumber-html/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { defineConfig } from '@playwright/test';
import { defineBddConfig, cucumberReporter } from 'playwright-bdd';
import { testTimeout } from './timeout';

const testDir = defineBddConfig({
importTestFrom: 'features/fixtures.ts',
Expand All @@ -19,9 +20,7 @@ export default defineConfig({
use: {
screenshot: 'only-on-failure',
},
// don't reduce test timeout as it produces unreliable errors
// if define this timeout as @timeout tag, timeout in after fixture does not work
timeout: process.platform === 'win32' ? 3000 : 1500,
timeout: testTimeout,
expect: {
timeout: 1,
},
Expand Down
5 changes: 5 additions & 0 deletions test/reporter-cucumber-html/timeout.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// test timeout
// keep in separate file, b/c it is also used in test/reporter-cucumber-merge
// don't reduce test timeout as it produces unreliable errors
// if define this timeout as @timeout tag, timeout in after fixture does not work
export const testTimeout = process.platform === 'win32' ? 3000 : 1500;
4 changes: 2 additions & 2 deletions test/reporter-cucumber-merge/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { defineConfig } from '@playwright/test';
import { defineBddConfig, cucumberReporter } from 'playwright-bdd';
import { testTimeout } from '../reporter-cucumber-html/timeout';

const testDir = defineBddConfig({
importTestFrom: 'features/fixtures.ts',
Expand All @@ -22,8 +23,7 @@ export default defineConfig({
use: {
screenshot: 'only-on-failure',
},
// don't reduce test timeout as it produces unreliable errors
timeout: process.platform === 'win32' ? 3000 : 1500,
timeout: testTimeout,
expect: {
timeout: 1,
},
Expand Down

0 comments on commit 9cfe73f

Please sign in to comment.