@@ -21,53 +21,53 @@ describe("ScrollToTop", () => {
2121 // oxlint-disable-next-line no-non-null-assertion
2222 container : container . children [ 0 ] ! as HTMLElement ,
2323 // oxlint-disable-next-line no-non-null-assertion
24- button : container . querySelector ( "div. button" ) ! ,
24+ button : container . querySelector ( "button" ) ! ,
2525 } ;
2626 }
2727
2828 it ( "renders with correct classes and structure" , ( ) => {
2929 const { container, button } = renderElement ( ) ;
3030
3131 expect ( container ) . toHaveClass ( "content-grid" , "ScrollToTop" ) ;
32- expect ( button ) . toHaveClass ( "breakout" , "button" ) ;
32+ expect ( button ) . toHaveClass ( "breakout" ) ;
3333 expect ( button ) . toContainHTML ( `<i class="fas fa-angle-double-up"></i>` ) ;
3434 } ) ;
3535
3636 it ( "renders invisible when scrollY is 0" , ( ) => {
3737 const { button } = renderElement ( ) ;
3838
39- expect ( button ) . toHaveClass ( "invisible " ) ;
39+ expect ( button ) . toHaveClass ( "opacity-0 " ) ;
4040 } ) ;
4141
4242 it ( "becomes visible when scrollY > 100 on non-test pages" , ( ) => {
4343 const { button } = renderElement ( ) ;
4444 scrollTo ( 150 ) ;
4545
46- expect ( button ) . not . toHaveClass ( "invisible " ) ;
46+ expect ( button ) . not . toHaveClass ( "opacity-0 " ) ;
4747 } ) ;
4848
4949 it ( "stays invisible on test page at scroll 0" , ( ) => {
5050 getActivePageMock . mockReturnValue ( "test" ) ;
5151 const { button } = renderElement ( ) ;
5252
53- expect ( button ) . toHaveClass ( "invisible " ) ;
53+ expect ( button ) . toHaveClass ( "opacity-0 " ) ;
5454 } ) ;
5555
5656 it ( "stays invisible on test page even with scroll > 100" , ( ) => {
5757 getActivePageMock . mockReturnValue ( "test" ) ;
5858 const { button } = renderElement ( ) ;
5959 scrollTo ( 150 ) ;
6060
61- expect ( button ) . toHaveClass ( "invisible " ) ;
61+ expect ( button ) . toHaveClass ( "opacity-0 " ) ;
6262 } ) ;
6363
6464 it ( "becomes invisible when scroll < 100 on non-test pages" , ( ) => {
6565 const { button } = renderElement ( ) ;
6666 scrollTo ( 150 ) ;
67- expect ( button ) . not . toHaveClass ( "invisible " ) ;
67+ expect ( button ) . not . toHaveClass ( "opacity-0 " ) ;
6868
6969 scrollTo ( 50 ) ;
70- expect ( button ) . toHaveClass ( "invisible " ) ;
70+ expect ( button ) . toHaveClass ( "opacity-0 " ) ;
7171 } ) ;
7272
7373 it ( "scrolls to top and hides button on click" , async ( ) => {
@@ -82,7 +82,7 @@ describe("ScrollToTop", () => {
8282 top : 0 ,
8383 behavior : "smooth" ,
8484 } ) ;
85- expect ( button ) . toHaveClass ( "invisible " ) ;
85+ expect ( button ) . toHaveClass ( "opacity-0 " ) ;
8686 } ) ;
8787
8888 it ( "cleans up scroll listener on unmount" , ( ) => {
0 commit comments