1
0
mirror of https://gitlab.nic.cz/turris/reforis/foris-js.git synced 2024-12-26 00:21:36 +01:00

Fix tests

This commit is contained in:
Aleksandr Gumroian 2024-12-05 17:48:10 +01:00
parent 10c328f15f
commit 25181db628
No known key found for this signature in database
GPG Key ID: 9E77849C64F0A733

View File

@ -77,7 +77,7 @@ describe("<WiFiSettings/>", () => {
it("Snapshot 2.4 GHz", () => { it("Snapshot 2.4 GHz", () => {
fireEvent.click(getByText("Wi-Fi 1")); fireEvent.click(getByText("Wi-Fi 1"));
const enabledRender = asFragment(); const enabledRender = asFragment();
fireEvent.click(getAllByText("2.4")[0]); fireEvent.click(getAllByText(/2.4/)[0]);
expect(diffSnapshot(enabledRender, asFragment())).toMatchSnapshot(); expect(diffSnapshot(enabledRender, asFragment())).toMatchSnapshot();
}); });
@ -135,7 +135,7 @@ describe("<WiFiSettings/>", () => {
it("Post form: 2.4 GHz", () => { it("Post form: 2.4 GHz", () => {
fireEvent.click(getByText("Wi-Fi 1")); fireEvent.click(getByText("Wi-Fi 1"));
fireEvent.click(getAllByText("2.4")[0]); fireEvent.click(getAllByText(/2.4/)[0]);
fireEvent.click(getByText("Save")); fireEvent.click(getByText("Save"));
expect(mockAxios.post).toBeCalled(); expect(mockAxios.post).toBeCalled();