diff --git a/web/src/components/storage/ProposalSettingsSection.test.jsx b/web/src/components/storage/ProposalSettingsSection.test.jsx index 7548172973..71dbd86dc5 100644 --- a/web/src/components/storage/ProposalSettingsSection.test.jsx +++ b/web/src/components/storage/ProposalSettingsSection.test.jsx @@ -610,9 +610,9 @@ describe("Space policy field", () => { const popup = await screen.findByRole("dialog"); within(popup).getByText("Space Policy"); - within(popup).getByRole("option", { name: /Delete current content/ }); - within(popup).getByRole("option", { name: /Shrink existing partitions/ }); - within(popup).getByRole("option", { name: /Use available space/, selected: true }); + within(popup).getByRole("row", { name: /Delete current content/ }); + within(popup).getByRole("row", { name: /Shrink existing partitions/ }); + within(popup).getByRole("row", { name: /Use available space/, selected: true }); }); it("allows to show the installation devices", async () => { @@ -642,7 +642,7 @@ describe("Space policy field", () => { await user.click(button); const popup = await screen.findByRole("dialog"); - const option = within(popup).getByRole("option", { name: /Shrink/ }); + const option = within(popup).getByRole("row", { name: /Shrink/ }); await user.click(option); const cancel = within(popup).getByRole("button", { name: "Cancel" }); @@ -661,7 +661,7 @@ describe("Space policy field", () => { await user.click(button); const popup = await screen.findByRole("dialog"); - const option = within(popup).getByRole("option", { name: /Shrink/ }); + const option = within(popup).getByRole("row", { name: /Shrink/ }); await user.click(option); const accept = within(popup).getByRole("button", { name: "Accept" }); diff --git a/web/src/components/storage/space-policy-utils.jsx b/web/src/components/storage/space-policy-utils.jsx index fbb5fc5275..fc76f90db0 100644 --- a/web/src/components/storage/space-policy-utils.jsx +++ b/web/src/components/storage/space-policy-utils.jsx @@ -25,23 +25,9 @@ import { _, n_ } from "~/i18n"; import { sprintf } from "sprintf-js"; import { noop } from "~/utils"; import { Button, ExpandableSection, Hint, HintBody } from "@patternfly/react-core"; +import { Selector } from "~/components/core"; import { DeviceList } from "~/components/storage"; -const ListBox = ({ children, ...props }) =>