@@ -53,14 +53,18 @@ test("toast notifications initialize, stack, dismiss, and render safely", async
5353 const stackOne = page . locator ( "#toast-stack-one" ) ;
5454 const stackTwo = page . locator ( "#toast-stack-two" ) ;
5555 await expect ( stackOne ) . toBeHidden ( ) ;
56- await page . getByRole ( "link " , { name : "Show queued notifications" } ) . click ( ) ;
56+ await page . getByRole ( "button " , { name : "Show queued notifications" } ) . click ( ) ;
5757 await expect ( stackOne ) . toBeVisible ( ) ;
5858 await expect ( stackTwo ) . toBeVisible ( ) ;
59+ const temporary = page . locator ( "#toast-short" ) ;
60+ await expect ( temporary ) . toBeVisible ( ) ;
5961 const stackContainer = stackOne . locator ( "xpath=.." ) ;
6062 await expect ( stackContainer ) . toHaveAttribute (
6163 "data-sqlpage-toast-position" ,
6264 "top-end" ,
6365 ) ;
66+ await expect ( stackContainer ) . toHaveClass ( / \b m h - 1 0 0 \b / ) ;
67+ await expect ( stackContainer ) . toHaveClass ( / \b o v e r f l o w - a u t o \b / ) ;
6468 expect (
6569 await stackTwo
6670 . locator ( "xpath=.." )
@@ -74,27 +78,28 @@ test("toast notifications initialize, stack, dismiss, and render safely", async
7478 ( firstBox ?. y ?? 0 ) + ( firstBox ?. height ?? 0 ) ,
7579 ) ;
7680
77- const temporary = page . locator ( "#toast-short" ) ;
78- await expect ( temporary ) . toBeVisible ( ) ;
7981 await expect ( temporary ) . toBeHidden ( { timeout : 5000 } ) ;
8082 await expect ( stackOne ) . toBeVisible ( ) ;
8183
8284 const dismissible = page . locator ( "#toast-dismissible" ) ;
83- await page . getByRole ( "link " , { name : "Show dismissible error" } ) . click ( ) ;
85+ await page . getByRole ( "button " , { name : "Show dismissible error" } ) . click ( ) ;
8486 await expect (
8587 dismissible . getByRole ( "button" , { name : "Close notification" } ) ,
8688 ) . toBeVisible ( ) ;
8789 await dismissible . getByRole ( "button" , { name : "Close notification" } ) . click ( ) ;
8890 await expect ( dismissible ) . toBeHidden ( ) ;
89- await page . getByRole ( "link" , { name : "Show dismissible error" } ) . click ( ) ;
91+ await expect ( page . locator ( "main" ) ) . toBeFocused ( ) ;
92+ await page . getByRole ( "button" , { name : "Show dismissible error" } ) . click ( ) ;
9093 await expect ( dismissible ) . toBeVisible ( ) ;
9194 await dismissible . getByRole ( "button" , { name : "Close notification" } ) . click ( ) ;
92- await page . getByRole ( "link" , { name : "Show non-dismissible status" } ) . click ( ) ;
95+ await page
96+ . getByRole ( "button" , { name : "Show non-dismissible status" } )
97+ . click ( ) ;
9398 await expect (
9499 page . locator ( "#toast-nondismissible" ) . getByRole ( "button" ) ,
95100 ) . toHaveCount ( 0 ) ;
96101
97- await page . getByRole ( "link " , { name : "Show rich notifications" } ) . click ( ) ;
102+ await page . getByRole ( "button " , { name : "Show rich notifications" } ) . click ( ) ;
98103 await expect ( page . locator ( "#toast-markdown strong" ) ) . toHaveText ( "2.0" ) ;
99104 await expect ( page . locator ( "#toast-markdown a" ) ) . toHaveAttribute (
100105 "href" ,
@@ -108,7 +113,7 @@ test("toast notifications initialize, stack, dismiss, and render safely", async
108113 const bottomContainer = page . locator (
109114 '[data-sqlpage-toast-position="bottom-center"]' ,
110115 ) ;
111- await page . getByRole ( "link " , { name : "Show bottom notification" } ) . click ( ) ;
116+ await page . getByRole ( "button " , { name : "Show bottom notification" } ) . click ( ) ;
112117 await expect ( page . locator ( "#toast-bottom-center" ) ) . toBeVisible ( ) ;
113118 await expect ( bottomContainer ) . toHaveClass ( / \b b o t t o m - 0 \b / ) ;
114119 await expect ( bottomContainer ) . toHaveClass ( / \b s t a r t - 5 0 \b / ) ;
0 commit comments