File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ run_unit_tests:
1919run_cypress_tests :
2020 image : cypress/browsers:22.19.0
2121 stage : test
22+ variables :
23+ VITE_SKIP_AUTH : " true"
2224 rules :
2325 - if : ' $CI_COMMIT_REF_NAME == "staging"'
2426 changes :
Original file line number Diff line number Diff line change @@ -20,10 +20,13 @@ function renderApp(auth) {
2020} ;
2121
2222// In development, if VITE_DEV_TOKEN is set in .env.local, use it directly.
23+ // Set VITE_SKIP_AUTH=true to render the app without authentication (for CI/e2e tests).
2324// Otherwise fall through to the normal Keycloak login flow.
2425// See .env.local.example for setup instructions.
2526if ( import . meta. env . DEV && import . meta. env . VITE_DEV_TOKEN ) {
2627 window . addEventListener ( "DOMContentLoaded" , ( ) => renderApp ( { token : import . meta. env . VITE_DEV_TOKEN , authenticated : true } ) ) ;
28+ } else if ( import . meta. env . DEV && import . meta. env . VITE_SKIP_AUTH ) {
29+ window . addEventListener ( "DOMContentLoaded" , ( ) => renderApp ( { authenticated : false } ) ) ;
2730} else {
2831 window . addEventListener ( 'DOMContentLoaded' , ( ) => initAuth ( renderApp ) ) ;
2932}
You can’t perform that action at this time.
0 commit comments