From 3d73c2dc4eae2535b1bc18242fc307a3ba4f793b Mon Sep 17 00:00:00 2001 From: Ahmet Can Buyukyilmaz Date: Thu, 9 Jan 2025 19:05:46 +0300 Subject: [PATCH] fix(images): proper title and variable naming fixes https://github.com/canonical/maas-ui/pull/5574#discussion_r1908525955 https://github.com/canonical/maas-ui/pull/5574#discussion_r1908527209 https://github.com/canonical/maas-ui/pull/5574#discussion_r1908559421 https://github.com/canonical/maas-ui/pull/5574#discussion_r1908562424 --- .../SMImagesTable/DeleteImages/DeleteImages.tsx | 1 - .../DownloadImages/DownloadImages.test.tsx | 14 ++++++-------- .../DownloadImages/DownloadImages.tsx | 4 ++++ .../ImagesTableHeader/ImagesTableHeader.tsx | 4 ---- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/app/images/components/SMImagesTable/DeleteImages/DeleteImages.tsx b/src/app/images/components/SMImagesTable/DeleteImages/DeleteImages.tsx index 80f80106be..2cede969ab 100644 --- a/src/app/images/components/SMImagesTable/DeleteImages/DeleteImages.tsx +++ b/src/app/images/components/SMImagesTable/DeleteImages/DeleteImages.tsx @@ -53,7 +53,6 @@ const DeleteImages = ({ message={ <> Are you sure you want to delete {imagesCountText}? - This will also affect connected MAAS sites. } modelType="image" diff --git a/src/app/images/components/SMImagesTable/DownloadImages/DownloadImages.test.tsx b/src/app/images/components/SMImagesTable/DownloadImages/DownloadImages.test.tsx index 6f1b12968b..c8264e9d7f 100644 --- a/src/app/images/components/SMImagesTable/DownloadImages/DownloadImages.test.tsx +++ b/src/app/images/components/SMImagesTable/DownloadImages/DownloadImages.test.tsx @@ -79,21 +79,19 @@ describe("DownloadImages", () => { state, }); - const row_16_04_LTS = within( + const rowUbuntu = within( screen.getByRole("row", { name: "16.04 LTS" }) ).getAllByRole("combobox"); - expect(row_16_04_LTS).toHaveLength(1); - expect( - within(row_16_04_LTS[0]).getByText("amd64, i386") - ).toBeInTheDocument(); + expect(rowUbuntu).toHaveLength(1); + expect(within(rowUbuntu[0]).getByText("amd64, i386")).toBeInTheDocument(); - const row_centos_7 = within( + const rowOther = within( screen.getByRole("row", { name: "centos70" }) ).getAllByRole("combobox"); - expect(row_centos_7).toHaveLength(1); - expect(within(row_centos_7[0]).getByText("amd64")).toBeInTheDocument(); + expect(rowOther).toHaveLength(1); + expect(within(rowOther[0]).getByText("amd64")).toBeInTheDocument(); }); it("can dispatch an action to save ubuntu images", async () => { diff --git a/src/app/images/components/SMImagesTable/DownloadImages/DownloadImages.tsx b/src/app/images/components/SMImagesTable/DownloadImages/DownloadImages.tsx index 966a580943..671ef932ca 100644 --- a/src/app/images/components/SMImagesTable/DownloadImages/DownloadImages.tsx +++ b/src/app/images/components/SMImagesTable/DownloadImages/DownloadImages.tsx @@ -202,6 +202,10 @@ const DownloadImages: React.FC = () => { return ( <> +

+ Select images to be imported and kept in sync daily. Images will be + available for deploying to machines managed by MAAS. +

{tooManySources && ( More than one image source exists. The UI does not support updating diff --git a/src/app/images/components/SMImagesTable/ImagesTableHeader/ImagesTableHeader.tsx b/src/app/images/components/SMImagesTable/ImagesTableHeader/ImagesTableHeader.tsx index 5441bd004d..41be096cf4 100644 --- a/src/app/images/components/SMImagesTable/ImagesTableHeader/ImagesTableHeader.tsx +++ b/src/app/images/components/SMImagesTable/ImagesTableHeader/ImagesTableHeader.tsx @@ -134,10 +134,6 @@ const ImagesTableHeader = ({ -

- Select images to be imported and kept in sync daily. Images will be - available for deploying to machines managed by MAAS. -


);