Skip to content

Commit

Permalink
test: simplify flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
bradenmacdonald committed Sep 11, 2024
1 parent f5796ac commit bb051e6
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 @@ -393,9 +393,8 @@ describe('<LibraryAuthoringPage />', () => {
expect(mockResult0.display_name).toStrictEqual(displayName);
await renderLibraryPage();

// Click on the first component
waitFor(() => expect(screen.queryByText(displayName)).toBeInTheDocument());
fireEvent.click(screen.getAllByText(displayName)[0]);
// Click on the first component. It should appear twice, in both "Recently Modified" and "Components"
fireEvent.click((await screen.findAllByText(displayName))[0]);

const sidebar = screen.getByTestId('library-sidebar');

Expand Down

0 comments on commit bb051e6

Please sign in to comment.