File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { parse } from 'devalue'
55import { reactive , ref , shallowReactive , shallowRef } from 'vue'
66import { createError } from 'h3'
77import { getBrowser , url , useTestContext } from '@nuxt/test-utils/e2e'
8+ import { isCI } from 'std-env'
89
910export const isRenderingJson = process . env . TEST_PAYLOAD !== 'js'
1011
@@ -71,8 +72,9 @@ export function expectNoErrorsOrWarnings (consoleLogs: Array<{ type: string, tex
7172 expect ( consoleLogWarnings ) . toEqual ( [ ] )
7273}
7374
75+ const BASE_TIMEOUT = isCI ? 6_000 : 3_000
7476export async function gotoPath ( page : Page , path : string , retries = 0 ) {
75- await vi . waitFor ( ( ) => page . goto ( url ( path ) , { timeout : 3000 } ) , { timeout : 3000 * retries || 3000 } )
77+ await vi . waitFor ( ( ) => page . goto ( url ( path ) , { timeout : BASE_TIMEOUT } ) , { timeout : BASE_TIMEOUT * retries || BASE_TIMEOUT } )
7678 await page . waitForFunction ( path => window . useNuxtApp ?.( ) . _route . fullPath === path && ! window . useNuxtApp ?.( ) . isHydrating , path )
7779}
7880
You can’t perform that action at this time.
0 commit comments