File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -2361,9 +2361,6 @@ describe('<CourseUnit />', () => {
2361
2361
} ) ;
2362
2362
2363
2363
it ( 'resets XBlock publish state after saving XBlock changes' , async ( ) => {
2364
- store = initializeStore ( ) ;
2365
- mockedUsedNavigate . mockClear ( ) ;
2366
-
2367
2364
axiosMock
2368
2365
. onGet ( getCourseSectionVerticalApiUrl ( blockId ) )
2369
2366
. reply ( 200 , {
@@ -2377,13 +2374,15 @@ describe('<CourseUnit />', () => {
2377
2374
2378
2375
render ( < RootWrapper /> ) ;
2379
2376
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
+ } ) ;
2382
2381
2383
2382
const courseUnitSidebar = await screen . findByTestId ( 'course-unit-sidebar' ) ;
2384
2383
2385
2384
await waitFor ( ( ) => {
2386
- // Verify the publish button is present (indicates unpublished changes)
2385
+ // Verify the publish button is present (indicates unpublished changes)
2387
2386
expect ( within ( courseUnitSidebar )
2388
2387
. getByRole ( 'button' , { name : sidebarMessages . actionButtonPublishTitle . defaultMessage } ) ) . toBeInTheDocument ( ) ;
2389
2388
You can’t perform that action at this time.
0 commit comments