@@ -9,7 +9,7 @@ describe("Open Help > About", () => {
9
9
let context : BrowserContext
10
10
11
11
beforeAll ( async ( ) => {
12
- browser = await chromium . launch ( { headless : false } )
12
+ browser = await chromium . launch ( )
13
13
// Create a new context with the saved storage state
14
14
const storageState = JSON . parse ( STORAGE ) || { }
15
15
@@ -62,11 +62,6 @@ describe("Open Help > About", () => {
62
62
} )
63
63
64
64
it ( "should see a 'Help' then 'About' button in the Application Menu that opens a dialog" , async ( ) => {
65
- // Sometimes a dialog shows up when you navigate
66
- // asking if you're sure you want to leave
67
- // so we listen if it comes, we accept it
68
- // page.on("dialog", (dialog) => dialog.accept())
69
-
70
65
// waitUntil: "domcontentloaded"
71
66
// In case the page takes a long time to load
72
67
await page . goto ( CODE_SERVER_ADDRESS , { waitUntil : "domcontentloaded" } )
@@ -80,13 +75,17 @@ describe("Open Help > About", () => {
80
75
const helpButton = "a.action-menu-item span[aria-label='Help']"
81
76
expect ( await page . isVisible ( helpButton ) )
82
77
83
- // Click it and navigate to /healthz
84
- // NOTE: ran into issues of it failing intermittently
85
- // without having button: "middle"
86
- await Promise . all ( [ page . waitForNavigation ( ) , page . click ( helpButton , { button : "middle" } ) ] )
78
+ // Hover the helpButton
79
+ await page . hover ( helpButton )
87
80
88
- // see the About button
81
+ // see the About button and click it
89
82
const aboutButton = "a.action-menu-item span[aria-label='About']"
90
83
expect ( await page . isVisible ( aboutButton ) )
84
+ // NOTE: it won't work unless you hover it first
85
+ await page . hover ( aboutButton )
86
+ await page . click ( aboutButton )
87
+
88
+ const codeServerText = "text=code-server"
89
+ expect ( await page . isVisible ( codeServerText ) )
91
90
} )
92
91
} )
0 commit comments