Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions web/package/agama-web-ui.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu May 22 09:07:28 UTC 2025 - David Diaz <dgonzalez@suse.com>

- Do not crash when navigating to a Wi-Fi network (bsc#1243415)

-------------------------------------------------------------------
Mon May 19 13:38:16 UTC 2025 - David Diaz <dgonzalez@suse.com>

Expand Down
12 changes: 11 additions & 1 deletion web/src/components/network/WifiNetworksList.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import React from "react";
import { screen } from "@testing-library/react";
import { installerRender } from "~/test-utils";
import { installerRender, mockNavigateFn } from "~/test-utils";
import WifiNetworksList from "~/components/network/WifiNetworksList";
import {
Connection,
Expand Down Expand Up @@ -132,6 +132,16 @@ describe("WifiNetworksList", () => {
screen.getByRole("progressbar", { name: "Connecting to Network 2" });
});

describe("and user selects a network", () => {
it("navigates to the Wi-Fi network path including the expected SSID", async () => {
// @ts-expect-error: you need to specify the aria-label
const { user } = installerRender(<WifiNetworksList />);
const network1 = screen.getByLabelText("Secured network Network 1 Weak signal");
await user.click(network1);
expect(mockNavigateFn).toHaveBeenCalledWith(expect.stringContaining("Network 1"));
});
});

describe.skip("and user selects a connected network", () => {
it("renders basic network information and actions instead of the connection form", async () => {
// @ts-expect-error: you need to specify the aria-label
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/network/WifiNetworksList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ const NetworkListItem = ({ network, connection, showIp }: NetworkListItemProps)
const ipId = useId();

return (
<DataListItem>
<DataListItem id={network.ssid}>
<DataListItemRow>
<DataListItemCells
dataListCells={[
Expand Down