Skip to content
This repository has been archived by the owner on Jun 12, 2022. It is now read-only.

Commit

Permalink
feat: show usage of getByRole
Browse files Browse the repository at this point in the history
  • Loading branch information
rrebase committed Jul 19, 2020
1 parent 15b4132 commit 99ea890
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions template/src/features/counter/Counter.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe("<Counter />", () => {

const { mockStore } = renderWithRedux(<Counter />);

fireEvent.click(screen.getByText(/slow fetch/i));
fireEvent.click(screen.getByRole("button", { name: /slow fetch/i }));

jest.runAllTimers();
// Normally we would wait for an element to show up
Expand All @@ -69,7 +69,7 @@ describe("<Counter />", () => {

const { mockStore } = renderWithRedux(<Counter />);

fireEvent.click(screen.getByText(/slow fetch/i));
fireEvent.click(screen.getByRole("button", { name: /slow fetch/i }));

jest.runAllTimers();
// Normally we would wait for an element to show up
Expand Down

0 comments on commit 99ea890

Please sign in to comment.