Skip to content

Commit

Permalink
test: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
navinkarkera committed Sep 10, 2024
1 parent e07e30b commit 2f0fe04
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/library-authoring/LibraryAuthoringPage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -548,14 +548,14 @@ describe('<LibraryAuthoringPage />', () => {
});

it('shows both components and collections in recently modified section', async () => {
const doc = await renderLibraryPage();
await renderLibraryPage();

expect(await doc.findByText('Content library')).toBeInTheDocument();
expect((await doc.findAllByText(libraryTitle))[0]).toBeInTheDocument();
expect(await screen.findByText('Content library')).toBeInTheDocument();
expect((await screen.findAllByText(libraryTitle))[0]).toBeInTheDocument();

// "Recently Modified" header + sort shown
expect(doc.getAllByText('Recently Modified').length).toEqual(2);
const recentModifiedContainer = (await doc.findAllByText('Recently Modified'))[1].parentElement?.parentElement?.parentElement;
expect(screen.getAllByText('Recently Modified').length).toEqual(2);
const recentModifiedContainer = (await screen.findAllByText('Recently Modified'))[1].parentElement?.parentElement?.parentElement;
if (recentModifiedContainer) {
const container = within(recentModifiedContainer);
expect(container.queryAllByText('Text').length).toBeGreaterThan(0);
Expand Down

0 comments on commit 2f0fe04

Please sign in to comment.