Skip to content

Commit 1c32fe5

Browse files
committed
increase actionTimeout
1 parent 5a25695 commit 1c32fe5

1 file changed

Lines changed: 10 additions & 11 deletions

File tree

vite.config.ts

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { tanstackRouter } from '@tanstack/router-plugin/vite';
22
import react from '@vitejs/plugin-react';
3-
import { playwright } from '@vitest/browser-playwright';
3+
import { playwright, type PlaywrightProviderOptions } from '@vitest/browser-playwright';
44
import { ecij } from 'ecij/plugin';
55
import { defineConfig, type ViteUserConfig } from 'vitest/config';
66
import type { BrowserCommand, BrowserInstanceOption } from 'vitest/node';
@@ -43,27 +43,26 @@ const viewport = { width: 1920, height: 1080 } as const;
4343

4444
// vitest modifies the instance objects, so we cannot rely on static objects
4545
function getInstances(): BrowserInstanceOption[] {
46+
const opts: PlaywrightProviderOptions = {
47+
actionTimeout: 2000,
48+
contextOptions: {
49+
viewport
50+
}
51+
};
52+
4653
return [
4754
{
4855
browser: 'chromium',
4956
provider: playwright({
50-
actionTimeout: 1000,
51-
contextOptions: {
52-
viewport
53-
},
57+
...opts,
5458
launchOptions: {
5559
channel: 'chromium'
5660
}
5761
})
5862
},
5963
{
6064
browser: 'firefox',
61-
provider: playwright({
62-
actionTimeout: 1000,
63-
contextOptions: {
64-
viewport
65-
}
66-
}),
65+
provider: playwright(opts),
6766
// TODO: remove when FF tests are stable
6867
fileParallelism: false
6968
}

0 commit comments

Comments
 (0)