From 9f3b4ff0a9a8fde0d356011e550b97fffa9663f6 Mon Sep 17 00:00:00 2001 From: Cliff Hall Date: Fri, 23 Jan 2026 10:50:54 -0500 Subject: [PATCH] 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 --- client/src/__tests__/App.samplingNavigation.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/__tests__/App.samplingNavigation.test.tsx b/client/src/__tests__/App.samplingNavigation.test.tsx index a82e1350..70a42a92 100644 --- a/client/src/__tests__/App.samplingNavigation.test.tsx +++ b/client/src/__tests__/App.samplingNavigation.test.tsx @@ -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();