File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { tanstackRouter } from '@tanstack/router-plugin/vite' ;
22import react from '@vitejs/plugin-react' ;
3- import { playwright } from '@vitest/browser-playwright' ;
3+ import { playwright , type PlaywrightProviderOptions } from '@vitest/browser-playwright' ;
44import { ecij } from 'ecij/plugin' ;
55import { defineConfig , type ViteUserConfig } from 'vitest/config' ;
66import 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
4545function 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 }
You can’t perform that action at this time.
0 commit comments