File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { test , expect } from "@playwright/test"
2
+ import { CODE_SERVER_ADDRESS , STORAGE } from "../utils/constants"
3
+ import { CodeServer } from "./models/CodeServer"
4
+
5
+ test . describe ( "Workbench" , ( ) => {
6
+ // Create a new context with the saved storage state
7
+ // so we don't have to logged in
8
+ const options : any = { }
9
+ let codeServer : CodeServer
10
+
11
+ // TODO@jsjoeio
12
+ // Fix this once https://github.com/microsoft/playwright-test/issues/240
13
+ // is fixed
14
+ if ( STORAGE ) {
15
+ const storageState = JSON . parse ( STORAGE ) || { }
16
+ options . contextOptions = {
17
+ storageState,
18
+ }
19
+ }
20
+
21
+ test . beforeEach ( async ( { page } ) => {
22
+ codeServer = new CodeServer ( page )
23
+ await codeServer . navigate ( )
24
+ } )
25
+
26
+ test ( "should open the default folder if not open" , options , async ( { page } ) => {
27
+ await codeServer . openFolder ( )
28
+
29
+ // find workspaceStorage in the Explorer menu, which would be open in the User folder
30
+ // which is the default folder that opens
31
+ expect ( await page . isVisible ( "text=workspaceStorage" ) ) . toBe ( true )
32
+ } )
33
+ } )
You can’t perform that action at this time.
0 commit comments