From 25181db628622d4bc8149f7cfc3954f1c30156ac Mon Sep 17 00:00:00 2001 From: Aleksandr Gumroian Date: Thu, 5 Dec 2024 17:48:10 +0100 Subject: [PATCH] Fix tests --- src/common/WiFiSettings/__tests__/WiFiSettings.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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();