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
This commit is contained in:
Cliff Hall 2026-01-23 10:50:54 -05:00 • committed by GitHub
commit 9f3b4ff0a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -229,7 +229,7 @@ describe("App - Sampling auto-navigation", () => {
expect(screen.getByTestId("sampling-request")).toBeTruthy();
});
fireEvent.click(screen.getByText("Reject"));
fireEvent.click(screen.getByRole("button", { name: /Reject/i }));
await waitFor(() => {
expect(reject).toHaveBeenCalled();