@@ -36,7 +36,7 @@ module.exports = defineConfig({
3636 responseTimeout : 30000 ,
3737 execTimeout : 60000 ,
3838 taskTimeout : 60000 ,
39-
39+
4040 retries : {
4141 // Retry failed tests in CI/headless mode
4242 runMode : 1 ,
@@ -49,11 +49,11 @@ module.exports = defineConfig({
4949
5050 // Experiment features
5151 experimentalRunAllSpecs : true ,
52-
52+
5353 // Security and stability
5454 chromeWebSecurity : true ,
5555 modifyObstructiveCode : false ,
56-
56+
5757 // Reporter configuration (for CI/CD)
5858 reporter : 'spec' ,
5959 reporterOptions : {
@@ -64,13 +64,13 @@ module.exports = defineConfig({
6464 env : {
6565 // API base URL for backend requests
6666 apiUrl : 'http://localhost:3001' ,
67-
67+
6868 // Test timeout multiplier for slower environments
6969 slowTestThreshold : 10000 ,
70-
70+
7171 // Coverage collection
7272 coverage : false ,
73-
73+
7474 // Code coverage directory
7575 codeCoverage : {
7676 url : 'http://localhost:3001/__coverage__' ,
@@ -94,6 +94,26 @@ module.exports = defineConfig({
9494 console . log ( ` Duration: ${ results . stats . duration } ms` ) ;
9595 } ) ;
9696
97+ // Configure browser launch options
98+ on ( 'before:browser:launch' , ( browser = { } , launchOptions ) => {
99+ if ( browser . family === 'chromium' || browser . name === 'chrome' || browser . name === 'electron' ) {
100+ // Fix for "Automatic fallback to software WebGL has been deprecated" in CI
101+ // These flags suppress WebGL warnings in headless/CI environments
102+ launchOptions . args . push ( '--enable-unsafe-swiftshader' ) ;
103+ launchOptions . args . push ( '--disable-gpu' ) ;
104+ launchOptions . args . push ( '--disable-software-rasterizer' ) ;
105+ launchOptions . args . push ( '--disable-dev-shm-usage' ) ;
106+
107+ // Only log in CI to avoid noise in local development
108+ if ( process . env . CI ) {
109+ console . log ( `Injecting Chrome flags for ${ browser . name } :` , launchOptions . args . filter ( arg =>
110+ arg . includes ( 'gpu' ) || arg . includes ( 'swiftshader' ) || arg . includes ( 'rasterizer' )
111+ ) ) ;
112+ }
113+ }
114+ return launchOptions ;
115+ } ) ;
116+
97117 // Task for custom logging
98118 on ( 'task' , {
99119 log ( message ) {
0 commit comments