@@ -10,8 +10,7 @@ import { bulkModulestoreMigrateUrl } from '@src/data/api';
1010import { useGetContentHits } from '@src/search-manager' ;
1111import { ImportDetailsPage } from './ImportDetailsPage' ;
1212import { LibraryProvider } from '../common/context/LibraryContext' ;
13- import { mockContentLibrary } from '../data/api.mocks' ;
14- import { getModulestoreMigratedBlocksInfoUrl } from '../data/api' ;
13+ import { mockContentLibrary , mockGetModulestoreMigratedBlocksInfo } from '../data/api.mocks' ;
1514import { libraryComponentsMock } from '../__mocks__' ;
1615
1716mockContentLibrary . applyMock ( ) ;
@@ -93,10 +92,13 @@ describe('', () => {
9392 } ) ;
9493
9594 it ( 'should render Succeeded state' , async ( ) => {
95+ mockGetModulestoreMigratedBlocksInfo . applyMockSuccess ( ) ;
9696 render ( mockGetMigrationStatus . migrationId ) ;
9797 expect ( await screen . findByText (
9898 / t e s t c o u r s e h a s b e e n i m p o r t e d t o y o u r l i b r a r y i n a c o l l e c t i o n c a l l e d t e s t c o l l e c t i o n / i,
9999 ) ) ;
100+ expect ( await screen . findByText ( / T o t a l B l o c k s / i) ) . toBeInTheDocument ( ) ;
101+ expect ( await screen . findByText ( '4' ) ) . toBeInTheDocument ( ) ;
100102
101103 const viewImportedContentBtn = screen . getByRole ( 'button' , {
102104 name : / v i e w i m p o r t e d c o n t e n t / i,
@@ -107,13 +109,7 @@ describe('', () => {
107109 } ) ;
108110
109111 it ( 'should render Partial Succeeded state' , async ( ) => {
110- axiosMock . onGet ( getModulestoreMigratedBlocksInfoUrl ( ) ) . reply ( 200 , [
111- {
112- sourceKey : 'block-v1:UNIX+UX2+2025_T2+type@library_content+block@test_lib_content' ,
113- targetKey : null ,
114- unsupportedReason : 'The "library_content" XBlock (ID: "test_lib_content") has children, so it not supported in content libraries. It has 2 children blocks.' ,
115- } ,
116- ] ) ;
112+ mockGetModulestoreMigratedBlocksInfo . applyMockPartial ( ) ;
117113 ( useGetContentHits as jest . Mock ) . mockReturnValue ( {
118114 isPending : false ,
119115 data : {
@@ -146,8 +142,13 @@ describe('', () => {
146142 render ( mockGetMigrationStatus . migrationIdPartial ) ;
147143 expect ( await screen . findByText ( / p a r t i a l i m p o r t s u c c e s s f u l / i) ) . toBeInTheDocument ( ) ;
148144
149- expect ( screen . getByText (
150- / 8 5 % o f c o u r s e t e s t c o u r s e h a s b e e n i m p o r t e d s u c c e s s f u l l y / i,
145+ expect ( await screen . findByText ( / T o t a l B l o c k s / i) ) . toBeInTheDocument ( ) ;
146+ expect ( await screen . findByText ( '2/5' ) ) . toBeInTheDocument ( ) ;
147+ expect ( await screen . findByText ( / C o m p o n e n t s / i) ) . toBeInTheDocument ( ) ;
148+ expect ( await screen . findByText ( '1/4' ) ) . toBeInTheDocument ( ) ;
149+
150+ expect ( await screen . findByText (
151+ / 4 0 % o f c o u r s e t e s t c o u r s e h a s b e e n i m p o r t e d s u c c e s s f u l l y / i,
151152 ) ) . toBeInTheDocument ( ) ;
152153
153154 expect ( await screen . findByRole ( 'cell' , {
0 commit comments