From 3e32a046c1745e835eaaf570087681a244b74733 Mon Sep 17 00:00:00 2001 From: Navin Karkera Date: Tue, 10 Sep 2024 10:51:46 +0530 Subject: [PATCH] test: fix test --- src/library-authoring/LibraryAuthoringPage.test.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/library-authoring/LibraryAuthoringPage.test.tsx b/src/library-authoring/LibraryAuthoringPage.test.tsx index 62e02d8ea8..8703256b7c 100644 --- a/src/library-authoring/LibraryAuthoringPage.test.tsx +++ b/src/library-authoring/LibraryAuthoringPage.test.tsx @@ -548,14 +548,14 @@ describe('', () => { }); 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);