Skip to content

Commit

Permalink
fix: fix unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Pradithya Aria Pura <[email protected]>
  • Loading branch information
pradithya committed Apr 1, 2023
1 parent 061a0d4 commit 4ff7b7a
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ describe('ProjectDashboard', () => {
mockUseUserProfile.mockReturnValue(
loadedFetchable(sampleUserProfile, jest.fn()),
);
const { getByText, queryByText, getAllByRole } = renderView();
const { getAllByText, queryAllByText, getAllByRole } = renderView();
await waitFor(() => {});
expect(mockUseUserProfile).toHaveBeenCalled();

Expand All @@ -224,13 +224,15 @@ describe('ProjectDashboard', () => {
expect(checkboxes[0]).toBeTruthy();
expect(checkboxes[0]?.checked).toEqual(false);
await waitFor(() =>
expect(getByText(executions1[0].closure.workflowId.name)),
expect(getAllByText(executions1[0].closure.workflowId.name)),
);
await fireEvent.click(checkboxes[0]);

// when user selects checkbox, table should have no executions to display
await waitFor(() =>
expect(queryByText(executions1[0].closure.workflowId.name)).toBeNull(),
expect(
queryAllByText(executions1[0].closure.workflowId.name),
).toHaveLength(0),
);
});

Expand Down

0 comments on commit 4ff7b7a

Please sign in to comment.