@@ -719,9 +719,9 @@ test("navigating pushing URL state from a frame navigation fires events", async
719719 await nextEventOnTarget ( page , "frame" , "turbo:before-fetch-response" )
720720 await nextEventOnTarget ( page , "frame" , "turbo:frame-render" )
721721 await nextEventOnTarget ( page , "frame" , "turbo:frame-load" )
722- expect ( await nextAttributeMutationNamed ( page , "frame " , "aria-busy" ) , "removes aria-busy from the <turbo-frame >" ) . not . toBeTruthy ( )
722+ expect ( await nextAttributeMutationNamed ( page , "html " , "aria-busy" ) , "true" , "sets aria-busy on the <html >") . toBeTruthy ( )
723723
724- expect ( await nextAttributeMutationNamed ( page , "html " , "aria-busy" ) , "sets aria-busy on the <html >" ) . toEqual ( "true" )
724+ expect ( await nextAttributeMutationNamed ( page , "frame " , "aria-busy" ) , "removes aria-busy from the <turbo-frame >" ) . not . toBeTruthy ( )
725725 await nextEventOnTarget ( page , "html" , "turbo:before-visit" )
726726 await nextEventOnTarget ( page , "html" , "turbo:visit" )
727727 await nextEventOnTarget ( page , "html" , "turbo:before-cache" )
@@ -933,8 +933,14 @@ test("navigating frame with form[method=post][data-turbo-action=advance] to the
933933 await page . click ( "#form-post-frame-action-advance button" )
934934 await nextEventNamed ( page , "turbo:load" )
935935
936- await expect ( page . locator ( "#frame" ) , "clears turbo-frame[aria-busy]" ) . not . toHaveAttribute ( "aria-busy" )
937- await expect ( page . locator ( "#html" ) , "clears html[aria-busy]" ) . not . toHaveAttribute ( "aria-busy" )
936+ expect ( await nextAttributeMutationNamed ( page , "form-post-frame-action-advance" , "aria-busy" ) , "sets aria-busy on the <form>" ) . toEqual ( "true" )
937+ expect ( await nextAttributeMutationNamed ( page , "frame" , "aria-busy" ) , "sets aria-busy on the <turbo-frame>" ) . toEqual ( "true" )
938+ expect ( await nextAttributeMutationNamed ( page , "html" , "aria-busy" ) , "sets aria-busy on the <html>" ) . toEqual ( "true" )
939+
940+ expect ( await nextAttributeMutationNamed ( page , "form-post-frame-action-advance" , "aria-busy" ) , "removes aria-busy from the <form>" ) . toEqual ( null )
941+ expect ( await nextAttributeMutationNamed ( page , "frame" , "aria-busy" ) , "removes aria-busy from the <turbo-frame>" ) . toEqual ( null )
942+ expect ( await nextAttributeMutationNamed ( page , "html" , "aria-busy" ) , "removes aria-busy from the <html>" ) . toEqual ( null )
943+
938944 await expect ( page . locator ( "#html" ) , "clears html[data-turbo-preview]" ) . not . toHaveAttribute ( "data-turbo-preview" )
939945 await expect ( page . locator ( "#frame" ) , "marks the frame as [complete]" ) . toHaveAttribute ( "complete" )
940946} )
0 commit comments