@@ -280,11 +280,12 @@ test.describe('Dashboard axe — offcanvas interaction and highlight', () => {
280280 await target . hover ( ) ;
281281
282282 // The corresponding element in the dashboard should get highlight class
283- // Use .first() since selector may match multiple elements
283+ // Use .first() since axe-core may produce non-unique selectors (e.g., "span").
284+ // This tests integration (hover triggers highlight) not selector uniqueness.
284285 const element = page . locator ( selector ) . first ( ) ;
285286 await expect ( element ) . toHaveClass ( / q u a r t o - a x e - h o v e r - h i g h l i g h t / , { timeout : 3000 } ) ;
286287
287- // Move mouse away — highlight should be removed
288+ // Move mouse to top-left corner ( away from all elements) to clear hover state
288289 await page . mouse . move ( 0 , 0 ) ;
289290 await expect ( element ) . not . toHaveClass ( / q u a r t o - a x e - h o v e r - h i g h l i g h t / ) ;
290291 } ) ;
@@ -308,11 +309,12 @@ test.describe('HTML axe — hover interaction and highlight', () => {
308309 await target . hover ( ) ;
309310
310311 // The corresponding element on the page should get highlight class
311- // Use .first() since selector may match multiple elements (e.g., "span")
312+ // Use .first() since axe-core may produce non-unique selectors (e.g., "span").
313+ // This tests integration (hover triggers highlight) not selector uniqueness.
312314 const element = page . locator ( selector ) . first ( ) ;
313315 await expect ( element ) . toHaveClass ( / q u a r t o - a x e - h o v e r - h i g h l i g h t / , { timeout : 3000 } ) ;
314316
315- // Move mouse away — highlight should be removed
317+ // Move mouse to top-left corner ( away from all elements) to clear hover state
316318 await page . mouse . move ( 0 , 0 ) ;
317319 await expect ( element ) . not . toHaveClass ( / q u a r t o - a x e - h o v e r - h i g h l i g h t / ) ;
318320 } ) ;
0 commit comments