Skip to content

Commit 2f0fe04

Browse files
committed
test: fix test
1 parent e07e30b commit 2f0fe04

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/library-authoring/LibraryAuthoringPage.test.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -548,14 +548,14 @@ describe('<LibraryAuthoringPage />', () => {
548548
});
549549

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

553-
expect(await doc.findByText('Content library')).toBeInTheDocument();
554-
expect((await doc.findAllByText(libraryTitle))[0]).toBeInTheDocument();
553+
expect(await screen.findByText('Content library')).toBeInTheDocument();
554+
expect((await screen.findAllByText(libraryTitle))[0]).toBeInTheDocument();
555555

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

0 commit comments

Comments
 (0)