Skip to content

Commit

Permalink
try waiting
Browse files Browse the repository at this point in the history
  • Loading branch information
theosanderson committed Feb 27, 2024
1 parent 2a3b5fd commit 30bcc18
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions website/src/components/ReviewPage/ReviewPage.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,14 @@ describe('ReviewPage', () => {
mockRequest.backend.getSequences(200, generateGetSequencesResponse([]));

getByText((text) => text.includes('Discard 1 sequences with errors')).click();
await waitFor(() => {
expect(getByText("Confirm")).toBeDefined();
});
getByText((text) => text.includes('Confirm')).click();
getByText((text) => text.includes('Release 1 sequences without errors')).click();
await waitFor(() => {
expect(getByText("Confirm")).toBeDefined();
});
getByText((text) => text.includes('Confirm')).click();

Check failure on line 137 in website/src/components/ReviewPage/ReviewPage.spec.tsx

View workflow job for this annotation

GitHub Actions / Unit Tests

src/components/ReviewPage/ReviewPage.spec.tsx > ReviewPage > should render the review page and show button to bulk delete/approve all erroneous sequences

TestingLibraryElementError: Unable to find an element with the text: (text) => text.includes("Confirm"). This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible. Ignored nodes: comments, script, style <body class="" > <div class="" > <div> No sequences to review </div> </div> <div id="react-confirm-alert" /> </body> ❯ Object.getElementError node_modules/@testing-library/dom/dist/config.js:37:19 ❯ node_modules/@testing-library/dom/dist/query-helpers.js:76:38 ❯ node_modules/@testing-library/dom/dist/query-helpers.js:52:17 ❯ node_modules/@testing-library/dom/dist/query-helpers.js:95:19 ❯ src/components/ReviewPage/ReviewPage.spec.tsx:137:9

await waitFor(() => {
Expand Down

0 comments on commit 30bcc18

Please sign in to comment.