File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 1+ /// <reference types="jest-playwright-preset" />
2+ import { CODE_SERVER_ADDRESS , STORAGE } from "../utils/constants"
3+
4+ // This test is to make sure the globalSetup works as expected
5+ // meaning globalSetup ran and stored the storageState in STORAGE
6+ describe ( "globalSetup" , ( ) => {
7+ beforeEach ( async ( ) => {
8+ // Create a new context with the saved storage state
9+ const storageState = JSON . parse ( STORAGE ) || { }
10+ console . log ( "what is storage " , storageState )
11+ await jestPlaywright . resetContext ( { storageState } )
12+ await page . goto ( CODE_SERVER_ADDRESS )
13+ // code-server takes a second to load
14+ await page . waitForTimeout ( 1000 )
15+ } )
16+
17+ it ( "should keep us logged in if we don't reset the browser" , async ( ) => {
18+ // See the editor
19+ const codeServerEditor = await page . isVisible ( ".monaco-workbench" )
20+ expect ( codeServerEditor ) . toBeTruthy ( )
21+ } )
22+ } )
You can’t perform that action at this time.
0 commit comments