Skip to content

Commit 9e1564c

Browse files
committed
test: add coverage for restore archive summary
1 parent 1660ad8 commit 9e1564c

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/library-authoring/create-library/CreateLibrary.test.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ describe('<CreateLibrary />', () => {
435435
sections: 8,
436436
subsections: 12,
437437
units: 20,
438-
createdOnServer: '2025-01-01T10:00:00Z',
438+
createdOnServer: 'test.com',
439439
createdAt: '2025-01-01T10:00:00Z',
440440
createdBy: {
441441
username: 'testuser',
@@ -478,7 +478,10 @@ describe('<CreateLibrary />', () => {
478478
await waitFor(() => {
479479
expect(screen.getByText('Test Archive Library')).toBeInTheDocument();
480480
expect(screen.getByText('TestOrg / test-archive')).toBeInTheDocument();
481-
expect(screen.getByText(/Contains 15 Components/i)).toBeInTheDocument();
481+
// Testing the archive details summary
482+
expect(screen.getByText(/Contains 8 sections, 12 subsections, 20 units, 15 components/i)).toBeInTheDocument();
483+
expect(screen.getByText(/Created on instance test.com/i)).toBeInTheDocument();
484+
expect(screen.getByText(/by user test@example.com/i)).toBeInTheDocument();
482485
});
483486
});
484487

0 commit comments

Comments
 (0)