Skip to content
Merged
2 changes: 1 addition & 1 deletion web/src/components/storage/ConfigEditorMenu.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ it("allows users to change the boot options", async () => {
const { user, menu } = await openMenu();
const bootItem = within(menu).getByRole("menuitem", { name: /boot options/ });
await user.click(bootItem);
expect(mockNavigateFn).toHaveBeenCalledWith(PATHS.bootDevice);
expect(mockNavigateFn).toHaveBeenCalledWith(PATHS.editBootDevice);
});

it("allows users to reset the config", async () => {
Expand Down
4 changes: 2 additions & 2 deletions web/src/components/storage/ConfigEditorMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ export default function ConfigEditorMenu() {
<DropdownList>
<DropdownItem
key="lvm-link"
onClick={() => navigate(PATHS.lvm.create)}
onClick={() => navigate(PATHS.volumeGroup.add)}
description={_("Extend the installation using LVM")}
>
{_("Add LVM volume group")}
</DropdownItem>
<Divider />
<DropdownItem
key="boot-link"
onClick={() => navigate(PATHS.bootDevice)}
onClick={() => navigate(PATHS.editBootDevice)}
description={_("Select the disk to configure partitions for booting")}
>
{_("Change boot options")}
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/storage/DriveEditor.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ describe("PartitionMenuItem", () => {
name: "Edit swap",
});
await user.click(editSwapButton);
expect(mockNavigateFn).toHaveBeenCalledWith("/storage/devices/sda/partitions/swap/edit");
expect(mockNavigateFn).toHaveBeenCalledWith("/storage/drives/sda/partitions/swap/edit");
});
});

Expand Down
12 changes: 8 additions & 4 deletions web/src/components/storage/DriveEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const SpacePolicySelector = ({ drive, driveDevice }: DriveEditorProps) => {
const { setSpacePolicy } = useDrive(drive.name);
const onSpacePolicyChange = (spacePolicy: apiModel.SpacePolicy) => {
if (spacePolicy === "custom") {
return navigate(generatePath(PATHS.findSpace, { id: baseName(drive.name) }));
return navigate(generatePath(PATHS.drive.editSpacePolicy, { id: baseName(drive.name) }));
} else {
setSpacePolicy(spacePolicy);
}
Expand Down Expand Up @@ -476,7 +476,9 @@ const PartitionsNoContentSelector = ({ drive, toggleAriaLabel }) => {
itemId="add-partition"
description={_("Add another partition or mount an existing one")}
role="menuitem"
onClick={() => navigate(generatePath(PATHS.addPartition, { id: baseName(drive.name) }))}
onClick={() =>
navigate(generatePath(PATHS.drive.partition.add, { id: baseName(drive.name) }))
}
>
<Flex component="span" justifyContent={{ default: "justifyContentSpaceBetween" }}>
<span>{_("Add or use partition")}</span>
Expand All @@ -490,7 +492,7 @@ const PartitionsNoContentSelector = ({ drive, toggleAriaLabel }) => {
const PartitionMenuItem = ({ driveName, mountPath }) => {
const drive = useDrive(driveName);
const partition = drive.getPartition(mountPath);
const editPath = generatePath(PATHS.editPartition, {
const editPath = generatePath(PATHS.drive.partition.edit, {
id: baseName(driveName),
partitionId: encodeURIComponent(mountPath),
});
Expand Down Expand Up @@ -525,7 +527,9 @@ const PartitionsWithContentSelector = ({ drive, toggleAriaLabel }) => {
key="add-partition"
itemId="add-partition"
description={_("Add another partition or mount an existing one")}
onClick={() => navigate(generatePath(PATHS.addPartition, { id: baseName(drive.name) }))}
onClick={() =>
navigate(generatePath(PATHS.drive.partition.add, { id: baseName(drive.name) }))
}
>
<Flex component="span" justifyContent={{ default: "justifyContentSpaceBetween" }}>
<span>{_("Add or use partition")}</span>
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/storage/EncryptionSection.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@ describe("EncryptionSection", () => {
it("renders a link for navigating to encryption settings", () => {
plainRender(<EncryptionSection />);
const editLink = screen.getByRole("link", { name: "Edit" });
expect(editLink).toHaveAttribute("href", STORAGE.encryption);
expect(editLink).toHaveAttribute("href", STORAGE.editEncryption);
});
});
2 changes: 1 addition & 1 deletion web/src/components/storage/EncryptionSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default function EncryptionSection() {
the new file systems, including data, programs, and system files.",
)}
pfCardBodyProps={{ isFilled: true }}
actions={<Link to={STORAGE.encryption}>{_("Edit")}</Link>}
actions={<Link to={STORAGE.editEncryption}>{_("Edit")}</Link>}
>
<Card isCompact isPlain>
<CardBody>
Expand Down
Loading