From 22147a5b464a532dd34772a0737a51d0308e05e3 Mon Sep 17 00:00:00 2001 From: jacobshandling <61553566+jacobshandling@users.noreply.github.com> Date: Mon, 28 Jul 2025 06:07:21 -0700 Subject: [PATCH] FE: Add optional label to `InventoryVersions` (#31302) --- .../SoftwareUpdateModal.tests.tsx | 4 +-- .../SoftwareUpdateModal.tsx | 11 +----- .../Software/SoftwareUpdateModal/_styles.scss | 6 ---- .../InventoryVersions/InventoryVersions.tsx | 35 ++++++++++++------- .../components/InventoryVersions/_styles.scss | 8 ++++- 5 files changed, 33 insertions(+), 31 deletions(-) diff --git a/frontend/pages/hosts/details/cards/Software/SoftwareUpdateModal/SoftwareUpdateModal.tests.tsx b/frontend/pages/hosts/details/cards/Software/SoftwareUpdateModal/SoftwareUpdateModal.tests.tsx index 2622e875d4..66325b34ff 100644 --- a/frontend/pages/hosts/details/cards/Software/SoftwareUpdateModal/SoftwareUpdateModal.tests.tsx +++ b/frontend/pages/hosts/details/cards/Software/SoftwareUpdateModal/SoftwareUpdateModal.tests.tsx @@ -129,7 +129,7 @@ describe("SoftwareUpdateModal", () => { expect(screen.getByText("Current version:")).toBeInTheDocument(); }); - it("renders 'Current Versions' if more than one installed", () => { + it("renders 'Current versions' if more than one installed", () => { const mockSoftware = createMockHostSoftware({ installed_versions: [ { @@ -156,7 +156,7 @@ describe("SoftwareUpdateModal", () => { onUpdate={noop} /> ); - expect(screen.getByText("Current Versions:")).toBeInTheDocument(); + expect(screen.getByText("Current versions:")).toBeInTheDocument(); }); // Shouldn't happen, unless tarballs or weird edge case diff --git a/frontend/pages/hosts/details/cards/Software/SoftwareUpdateModal/SoftwareUpdateModal.tsx b/frontend/pages/hosts/details/cards/Software/SoftwareUpdateModal/SoftwareUpdateModal.tsx index f9640de226..4aee7649e7 100644 --- a/frontend/pages/hosts/details/cards/Software/SoftwareUpdateModal/SoftwareUpdateModal.tsx +++ b/frontend/pages/hosts/details/cards/Software/SoftwareUpdateModal/SoftwareUpdateModal.tsx @@ -116,16 +116,7 @@ const SoftwareUpdateModal = ({ installerName={installerName} installerVersion={installerVersion} /> - {showCurrentVersions && ( -