@@ -13,10 +13,16 @@ import Course from './Course';
1313import setupDiscussionSidebar from './test-utils' ;
1414
1515jest . mock ( '@edx/frontend-platform/analytics' ) ;
16- jest . mock ( '@edx/frontend-lib-special-exams/dist/data/thunks.js' , ( ) => ( {
17- ...jest . requireActual ( '@edx/frontend-lib-special-exams/dist/data/thunks.js' ) ,
18- checkExamEntry : ( ) => jest . fn ( ) ,
19- } ) ) ;
16+ jest . mock ( '@edx/frontend-lib-special-exams' , ( ) => {
17+ const actual = jest . requireActual ( '@edx/frontend-lib-special-exams' ) ;
18+ return {
19+ ...actual ,
20+ __esModule : true ,
21+ // Mock the default export (SequenceExamWrapper) to just render children
22+ // eslint-disable-next-line react/prop-types
23+ default : ( { children } ) => < div data-testid = "sequence-exam-wrapper" > { children } </ div > ,
24+ } ;
25+ } ) ;
2026const mockLearnerToolsTestId = 'fake-learner-tools' ;
2127jest . mock (
2228 './learner-tools/LearnerTools' ,
@@ -366,12 +372,13 @@ describe('Course', () => {
366372 enrollment : { mode : 'verified' } ,
367373 } ) ;
368374 const testStore = await initializeTestStore ( { courseMetadata } , false ) ;
369- const { courseware } = testStore . getState ( ) ;
375+ const { courseware, models } = testStore . getState ( ) ;
370376 const { courseId, sequenceId } = courseware ;
371377 const testData = {
372378 ...mockData ,
373379 courseId,
374380 sequenceId,
381+ unitId : Object . values ( models . units ) [ 0 ] . id ,
375382 } ;
376383 render ( < Course { ...testData } /> , { store : testStore , wrapWithRouter : true } ) ;
377384 const learnerTools = screen . queryByTestId ( mockLearnerToolsTestId ) ;
0 commit comments