File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2361,9 +2361,6 @@ describe('<CourseUnit />', () => {
23612361 } ) ;
23622362
23632363 it ( 'resets XBlock publish state after saving XBlock changes' , async ( ) => {
2364- store = initializeStore ( ) ;
2365- mockedUsedNavigate . mockClear ( ) ;
2366-
23672364 axiosMock
23682365 . onGet ( getCourseSectionVerticalApiUrl ( blockId ) )
23692366 . reply ( 200 , {
@@ -2377,13 +2374,15 @@ describe('<CourseUnit />', () => {
23772374
23782375 render ( < RootWrapper /> ) ;
23792376
2380- const xblocksIframe = await screen . findByTitle ( xblockContainerIframeMessages . xblockIframeTitle . defaultMessage ) ;
2381- expect ( xblocksIframe ) . toBeInTheDocument ( ) ;
2377+ waitFor ( ( ) => {
2378+ const xblocksIframe = screen . findByTitle ( xblockContainerIframeMessages . xblockIframeTitle . defaultMessage ) ;
2379+ expect ( xblocksIframe ) . toBeInTheDocument ( ) ;
2380+ } ) ;
23822381
23832382 const courseUnitSidebar = await screen . findByTestId ( 'course-unit-sidebar' ) ;
23842383
23852384 await waitFor ( ( ) => {
2386- // Verify the publish button is present (indicates unpublished changes)
2385+ // Verify the publish button is present (indicates unpublished changes)
23872386 expect ( within ( courseUnitSidebar )
23882387 . getByRole ( 'button' , { name : sidebarMessages . actionButtonPublishTitle . defaultMessage } ) ) . toBeInTheDocument ( ) ;
23892388
You can’t perform that action at this time.
0 commit comments