File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+ import { test } from "fixtures" ;
2+ import { TEST_PROJECT } from "~client/_test/test.data.helper" ;
3+ import { mockGetProjects } from "utils/mocks" ;
4+
5+ // Run tests in this file with dark mode preferred
6+ test . use ( { colorScheme : "dark" } ) ;
7+
8+ const project = TEST_PROJECT ;
9+
10+ test . beforeEach ( async ( { page } ) => {
11+ await mockGetProjects ( page , [ project ] ) ;
12+ } ) ;
13+
14+ test ( "get dark screens" , async ( { page, vrt } ) => {
15+ await page . goto ( "/login" ) ;
16+ await vrt . trackPage ( page , "Login page - Dark mode" ) ;
17+
18+ await page . goto ( "/projects" ) ;
19+ await vrt . trackPage ( page , "Projects list page - Dark mode" ) ;
20+
21+ await page . goto ( "/profile" ) ;
22+ await vrt . trackPage ( page , "User profile page - Dark mode" ) ;
23+
24+ await page . goto ( "/register" ) ;
25+ await vrt . trackPage ( page , "Register page - Dark mode" ) ;
26+
27+ await page . goto ( "/users" ) ;
28+ await vrt . trackPage ( page , "User list page - Dark mode" ) ;
29+ } ) ;
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ export default defineConfig({
1717 actionTimeout : 5000 ,
1818 navigationTimeout : 5000 ,
1919 trace : "retry-with-trace" ,
20+ colorScheme : 'light' ,
2021 } ,
2122 retries : process . env . CI ? 1 : 0 ,
2223 forbidOnly : ! ! process . env . CI ,
You can’t perform that action at this time.
0 commit comments