@@ -18,7 +18,7 @@ describe("Downloads (enabled)", ["--disable-workspace-trust"], {}, async () => {
1818 // Action
1919 await codeServerPage . openContextMenu ( "text=unique-file.txt" )
2020
21- expect ( await codeServerPage . page . isVisible ( "text=Download..." ) ) . toBe ( true )
21+ await expect ( codeServerPage . page . locator ( "text=Download..." ) ) . toBeVisible ( )
2222 } )
2323
2424 test ( "should see the 'Show Local' button on Save As" , async ( { codeServerPage } ) => {
@@ -37,7 +37,7 @@ describe("Downloads (enabled)", ["--disable-workspace-trust"], {}, async () => {
3737 await codeServerPage . page . keyboard . type ( "Making some edits." )
3838 await codeServerPage . navigateMenus ( [ "File" , "Save As..." ] )
3939 await codeServerPage . page . waitForSelector ( ".quick-input-widget" )
40- expect ( await codeServerPage . page . isVisible ( "text=Show Local" ) ) . toBe ( true )
40+ await expect ( codeServerPage . page . locator ( "text=Show Local" ) ) . toBeVisible ( )
4141 } )
4242
4343 test ( "should see the 'Show Local' button on Save File" , async ( { codeServerPage } ) => {
@@ -46,14 +46,14 @@ describe("Downloads (enabled)", ["--disable-workspace-trust"], {}, async () => {
4646 await codeServerPage . waitForTab ( "Untitled-1" )
4747 await codeServerPage . navigateMenus ( [ "File" , "Save" ] )
4848 await codeServerPage . page . waitForSelector ( ".quick-input-widget" )
49- expect ( await codeServerPage . page . isVisible ( "text=Show Local" ) ) . toBe ( true )
49+ await expect ( codeServerPage . page . locator ( "text=Show Local" ) ) . toBeVisible ( )
5050 } )
5151
5252 test ( "should see the 'Show Local' button on Save Workspace As" , async ( { codeServerPage } ) => {
5353 // Action
5454 await codeServerPage . navigateMenus ( [ "File" , "Save Workspace As..." ] )
5555 await codeServerPage . page . waitForSelector ( ".quick-input-widget" )
56- expect ( await codeServerPage . page . isVisible ( "text=Show Local" ) ) . toBe ( true )
56+ await expect ( codeServerPage . page . locator ( "text=Show Local" ) ) . toBeVisible ( )
5757 } )
5858} )
5959
@@ -72,7 +72,7 @@ describe("Downloads (disabled)", ["--disable-workspace-trust", "--disable-file-d
7272 // Action
7373 await codeServerPage . openContextMenu ( "text=unique-file.txt" )
7474
75- expect ( await codeServerPage . page . isVisible ( "text=Download..." ) ) . toBe ( false )
75+ await expect ( codeServerPage . page . locator ( "text=Download..." ) ) . not . toBeVisible ( )
7676 } )
7777
7878 test ( "should not see the 'Show Local' button on Save as" , async ( { codeServerPage } ) => {
@@ -87,7 +87,7 @@ describe("Downloads (disabled)", ["--disable-workspace-trust", "--disable-file-d
8787 await codeServerPage . openFile ( fileName )
8888 await codeServerPage . page . click ( ".tab" )
8989 await codeServerPage . navigateMenus ( [ "File" , "Save As..." ] )
90- expect ( await codeServerPage . page . isVisible ( "text=Show Local" ) ) . toBe ( false )
90+ await expect ( codeServerPage . page . locator ( "text=Show Local" ) ) . not . toBeVisible ( )
9191 } )
9292
9393 test ( "should not see the 'Show Local' button on Save File" , async ( { codeServerPage } ) => {
@@ -96,13 +96,13 @@ describe("Downloads (disabled)", ["--disable-workspace-trust", "--disable-file-d
9696 await codeServerPage . waitForTab ( "Untitled-1" )
9797 await codeServerPage . navigateMenus ( [ "File" , "Save" ] )
9898 await codeServerPage . page . waitForSelector ( ".quick-input-widget" )
99- expect ( await codeServerPage . page . isVisible ( "text=Show Local" ) ) . toBe ( false )
99+ await expect ( codeServerPage . page . locator ( "text=Show Local" ) ) . not . toBeVisible ( )
100100 } )
101101
102102 test ( "should not see the 'Show Local' button on Save Workspace As" , async ( { codeServerPage } ) => {
103103 // Action
104104 await codeServerPage . navigateMenus ( [ "File" , "Save Workspace As..." ] )
105105 await codeServerPage . page . waitForSelector ( ".quick-input-widget" )
106- expect ( await codeServerPage . page . isVisible ( "text=Show Local" ) ) . toBe ( false )
106+ await expect ( codeServerPage . page . locator ( "text=Show Local" ) ) . not . toBeVisible ( )
107107 } )
108108} )
0 commit comments