diff --git a/src/common/WiFiSettings/__tests__/WiFiSettings.test.js b/src/common/WiFiSettings/__tests__/WiFiSettings.test.js index 7afd10a..9bd4471 100644 --- a/src/common/WiFiSettings/__tests__/WiFiSettings.test.js +++ b/src/common/WiFiSettings/__tests__/WiFiSettings.test.js @@ -77,7 +77,7 @@ describe("", () => { it("Snapshot 2.4 GHz", () => { fireEvent.click(getByText("Wi-Fi 1")); const enabledRender = asFragment(); - fireEvent.click(getAllByText("2.4")[0]); + fireEvent.click(getAllByText(/2.4/)[0]); expect(diffSnapshot(enabledRender, asFragment())).toMatchSnapshot(); }); @@ -135,7 +135,7 @@ describe("", () => { it("Post form: 2.4 GHz", () => { fireEvent.click(getByText("Wi-Fi 1")); - fireEvent.click(getAllByText("2.4")[0]); + fireEvent.click(getAllByText(/2.4/)[0]); fireEvent.click(getByText("Save")); expect(mockAxios.post).toBeCalled();