Skip to content

Commit

Permalink
test: fix flaky library-authoring test (#1193)
Browse files Browse the repository at this point in the history
  • Loading branch information
pomegranited committed Jul 30, 2024
1 parent cc3bbfd commit cba85ab
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/library-authoring/LibraryAuthoringPage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ describe('<LibraryAuthoringPage />', () => {
expect(getByText('Content library')).toBeInTheDocument();
expect(getByText(libraryData.title)).toBeInTheDocument();

expect(getByText('Recently Modified')).toBeInTheDocument();
await waitFor(() => { expect(getByText('Recently Modified')).toBeInTheDocument(); });
expect(getByText('Collections (0)')).toBeInTheDocument();
expect(getByText('Components (6)')).toBeInTheDocument();
expect(getAllByText('Test HTML Block')[0]).toBeInTheDocument();
Expand Down Expand Up @@ -355,11 +355,10 @@ describe('<LibraryAuthoringPage />', () => {
expect(getByText('Content library')).toBeInTheDocument();
expect(getByText(libraryData.title)).toBeInTheDocument();

expect(getByText('Recently Modified')).toBeInTheDocument();
await waitFor(() => { expect(getByText('Recently Modified')).toBeInTheDocument(); });
expect(getByText('Collections (0)')).toBeInTheDocument();
expect(getByText('Components (2)')).toBeInTheDocument();
expect(getAllByText('Test HTML Block')[0]).toBeInTheDocument();

expect(queryByText('You have not added any content to this library yet.')).not.toBeInTheDocument();

// There should not be any "View All" button on page since Components count
Expand Down

0 comments on commit cba85ab

Please sign in to comment.