@@ -9,7 +9,7 @@ describe("Open Help > About", () => {
99 let context : BrowserContext
1010
1111 beforeAll ( async ( ) => {
12- browser = await chromium . launch ( { headless : false } )
12+ browser = await chromium . launch ( )
1313 // Create a new context with the saved storage state
1414 const storageState = JSON . parse ( STORAGE ) || { }
1515
@@ -62,11 +62,6 @@ describe("Open Help > About", () => {
6262 } )
6363
6464 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-
7065 // waitUntil: "domcontentloaded"
7166 // In case the page takes a long time to load
7267 await page . goto ( CODE_SERVER_ADDRESS , { waitUntil : "domcontentloaded" } )
@@ -80,13 +75,17 @@ describe("Open Help > About", () => {
8075 const helpButton = "a.action-menu-item span[aria-label='Help']"
8176 expect ( await page . isVisible ( helpButton ) )
8277
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 )
8780
88- // see the About button
81+ // see the About button and click it
8982 const aboutButton = "a.action-menu-item span[aria-label='About']"
9083 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 ) )
9190 } )
9291} )
0 commit comments