Skip to content

Commit 9f3b4ff

Browse files
authored
In App.samplingNavigation.test.tsx, (#1035)
- replaced test for Reject button with the one used in the regular sampling test, which gets the button by role. This test appeared to be failing because formatting puts the name between the button elements with some whitespace. The way to look is with a regex
1 parent 3adaf39 commit 9f3b4ff

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

client/src/__tests__/App.samplingNavigation.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ describe("App - Sampling auto-navigation", () => {
229229
expect(screen.getByTestId("sampling-request")).toBeTruthy();
230230
});
231231

232-
fireEvent.click(screen.getByText("Reject"));
232+
fireEvent.click(screen.getByRole("button", { name: /Reject/i }));
233233

234234
await waitFor(() => {
235235
expect(reject).toHaveBeenCalled();

0 commit comments

Comments
 (0)