diff --git a/web/src/components/core/FormValidationError.test.jsx b/web/src/components/core/FormValidationError.test.jsx index e1b6b7e3bd..d9c02744b1 100644 --- a/web/src/components/core/FormValidationError.test.jsx +++ b/web/src/components/core/FormValidationError.test.jsx @@ -1,5 +1,5 @@ /* - * Copyright (c) [2023] SUSE LLC + * Copyright (c) [2023-2026] SUSE LLC * * All Rights Reserved. * @@ -25,10 +25,6 @@ import { screen } from "@testing-library/react"; import { installerRender } from "~/test-utils"; import { FormValidationError } from "~/components/core"; -jest.mock("~/components/product/ProductRegistrationAlert", () => () => ( -
ProductRegistrationAlert Mock
-)); - it("renders nothing when message is null", () => { const { container } = installerRender(); expect(container).toBeEmptyDOMElement(); diff --git a/web/src/components/core/LoginPage.test.tsx b/web/src/components/core/LoginPage.test.tsx index 9463333546..e4f52fd642 100644 --- a/web/src/components/core/LoginPage.test.tsx +++ b/web/src/components/core/LoginPage.test.tsx @@ -32,10 +32,6 @@ let mockLoginError; const mockLoginFn = jest.fn(); -jest.mock("~/components/product/ProductRegistrationAlert", () => () => ( -
ProductRegistrationAlert Mock
-)); - jest.mock("~/components/layout/Header", () => () =>
Header Mock
); jest.mock("~/context/auth", () => ({ diff --git a/web/src/components/core/Page.test.tsx b/web/src/components/core/Page.test.tsx index affcccb0cb..da7c60593c 100644 --- a/web/src/components/core/Page.test.tsx +++ b/web/src/components/core/Page.test.tsx @@ -1,5 +1,5 @@ /* - * Copyright (c) [2023-2025] SUSE LLC + * Copyright (c) [2023-2026] SUSE LLC * * All Rights Reserved. * @@ -22,9 +22,8 @@ import React from "react"; import { screen, within } from "@testing-library/react"; -import { installerRender, mockNavigateFn, mockRoutes, plainRender } from "~/test-utils"; +import { installerRender, mockNavigateFn, plainRender } from "~/test-utils"; import useTrackQueriesRefetch from "~/hooks/use-track-queries-refetch"; -import { PRODUCT, ROOT } from "~/routes/paths"; import { _ } from "~/i18n"; import Page from "./Page"; @@ -36,13 +35,6 @@ jest.mock("~/hooks/use-track-queries-refetch", () => ({ default: jest.fn(), })); -jest.mock("~/components/questions/Questions", () => () =>
Questions Mock
); -jest.mock("~/components/layout/Header", () => () =>
Header Mock
); - -jest.mock("~/components/product/ProductRegistrationAlert", () => () => ( -
ProductRegistrationAlertMock
-)); - jest.mock("~/components/core/ProgressBackdrop", () => () =>
ProgressBackdropMock
); const mockUseTrackQueriesRefetch = jest.mocked(useTrackQueriesRefetch); @@ -130,28 +122,6 @@ describe("Page", () => { const content = screen.getByText("The Content"); expect(content.classList.contains("pf-m-fill")).toBe(true); }); - - it("mounts a ProductRegistrationAlert", () => { - installerRender(); - screen.getByText("ProductRegistrationAlertMock"); - }); - - describe.each([ - ["login", ROOT.login], - ["product selection", PRODUCT.changeProduct], - ["product selection progress", PRODUCT.progress], - ["installation progress", ROOT.installationProgress], - ["installation finished", ROOT.installationFinished], - ])(`but at %s path`, (_, path) => { - beforeEach(() => { - mockRoutes(path); - }); - - it("does not mount ProductRegistrationAlert", () => { - installerRender(); - expect(screen.queryByText("ProductRegistrationAlertMock")).toBeNull(); - }); - }); }); describe("Page.Cancel", () => { diff --git a/web/src/components/core/Page.tsx b/web/src/components/core/Page.tsx index 037887dea4..66c18e193f 100644 --- a/web/src/components/core/Page.tsx +++ b/web/src/components/core/Page.tsx @@ -21,7 +21,7 @@ */ import React, { Suspense, useId } from "react"; -import { Outlet, useLocation, useNavigate } from "react-router"; +import { Outlet, useNavigate } from "react-router"; import Link, { LinkProps } from "~/components/core/Link"; import { Button, @@ -48,13 +48,11 @@ import { import flexStyles from "@patternfly/react-styles/css/utilities/Flex/flex"; import textStyles from "@patternfly/react-styles/css/utilities/Text/text"; import { isEmpty, isObject } from "radashi"; -import { SIDE_PATHS } from "~/routes/paths"; import { _, TranslatedString } from "~/i18n"; import type { ProgressBackdropProps } from "~/components/core/ProgressBackdrop"; import ProgressBackdrop from "~/components/core/ProgressBackdrop"; import Header from "~/components/layout/Header"; import Loading from "~/components/layout/Loading"; -import { ProductRegistrationAlert } from "~/components/product"; import { Questions } from "../questions"; import type { BreadcrumbProps } from "~/components/core/Breadcrumbs"; @@ -295,12 +293,8 @@ const Submit = ({ children, ...props }: SubmitActionProps) => { * @see [Patternfly Page/PageSection](https://www.patternfly.org/components/page#pagesection) */ const Content = ({ children, ...pageSectionProps }: PageSectionProps) => { - const location = useLocation(); - const mountRegistrationAlert = !SIDE_PATHS.includes(location.pathname); - return ( - {mountRegistrationAlert && } {children} ); diff --git a/web/src/components/l10n/KeyboardSelection.test.tsx b/web/src/components/l10n/KeyboardSelection.test.tsx index a2cf616325..1cd99fbee2 100644 --- a/web/src/components/l10n/KeyboardSelection.test.tsx +++ b/web/src/components/l10n/KeyboardSelection.test.tsx @@ -34,10 +34,6 @@ const keymaps: Keymap[] = [ { id: "es", description: "Spanish" }, ]; -jest.mock("~/components/product/ProductRegistrationAlert", () => () => ( -
ProductRegistrationAlert Mock
-)); - jest.mock("react-router", () => ({ ...jest.requireActual("react-router"), useNavigate: () => mockNavigateFn, diff --git a/web/src/components/l10n/L10nPage.test.tsx b/web/src/components/l10n/L10nPage.test.tsx index 2571fb6a82..0e1d2a98c5 100644 --- a/web/src/components/l10n/L10nPage.test.tsx +++ b/web/src/components/l10n/L10nPage.test.tsx @@ -46,10 +46,6 @@ const timezones: Timezone[] = [ { id: "Europe/Madrid", parts: ["Europe", "Madrid"], country: "Spain", utcOffset: 120 }, ]; -jest.mock("~/components/product/ProductRegistrationAlert", () => () => ( -
ProductRegistrationAlert Mock
-)); - jest.mock("~/components/core/InstallerOptions", () => () =>
InstallerOptions Mock
); jest.mock("~/hooks/model/system/l10n", () => ({ diff --git a/web/src/components/l10n/LocaleSelection.test.tsx b/web/src/components/l10n/LocaleSelection.test.tsx index 2d803c5cce..3614bdd0e3 100644 --- a/web/src/components/l10n/LocaleSelection.test.tsx +++ b/web/src/components/l10n/LocaleSelection.test.tsx @@ -34,10 +34,6 @@ const locales: Locale[] = [ { id: "es_ES.UTF-8", language: "Spanish", territory: "Spain" }, ]; -jest.mock("~/components/product/ProductRegistrationAlert", () => () => ( -
ProductRegistrationAlert Mock
-)); - jest.mock("react-router", () => ({ ...jest.requireActual("react-router"), useNavigate: () => mockNavigateFn, diff --git a/web/src/components/l10n/TimezoneSelection.test.tsx b/web/src/components/l10n/TimezoneSelection.test.tsx index d4d87acd16..5b3df2441d 100644 --- a/web/src/components/l10n/TimezoneSelection.test.tsx +++ b/web/src/components/l10n/TimezoneSelection.test.tsx @@ -46,10 +46,6 @@ const timezones: Timezone[] = [ }, ]; -jest.mock("~/components/product/ProductRegistrationAlert", () => () => ( -
ProductRegistrationAlert Mock
-)); - jest.mock("react-router", () => ({ ...jest.requireActual("react-router"), useNavigate: () => mockNavigateFn, diff --git a/web/src/components/network/BindingSettingsForm.test.tsx b/web/src/components/network/BindingSettingsForm.test.tsx index aeeee84f9e..9dfc887c76 100644 --- a/web/src/components/network/BindingSettingsForm.test.tsx +++ b/web/src/components/network/BindingSettingsForm.test.tsx @@ -1,5 +1,5 @@ /* - * Copyright (c) [2025] SUSE LLC + * Copyright (c) [2025-2026] SUSE LLC * * All Rights Reserved. * @@ -55,10 +55,6 @@ let mockConnection: Connection = new Connection("Network 1", { const mockMutation = jest.fn(() => Promise.resolve()); -jest.mock("~/components/product/ProductRegistrationAlert", () => () => ( -
ProductRegistrationAlert Mock
-)); - jest.mock("~/hooks/model/system/network", () => ({ ...jest.requireActual("~/hooks/model/system/network"), useDevices: () => [mockDevice], diff --git a/web/src/components/network/NetworkPage.test.tsx b/web/src/components/network/NetworkPage.test.tsx index 2ab93f9011..071d7fd759 100644 --- a/web/src/components/network/NetworkPage.test.tsx +++ b/web/src/components/network/NetworkPage.test.tsx @@ -1,5 +1,5 @@ /* - * Copyright (c) [2023-2024] SUSE LLC + * Copyright (c) [2023-2026] SUSE LLC * * All Rights Reserved. * @@ -25,11 +25,6 @@ import { screen } from "@testing-library/react"; import { installerRender } from "~/test-utils"; import NetworkPage from "~/components/network/NetworkPage"; -jest.mock( - "~/components/product/ProductRegistrationAlert", - () => () => -(
ProductRegistrationAlert Mock
), -); - jest.mock("~/components/network/WifiNetworksList", () => () =>
WifiNetworksList Mock
); jest.mock("~/components/network/WiredConnectionsList", () => () => ( diff --git a/web/src/components/network/WiredConnectionPage.test.tsx b/web/src/components/network/WiredConnectionPage.test.tsx index 63c6e4a834..fe2979580c 100644 --- a/web/src/components/network/WiredConnectionPage.test.tsx +++ b/web/src/components/network/WiredConnectionPage.test.tsx @@ -1,5 +1,5 @@ /* - * Copyright (c) [2025] SUSE LLC + * Copyright (c) [2025-2026] SUSE LLC * * All Rights Reserved. * @@ -30,11 +30,6 @@ const mockConnection: Connection = new Connection("Network 1", { state: ConnectionState.activated, }); -jest.mock( - "~/components/product/ProductRegistrationAlert", - () => () => -(
ProductRegistrationAlert Mock
), -); - jest.mock("~/components/network/WiredConnectionDetails", () => () => (
WiredConnectionDetails Mock
)); diff --git a/web/src/components/product/ProductRegistrationAlert.test.tsx b/web/src/components/product/ProductRegistrationAlert.test.tsx deleted file mode 100644 index ed09292b7e..0000000000 --- a/web/src/components/product/ProductRegistrationAlert.test.tsx +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (c) [2024-2026] SUSE LLC - * - * All Rights Reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the Free - * Software Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, contact SUSE LLC. - * - * To contact SUSE LLC about this file by physical or electronic mail, you may - * find current contact information at www.suse.com. - */ - -import React from "react"; -import { screen } from "@testing-library/react"; -import { installerRender, mockRoutes } from "~/test-utils"; -import { useSystem } from "~/hooks/model/system"; -import { useIssues } from "~/hooks/model/issue"; -import { useProductInfo } from "~/hooks/model/config/product"; -import { Issue } from "~/model/issue"; -import { System } from "~/model/system/network"; -import { Product } from "~/types/software"; -import { PRODUCT, REGISTRATION, ROOT } from "~/routes/paths"; -import ProductRegistrationAlert from "./ProductRegistrationAlert"; - -const tw: Product = { - id: "Tumbleweed", - name: "openSUSE Tumbleweed", - registration: false, -}; - -const sle: Product = { - id: "sle", - name: "SLE", - registration: true, -}; - -const network: System = { - connections: [], - devices: [], - state: { - connectivity: true, - copyNetwork: true, - networkingEnabled: true, - wirelessEnabled: true, - }, - accessPoints: [], -}; - -const mockSelectedProduct: jest.Mock = jest.fn(); -const mockIssues: jest.Mock = jest.fn(); - -jest.mock("~/hooks/model/system", () => ({ - ...jest.requireActual("~/hooks/model/system"), - useSystem: (): ReturnType => ({ products: [tw, sle], network }), -})); - -jest.mock("~/hooks/model/config/product", () => ({ - ...jest.requireActual("~/hooks/model/config/product"), - useProductInfo: (): ReturnType => mockSelectedProduct(), -})); - -jest.mock("~/hooks/model/issue", () => ({ - ...jest.requireActual("~/hooks/model/issue"), - useIssues: (): ReturnType => mockIssues(), -})); - -const registrationIssue: Issue = { - description: "Product must be registered", - details: "", - class: "missing_registration", - scope: "storage", -}; - -const rendersNothingInSomePaths = () => { - describe.each([ - ["login", ROOT.login], - ["product selection", PRODUCT.changeProduct], - ["product selection progress", PRODUCT.progress], - ["installation progress", ROOT.installationProgress], - ["installation finished", ROOT.installationFinished], - ])(`but at %s path`, (_, path) => { - beforeEach(() => { - mockRoutes(path); - }); - - it("renders nothing", () => { - const { container } = installerRender(); - expect(container).toBeEmptyDOMElement(); - }); - }); -}; - -describe("ProductRegistrationAlert", () => { - describe("when the registration is missing", () => { - beforeEach(() => { - mockSelectedProduct.mockReturnValue(sle); - mockIssues.mockReturnValue([registrationIssue]); - }); - - rendersNothingInSomePaths(); - - it("renders an alert warning about registration required", () => { - installerRender(); - screen.getByRole("heading", { - name: /Warning alert:.*must be registered/, - }); - const link = screen.getByRole("link"); - expect(link).toHaveAttribute("href", REGISTRATION.root); - }); - - describe("but at registration path already", () => { - beforeEach(() => { - mockRoutes(REGISTRATION.root); - }); - - it("does not render the link to registration", () => { - installerRender(); - screen.getByRole("heading", { - name: /Warning alert:.*must be registered/, - }); - expect(screen.queryAllByRole("link")).toEqual([]); - }); - }); - }); - - describe("when the registration is not needed", () => { - beforeEach(() => { - mockSelectedProduct.mockReturnValue(tw); - mockIssues.mockReturnValue([]); - }); - - it("renders nothing", () => { - const { container } = installerRender(); - expect(container).toBeEmptyDOMElement(); - }); - }); -}); diff --git a/web/src/components/product/ProductRegistrationAlert.tsx b/web/src/components/product/ProductRegistrationAlert.tsx deleted file mode 100644 index d3aa5bfc81..0000000000 --- a/web/src/components/product/ProductRegistrationAlert.tsx +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) [2023-2025] SUSE LLC - * - * All Rights Reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the Free - * Software Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, contact SUSE LLC. - * - * To contact SUSE LLC about this file by physical or electronic mail, you may - * find current contact information at www.suse.com. - */ - -import React from "react"; -import { Alert } from "@patternfly/react-core"; -import { useLocation } from "react-router"; -import { Link } from "~/components/core"; -import { REGISTRATION, SIDE_PATHS } from "~/routes/paths"; -import { _ } from "~/i18n"; -import { sprintf } from "sprintf-js"; -import { useIssues } from "~/hooks/model/issue"; -import { useProductInfo } from "~/hooks/model/config/product"; - -const LinkToRegistration = ({ text }: { text: string }) => { - const location = useLocation(); - - if (location.pathname === REGISTRATION.root) return text; - - return ( - - {text} - - ); -}; - -export default function ProductRegistrationAlert() { - const location = useLocation(); - const product = useProductInfo(); - // FIXME: what scope reports these issues with the new API? - const issues = useIssues("product"); - const registrationRequired = issues?.find((i) => i.class === "missing_registration"); - - // NOTE: it shouldn't be mounted in these paths, but let's prevent rendering - // if so just in case. - if (SIDE_PATHS.includes(location.pathname)) return; - if (!registrationRequired) return; - - const [textStart, text, textEnd] = sprintf(_("%s [must be registered]."), product.name).split( - /[[\]]/, - ); - - return ( - - {textStart} - - {textEnd} - - } - /> - ); -} diff --git a/web/src/components/product/ProductRegistrationPage.test.tsx b/web/src/components/product/ProductRegistrationPage.test.tsx index 43fae52ada..f9b0163ef6 100644 --- a/web/src/components/product/ProductRegistrationPage.test.tsx +++ b/web/src/components/product/ProductRegistrationPage.test.tsx @@ -46,10 +46,6 @@ let addonInfoMock: AddonInfo[] = []; let registeredAddonInfoMock: RegisteredAddonInfo[] = []; const registerMutationMock = jest.fn(); -jest.mock("~/components/product/ProductRegistrationAlert", () => () => ( -
ProductRegistrationAlert Mock
-)); - jest.mock("~/queries/software", () => ({ ...jest.requireActual("~/queries/software"), useRegisterMutation: () => ({ mutate: registerMutationMock }), diff --git a/web/src/components/product/ProductRegistrationPage.tsx b/web/src/components/product/ProductRegistrationPage.tsx index 769cb5ea81..6e5333bfc0 100644 --- a/web/src/components/product/ProductRegistrationPage.tsx +++ b/web/src/components/product/ProductRegistrationPage.tsx @@ -393,7 +393,7 @@ const HostnameAlert = () => { ); return ( - + {descStart} {link} {descEnd} ); diff --git a/web/src/components/product/ProductSelectionPage.test.tsx b/web/src/components/product/ProductSelectionPage.test.tsx index a2bc1b013a..ecd2ac6b12 100644 --- a/web/src/components/product/ProductSelectionPage.test.tsx +++ b/web/src/components/product/ProductSelectionPage.test.tsx @@ -27,10 +27,6 @@ import { useSystem } from "~/hooks/model/system"; import { Product } from "~/types/software"; import ProductSelectionPage from "./ProductSelectionPage"; -jest.mock("~/components/product/ProductRegistrationAlert", () => () => ( -
ProductRegistrationAlert Mock
-)); - const tumbleweed: Product = { id: "Tumbleweed", name: "openSUSE Tumbleweed", diff --git a/web/src/components/product/index.ts b/web/src/components/product/index.ts index 1e5e4f9676..5ddad57168 100644 --- a/web/src/components/product/index.ts +++ b/web/src/components/product/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) [2023-2025] SUSE LLC + * Copyright (c) [2023-2026] SUSE LLC * * All Rights Reserved. * @@ -23,5 +23,4 @@ export { default as ProductSelectionPage } from "./ProductSelectionPage"; export { default as ProductSelectionProgress } from "./ProductSelectionProgress"; export { default as ProductRegistrationPage } from "./ProductRegistrationPage"; -export { default as ProductRegistrationAlert } from "./ProductRegistrationAlert"; export { default as LicenseDialog } from "./LicenseDialog"; diff --git a/web/src/components/software/SoftwareConflictsPage.test.tsx b/web/src/components/software/SoftwareConflictsPage.test.tsx index c1b73b1483..0637d08569 100644 --- a/web/src/components/software/SoftwareConflictsPage.test.tsx +++ b/web/src/components/software/SoftwareConflictsPage.test.tsx @@ -96,9 +96,6 @@ const mockSolveConflict = jest.fn(); jest.mock("~/components/layout/Header", () => () =>
Header Mock
); jest.mock("~/components/questions/Questions", () => () =>
Questions Mock
); -jest.mock("~/components/product/ProductRegistrationAlert", () => () => ( -
ProductRegistrationAlert Mock
-)); jest.mock("~/queries/software", () => ({ ...jest.requireActual("~/queries/software"), diff --git a/web/src/components/software/SoftwarePage.test.tsx b/web/src/components/software/SoftwarePage.test.tsx index d21fb5e6f8..b22cd366eb 100644 --- a/web/src/components/software/SoftwarePage.test.tsx +++ b/web/src/components/software/SoftwarePage.test.tsx @@ -30,10 +30,6 @@ import SoftwarePage from "./SoftwarePage"; jest.mock("~/components/layout/Header", () => () =>
Header Mock
); jest.mock("~/components/questions/Questions", () => () =>
Questions Mock
); -jest.mock("~/components/product/ProductRegistrationAlert", () => () => ( -
ProductRegistrationAlert Mock
-)); - jest.mock("~/hooks/model/issue", () => ({ useIssues: () => [], })); diff --git a/web/src/components/software/SoftwarePatternsSelection.test.tsx b/web/src/components/software/SoftwarePatternsSelection.test.tsx index 6f3ad48f3e..37a2ed6366 100644 --- a/web/src/components/software/SoftwarePatternsSelection.test.tsx +++ b/web/src/components/software/SoftwarePatternsSelection.test.tsx @@ -1,5 +1,5 @@ /* - * Copyright (c) [2023-2024] SUSE LLC + * Copyright (c) [2023-2026] SUSE LLC * * All Rights Reserved. * @@ -42,10 +42,6 @@ jest.mock("~/api", () => ({ patchConfig: jest.fn(), })); -jest.mock("~/components/product/ProductRegistrationAlert", () => () => ( -
ProductRegistrationAlert Mock
-)); - jest.mock("~/queries/software", () => ({ useConfigMutation: () => onConfigMutationMock, })); diff --git a/web/src/components/storage/BootSelectionPage.test.tsx b/web/src/components/storage/BootSelectionPage.test.tsx index c77d9f948f..dd8acfe8b9 100644 --- a/web/src/components/storage/BootSelectionPage.test.tsx +++ b/web/src/components/storage/BootSelectionPage.test.tsx @@ -1,5 +1,5 @@ /* - * Copyright (c) [2024-2025] SUSE LLC + * Copyright (c) [2024-2026] SUSE LLC * * All Rights Reserved. * @@ -25,12 +25,6 @@ import { screen, waitFor, within } from "@testing-library/react"; import { installerRender } from "~/test-utils"; import BootSelectionPage from "./BootSelectionPage"; -// FIXME: drop this mock once a better solution for dealing with -// ProductRegistrationAlert, which uses a query with suspense, -jest.mock("~/components/product/ProductRegistrationAlert", () => () => ( -
ProductRegistrationAlert Mock
-)); - const mockDevices = [ { sid: 1, diff --git a/web/src/components/storage/EncryptionSettingsPage.test.tsx b/web/src/components/storage/EncryptionSettingsPage.test.tsx index 5f41a3b942..6fa6c64af9 100644 --- a/web/src/components/storage/EncryptionSettingsPage.test.tsx +++ b/web/src/components/storage/EncryptionSettingsPage.test.tsx @@ -1,5 +1,5 @@ /* - * Copyright (c) [2024-2025] SUSE LLC + * Copyright (c) [2024-2026] SUSE LLC * * All Rights Reserved. * @@ -44,10 +44,6 @@ const mockTpmConfig: ConfigModel.Config = { const mockNoEncryptionConfig: ConfigModel.Config = {}; -jest.mock("~/components/product/ProductRegistrationAlert", () => () => ( -
registration alert
-)); - jest.mock("~/hooks/model/system", () => ({ useSystem: () => ({ l10n: { diff --git a/web/src/components/storage/FormattableDevicePage.test.tsx b/web/src/components/storage/FormattableDevicePage.test.tsx index c0fa6f24d8..caa48f6516 100644 --- a/web/src/components/storage/FormattableDevicePage.test.tsx +++ b/web/src/components/storage/FormattableDevicePage.test.tsx @@ -1,5 +1,5 @@ /* - * Copyright (c) [2025] SUSE LLC + * Copyright (c) [2025-2026] SUSE LLC * * All Rights Reserved. * @@ -87,10 +87,6 @@ jest.mock("~/hooks/model/storage/config-model", () => ({ useSetFilesystem: () => mockSetFilesystem, })); -jest.mock("~/components/product/ProductRegistrationAlert", () => () => ( -
registration alert
-)); - beforeEach(() => { mockParams({ collection: "drives", index: "0" }); mockUsePartitionable.mockReturnValue(sdaModel); diff --git a/web/src/components/storage/LvmPage.test.tsx b/web/src/components/storage/LvmPage.test.tsx index b00cef3df9..569e213ef7 100644 --- a/web/src/components/storage/LvmPage.test.tsx +++ b/web/src/components/storage/LvmPage.test.tsx @@ -1,5 +1,5 @@ /* - * Copyright (c) [2025] SUSE LLC + * Copyright (c) [2025-2026] SUSE LLC * * All Rights Reserved. * @@ -143,10 +143,6 @@ jest.mock("~/hooks/model/storage/config-model", () => ({ useEditVolumeGroup: () => mockEditVolumeGroup, })); -jest.mock("~/components/product/ProductRegistrationAlert", () => () => ( -
registration alert
-)); - describe("LvmPage", () => { beforeEach(() => { jest.clearAllMocks(); diff --git a/web/src/components/storage/PartitionPage.test.tsx b/web/src/components/storage/PartitionPage.test.tsx index a182c7ab8b..8f9090094b 100644 --- a/web/src/components/storage/PartitionPage.test.tsx +++ b/web/src/components/storage/PartitionPage.test.tsx @@ -1,5 +1,5 @@ /* - * Copyright (c) [2025] SUSE LLC + * Copyright (c) [2025-2026] SUSE LLC * * All Rights Reserved. * @@ -30,9 +30,6 @@ import { gib } from "./utils"; jest.mock("./ProposalResultSection", () => () =>
result section
); jest.mock("./ProposalTransactionalInfo", () => () =>
transactional info
); -jest.mock("~/components/product/ProductRegistrationAlert", () => () => ( -
registration alert
-)); const sda1: Storage.Device = { sid: 69, diff --git a/web/src/components/storage/ProposalPage.test.tsx b/web/src/components/storage/ProposalPage.test.tsx index 342ed8a246..e6821f8e30 100644 --- a/web/src/components/storage/ProposalPage.test.tsx +++ b/web/src/components/storage/ProposalPage.test.tsx @@ -1,5 +1,5 @@ /* - * Copyright (c) [2022-2025] SUSE LLC + * Copyright (c) [2022-2026] SUSE LLC * * All Rights Reserved. * @@ -110,9 +110,6 @@ jest.mock("./ProposalResultSection", () => () =>
result
); jest.mock("./ConfigEditor", () => () =>
installation devices
); jest.mock("./EncryptionSection", () => () =>
encryption section
); jest.mock("./BootSection", () => () =>
boot section
); -jest.mock("~/components/product/ProductRegistrationAlert", () => () => ( -
registration alert
-)); beforeEach(() => { mockUseReset.mockReturnValue(jest.fn()); diff --git a/web/src/components/system/HostnamePage.test.tsx b/web/src/components/system/HostnamePage.test.tsx index 0e5fb825eb..fb6676ce6b 100644 --- a/web/src/components/system/HostnamePage.test.tsx +++ b/web/src/components/system/HostnamePage.test.tsx @@ -1,5 +1,5 @@ /* - * Copyright (c) [2025] SUSE LLC + * Copyright (c) [2025-2026] SUSE LLC * * All Rights Reserved. * @@ -28,10 +28,6 @@ import HostnamePage from "./HostnamePage"; let mockStaticHostname: string; const mockPatchConfig = jest.fn(); -jest.mock("~/components/product/ProductRegistrationAlert", () => () => ( -
ProductRegistrationAlert Mock
-)); - jest.mock("~/api", () => ({ ...jest.requireActual("~/api"), patchConfig: (config) => mockPatchConfig(config), diff --git a/web/src/components/users/FirstUserForm.test.tsx b/web/src/components/users/FirstUserForm.test.tsx index f5b0a009ee..a5ce036844 100644 --- a/web/src/components/users/FirstUserForm.test.tsx +++ b/web/src/components/users/FirstUserForm.test.tsx @@ -1,5 +1,5 @@ /* - * Copyright (c) [2025] SUSE LLC + * Copyright (c) [2025-2026] SUSE LLC * * All Rights Reserved. * @@ -31,10 +31,6 @@ let mockPassword: string; let mockHashedPassword: boolean; const mockFirstUserMutation = jest.fn().mockResolvedValue(true); -jest.mock("~/components/product/ProductRegistrationAlert", () => () => ( -
ProductRegistrationAlert Mock
-)); - jest.mock("~/components/users/PasswordCheck", () => () =>
PasswordCheck Mock
); jest.mock("~/queries/users", () => ({ diff --git a/web/src/components/users/RootUserForm.test.tsx b/web/src/components/users/RootUserForm.test.tsx index 6ba0d3d13f..de186bdc15 100644 --- a/web/src/components/users/RootUserForm.test.tsx +++ b/web/src/components/users/RootUserForm.test.tsx @@ -1,5 +1,5 @@ /* - * Copyright (c) [2025] SUSE LLC + * Copyright (c) [2025-2026] SUSE LLC * * All Rights Reserved. * @@ -30,10 +30,6 @@ let mockPublicKey: string; let mockHashedPassword: boolean; const mockRootUserMutation = jest.fn().mockResolvedValue(true); -jest.mock("~/components/product/ProductRegistrationAlert", () => () => ( -
ProductRegistrationAlert Mock
-)); - jest.mock("~/components/users/PasswordCheck", () => () =>
PasswordCheck Mock
); jest.mock("~/queries/users", () => ({