From f3b94e3f603d2c38fdd9443c862f421831ab567b Mon Sep 17 00:00:00 2001 From: Christiaan Scheermeijer Date: Tue, 7 Jan 2025 16:19:06 +0100 Subject: [PATCH 1/4] refactor(account): move user screen routes to app routes --- packages/ui-react/src/pages/User/User.tsx | 54 +- .../User/__snapshots__/User.test.tsx.snap | 558 +----------------- .../AccountSection.module.scss} | 0 .../AccountSection/AccountSection.test.tsx} | 9 +- .../AccountSection/AccountSection.tsx} | 44 +- .../__snapshots__/Account.test.tsx.snap | 0 .../AccountSection.test.tsx.snap | 206 +++++++ .../FavoritesSection/FavoritesSection.tsx | 50 ++ .../PaymentsSection/PaymentsSection.tsx} | 20 +- .../src/containers/AppRoutes/AppRoutes.tsx | 25 +- 10 files changed, 323 insertions(+), 643 deletions(-) rename packages/ui-react/src/{components/Account/Account.module.scss => pages/User/sections/AccountSection/AccountSection.module.scss} (100%) rename packages/ui-react/src/{components/Account/Account.test.tsx => pages/User/sections/AccountSection/AccountSection.test.tsx} (72%) rename packages/ui-react/src/{components/Account/Account.tsx => pages/User/sections/AccountSection/AccountSection.tsx} (93%) rename packages/ui-react/src/{components/Account => pages/User/sections/AccountSection}/__snapshots__/Account.test.tsx.snap (100%) create mode 100644 packages/ui-react/src/pages/User/sections/AccountSection/__snapshots__/AccountSection.test.tsx.snap create mode 100644 packages/ui-react/src/pages/User/sections/FavoritesSection/FavoritesSection.tsx rename packages/ui-react/src/{containers/PaymentContainer/PaymentContainer.tsx => pages/User/sections/PaymentsSection/PaymentsSection.tsx} (90%) diff --git a/packages/ui-react/src/pages/User/User.tsx b/packages/ui-react/src/pages/User/User.tsx index f93196e3a..0ee19f4b2 100644 --- a/packages/ui-react/src/pages/User/User.tsx +++ b/packages/ui-react/src/pages/User/User.tsx @@ -1,11 +1,10 @@ -import { useCallback, useEffect, useState } from 'react'; +import { useCallback, useEffect } from 'react'; import { useTranslation } from 'react-i18next'; -import { Navigate, Route, Routes, useNavigate } from 'react-router-dom'; +import { useNavigate } from 'react-router-dom'; import { shallow } from '@jwp/ott-common/src/utils/compare'; import { getModule } from '@jwp/ott-common/src/modules/container'; import { useAccountStore } from '@jwp/ott-common/src/stores/AccountStore'; import { useConfigStore } from '@jwp/ott-common/src/stores/ConfigStore'; -import FavoritesController from '@jwp/ott-common/src/controllers/FavoritesController'; import AccountController from '@jwp/ott-common/src/controllers/AccountController'; import { ACCESS_MODEL } from '@jwp/ott-common/src/constants'; import useBreakpoint, { Breakpoint } from '@jwp/ott-ui-react/src/hooks/useBreakpoint'; @@ -14,20 +13,15 @@ import BalanceWallet from '@jwp/ott-theme/assets/icons/balance_wallet.svg?react' import Exit from '@jwp/ott-theme/assets/icons/exit.svg?react'; import Favorite from '@jwp/ott-theme/assets/icons/favorite.svg?react'; import { RELATIVE_PATH_USER_ACCOUNT, RELATIVE_PATH_USER_FAVORITES, RELATIVE_PATH_USER_PAYMENTS } from '@jwp/ott-common/src/paths'; -import { useFavoritesStore } from '@jwp/ott-common/src/stores/FavoritesStore'; +import { Outlet } from 'react-router'; -import AccountComponent from '../../components/Account/Account'; import Button from '../../components/Button/Button'; -import ConfirmationDialog from '../../components/ConfirmationDialog/ConfirmationDialog'; -import Favorites from '../../components/Favorites/Favorites'; import LoadingOverlay from '../../components/LoadingOverlay/LoadingOverlay'; -import PaymentContainer from '../../containers/PaymentContainer/PaymentContainer'; import Icon from '../../components/Icon/Icon'; import styles from './User.module.scss'; const User = (): JSX.Element => { - const favoritesController = getModule(FavoritesController); const accountController = getModule(AccountController); const { accessModel, favoritesList } = useConfigStore( @@ -40,12 +34,9 @@ const User = (): JSX.Element => { const navigate = useNavigate(); const { t } = useTranslation('user'); const breakpoint = useBreakpoint(); - const [clearFavoritesOpen, setClearFavoritesOpen] = useState(false); const isLargeScreen = breakpoint > Breakpoint.md; - const { user: customer, subscription, loading } = useAccountStore(); - const { canUpdateEmail } = accountController.getFeatures(); - const favorites = useFavoritesStore((state) => state.getPlaylist()); + const { user: customer, loading } = useAccountStore(); const onLogout = useCallback(async () => { // Empty customer on a user page leads to navigate (code bellow), so we don't repeat it here @@ -114,42 +105,7 @@ const User = (): JSX.Element => { )}
- - } - /> - {favoritesList && ( - - setClearFavoritesOpen(true)} - accessModel={accessModel} - hasSubscription={!!subscription} - /> - { - await favoritesController.clear(); - setClearFavoritesOpen(false); - }} - onClose={() => setClearFavoritesOpen(false)} - /> - - } - /> - )} - : } - /> - } /> - +
); diff --git a/packages/ui-react/src/pages/User/__snapshots__/User.test.tsx.snap b/packages/ui-react/src/pages/User/__snapshots__/User.test.tsx.snap index 4800c39e4..4e79f638d 100644 --- a/packages/ui-react/src/pages/User/__snapshots__/User.test.tsx.snap +++ b/packages/ui-react/src/pages/User/__snapshots__/User.test.tsx.snap @@ -92,186 +92,7 @@ exports[`User Component tests > Account Page 1`] = `
-

- nav.account -

-
-
-

- account.about_you -

-
-
-
- - -
-
- - -
-
-
- -
-
-
-
-

- account.email -

-
-
-
- - -
-
-
-
-
-
-

- account.security -

-
-
-
- -
-
-
-
-

- account.terms_and_tracking -

-
- -
-
-
+ /> `; @@ -392,165 +213,7 @@ exports[`User Component tests > Favorites Page 1`] = `
-
-
-

- favorites.title -

- -
-
- -
-
-
+ /> `; @@ -647,222 +310,7 @@ exports[`User Component tests > Payments Page 1`] = `
-

- nav.payments -

-
-
-

- user:payment.subscription_details -

-
-
-

- - user:payment.annual_subscription - - -
- user:payment.next_billing_date_on -

-

- - $199.99 - - - / - account:periods.year - -

-
- -
-
-
-

- user:payment.payment_method -

-
-
-
- - -
-
-
- - -
-
- - -
-
- -
-
-
-
-

- user:payment.billing_history -

-
-
-

- - July 16, 2022 - - - Your Cool Subscription - - - 11232 - -

-
-
- user:payment.price_paid_with -
-
-
-
-

- - November 9, 2022 - - - Your Cool Subscription - - - 11234 - -

-
-
- user:payment.price_paid_with -
-
-
-
-
+ /> `; diff --git a/packages/ui-react/src/components/Account/Account.module.scss b/packages/ui-react/src/pages/User/sections/AccountSection/AccountSection.module.scss similarity index 100% rename from packages/ui-react/src/components/Account/Account.module.scss rename to packages/ui-react/src/pages/User/sections/AccountSection/AccountSection.module.scss diff --git a/packages/ui-react/src/components/Account/Account.test.tsx b/packages/ui-react/src/pages/User/sections/AccountSection/AccountSection.test.tsx similarity index 72% rename from packages/ui-react/src/components/Account/Account.test.tsx rename to packages/ui-react/src/pages/User/sections/AccountSection/AccountSection.test.tsx index 801927a48..de4221008 100644 --- a/packages/ui-react/src/components/Account/Account.test.tsx +++ b/packages/ui-react/src/pages/User/sections/AccountSection/AccountSection.test.tsx @@ -6,13 +6,12 @@ import customer from '@jwp/ott-testing/fixtures/customer.json'; import { mockService } from '@jwp/ott-common/test/mockService'; import { DEFAULT_FEATURES } from '@jwp/ott-common/src/constants'; -import { renderWithRouter } from '../../../test/utils'; +import { renderWithRouter } from '../../../../../test/utils'; -import Account from './Account'; +import AccountSection from './AccountSection'; -describe('', () => { +describe('', () => { beforeEach(() => { - // TODO: remove AccountController from component mockService(AccountController, { getFeatures: () => DEFAULT_FEATURES }); }); @@ -22,7 +21,7 @@ describe('', () => { publisherConsents: Array.of({ name: 'marketing', label: 'Receive Marketing Emails' } as CustomFormField), }); - const { container } = renderWithRouter(); + const { container } = renderWithRouter(); // todo expect(container).toMatchSnapshot(); diff --git a/packages/ui-react/src/components/Account/Account.tsx b/packages/ui-react/src/pages/User/sections/AccountSection/AccountSection.tsx similarity index 93% rename from packages/ui-react/src/components/Account/Account.tsx rename to packages/ui-react/src/pages/User/sections/AccountSection/AccountSection.tsx index b5145d268..4a721e9fc 100644 --- a/packages/ui-react/src/components/Account/Account.tsx +++ b/packages/ui-react/src/pages/User/sections/AccountSection/AccountSection.tsx @@ -16,26 +16,21 @@ import Visibility from '@jwp/ott-theme/assets/icons/visibility.svg?react'; import VisibilityOff from '@jwp/ott-theme/assets/icons/visibility_off.svg?react'; import env from '@jwp/ott-common/src/env'; -import type { FormSectionContentArgs, FormSectionProps } from '../Form/FormSection'; -import Alert from '../Alert/Alert'; -import Button from '../Button/Button'; -import Form from '../Form/Form'; -import IconButton from '../IconButton/IconButton'; -import FormFeedback from '../FormFeedback/FormFeedback'; -import TextField from '../form-fields/TextField/TextField'; -import Checkbox from '../form-fields/Checkbox/Checkbox'; -import CustomRegisterField from '../CustomRegisterField/CustomRegisterField'; -import Icon from '../Icon/Icon'; -import { modalURLFromLocation } from '../../utils/location'; -import { useAriaAnnouncer } from '../../containers/AnnouncementProvider/AnnoucementProvider'; - -import styles from './Account.module.scss'; - -type Props = { - panelClassName?: string; - panelHeaderClassName?: string; - canUpdateEmail?: boolean; -}; +import type { FormSectionContentArgs, FormSectionProps } from '../../../../components/Form/FormSection'; +import Alert from '../../../../components/Alert/Alert'; +import Button from '../../../../components/Button/Button'; +import Form from '../../../../components/Form/Form'; +import IconButton from '../../../../components/IconButton/IconButton'; +import FormFeedback from '../../../../components/FormFeedback/FormFeedback'; +import TextField from '../../../../components/form-fields/TextField/TextField'; +import Checkbox from '../../../../components/form-fields/Checkbox/Checkbox'; +import CustomRegisterField from '../../../../components/CustomRegisterField/CustomRegisterField'; +import Icon from '../../../../components/Icon/Icon'; +import { modalURLFromLocation } from '../../../../utils/location'; +import { useAriaAnnouncer } from '../../../../containers/AnnouncementProvider/AnnoucementProvider'; +import userStyles from '../../User.module.scss'; + +import styles from './AccountSection.module.scss'; interface FormErrors { email?: string; @@ -45,7 +40,7 @@ interface FormErrors { form?: string; } -const Account = ({ panelClassName, panelHeaderClassName, canUpdateEmail = true }: Props): JSX.Element => { +const AccountSection = (): JSX.Element => { const accountController = getModule(AccountController); const { t, i18n } = useTranslation('user'); @@ -57,6 +52,7 @@ const Account = ({ panelClassName, panelHeaderClassName, canUpdateEmail = true } const [isAlertVisible, setIsAlertVisible] = useState(false); const exportDataMessage = exportData.isSuccess ? t('account.export_data_success') : t('account.export_data_error'); const htmlLang = i18n.language !== env.APP_DEFAULT_LANGUAGE ? env.APP_DEFAULT_LANGUAGE : undefined; + const { canUpdateEmail } = accountController.getFeatures(); useEffect(() => { if (exportData.isSuccess || exportData.isError) { @@ -185,8 +181,8 @@ const Account = ({ panelClassName, panelHeaderClassName, canUpdateEmail = true } function formSection(props: FormSectionProps) { return { ...props, - className: panelClassName, - panelHeaderClassName: panelHeaderClassName, + className: userStyles.panel, + panelHeaderClassName: userStyles.panelHeader, saveButton: t('account.save'), cancelButton: t('account.cancel'), content: (args: FormSectionContentArgs) => { @@ -434,4 +430,4 @@ const Account = ({ panelClassName, panelHeaderClassName, canUpdateEmail = true } ); }; -export default Account; +export default AccountSection; diff --git a/packages/ui-react/src/components/Account/__snapshots__/Account.test.tsx.snap b/packages/ui-react/src/pages/User/sections/AccountSection/__snapshots__/Account.test.tsx.snap similarity index 100% rename from packages/ui-react/src/components/Account/__snapshots__/Account.test.tsx.snap rename to packages/ui-react/src/pages/User/sections/AccountSection/__snapshots__/Account.test.tsx.snap diff --git a/packages/ui-react/src/pages/User/sections/AccountSection/__snapshots__/AccountSection.test.tsx.snap b/packages/ui-react/src/pages/User/sections/AccountSection/__snapshots__/AccountSection.test.tsx.snap new file mode 100644 index 000000000..6af633d90 --- /dev/null +++ b/packages/ui-react/src/pages/User/sections/AccountSection/__snapshots__/AccountSection.test.tsx.snap @@ -0,0 +1,206 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[` > renders and matches snapshot 1`] = ` +
+

+ nav.account +

+
+
+

+ account.about_you +

+
+ +
+ + +
+
+ + +
+ +
+ +
+
+
+
+

+ account.email +

+
+
+
+ + +
+
+
+
+
+
+

+ account.security +

+
+
+
+ +
+
+
+
+

+ account.terms_and_tracking +

+
+ +
+
+ + +
+
+ +
+
+
+`; diff --git a/packages/ui-react/src/pages/User/sections/FavoritesSection/FavoritesSection.tsx b/packages/ui-react/src/pages/User/sections/FavoritesSection/FavoritesSection.tsx new file mode 100644 index 000000000..618e0190e --- /dev/null +++ b/packages/ui-react/src/pages/User/sections/FavoritesSection/FavoritesSection.tsx @@ -0,0 +1,50 @@ +import { getModule } from '@jwp/ott-common/src/modules/container'; +import FavoritesController from '@jwp/ott-common/src/controllers/FavoritesController'; +import { useConfigStore } from '@jwp/ott-common/src/stores/ConfigStore'; +import { shallow } from '@jwp/ott-common/src/utils/compare'; +import { useTranslation } from 'react-i18next'; +import { useState } from 'react'; +import { useAccountStore } from '@jwp/ott-common/src/stores/AccountStore'; +import { useFavoritesStore } from '@jwp/ott-common/src/stores/FavoritesStore'; + +import Favorites from '../../../../components/Favorites/Favorites'; +import ConfirmationDialog from '../../../../components/ConfirmationDialog/ConfirmationDialog'; + +const FavoritesSection = () => { + const favoritesController = getModule(FavoritesController); + + const { accessModel, favoritesList } = useConfigStore( + (s) => ({ + accessModel: s.accessModel, + favoritesList: s.config.features?.favoritesList, + }), + shallow, + ); + const { t } = useTranslation('user'); + const [clearFavoritesOpen, setClearFavoritesOpen] = useState(false); + + const { subscription } = useAccountStore(); + const favorites = useFavoritesStore((state) => state.getPlaylist()); + + if (!favoritesList) { + return null; + } + + return ( + <> + setClearFavoritesOpen(true)} accessModel={accessModel} hasSubscription={!!subscription} /> + { + await favoritesController.clear(); + setClearFavoritesOpen(false); + }} + onClose={() => setClearFavoritesOpen(false)} + /> + + ); +}; + +export default FavoritesSection; diff --git a/packages/ui-react/src/containers/PaymentContainer/PaymentContainer.tsx b/packages/ui-react/src/pages/User/sections/PaymentsSection/PaymentsSection.tsx similarity index 90% rename from packages/ui-react/src/containers/PaymentContainer/PaymentContainer.tsx rename to packages/ui-react/src/pages/User/sections/PaymentsSection/PaymentsSection.tsx index 2aaeb2b87..730a20ee7 100644 --- a/packages/ui-react/src/containers/PaymentContainer/PaymentContainer.tsx +++ b/packages/ui-react/src/pages/User/sections/PaymentsSection/PaymentsSection.tsx @@ -1,4 +1,4 @@ -import { useState } from 'react'; +import { useEffect, useState } from 'react'; import { useLocation, useNavigate } from 'react-router'; import { shallow } from '@jwp/ott-common/src/utils/compare'; import { getModule } from '@jwp/ott-common/src/modules/container'; @@ -7,11 +7,13 @@ import { useConfigStore } from '@jwp/ott-common/src/stores/ConfigStore'; import AccountController from '@jwp/ott-common/src/controllers/AccountController'; import useOffers from '@jwp/ott-hooks-react/src/useOffers'; import { useSubscriptionChange } from '@jwp/ott-hooks-react/src/useSubscriptionChange'; +import { ACCESS_MODEL } from '@jwp/ott-common/src/constants'; +import { RELATIVE_PATH_USER_ACCOUNT } from '@jwp/ott-common/src/paths'; -import styles from '../../pages/User/User.module.scss'; -import LoadingOverlay from '../../components/LoadingOverlay/LoadingOverlay'; -import Payment from '../../components/Payment/Payment'; -import { modalURLFromLocation } from '../../utils/location'; +import styles from '../../User.module.scss'; +import LoadingOverlay from '../../../../components/LoadingOverlay/LoadingOverlay'; +import Payment from '../../../../components/Payment/Payment'; +import { modalURLFromLocation } from '../../../../utils/location'; /** * Handles billing receipts by either downloading the receipt directly if it is an instance of Blob, @@ -51,7 +53,7 @@ const STORE_LINKS: Record = { roku: 'https://support.roku.com/article/208756478', }; -const PaymentContainer = () => { +const PaymentsSection = () => { const accountController = getModule(AccountController); const navigate = useNavigate(); @@ -68,6 +70,10 @@ const PaymentContainer = () => { const location = useLocation(); + useEffect(() => { + if (accessModel === ACCESS_MODEL.AVOD) navigate(RELATIVE_PATH_USER_ACCOUNT); + }, [accessModel, navigate]); + const handleUpgradeSubscriptionClick = async () => navigate(modalURLFromLocation(location, 'upgrade-subscription')); const handleShowReceiptClick = async (transactionId: string) => { @@ -139,4 +145,4 @@ const PaymentContainer = () => { ); }; -export default PaymentContainer; +export default PaymentsSection; diff --git a/platforms/web/src/containers/AppRoutes/AppRoutes.tsx b/platforms/web/src/containers/AppRoutes/AppRoutes.tsx index 74a964a3d..23f3f4a5f 100644 --- a/platforms/web/src/containers/AppRoutes/AppRoutes.tsx +++ b/platforms/web/src/containers/AppRoutes/AppRoutes.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; -import { Route, Routes } from 'react-router-dom'; +import { Navigate, Route, Routes } from 'react-router-dom'; import ErrorPage from '@jwp/ott-ui-react/src/components/ErrorPage/ErrorPage'; import RootErrorPage from '@jwp/ott-ui-react/src/components/RootErrorPage/RootErrorPage'; import About from '@jwp/ott-ui-react/src/pages/About/About'; @@ -11,8 +11,22 @@ import LegacySeries from '@jwp/ott-ui-react/src/pages/LegacySeries/LegacySeries' import MediaScreenRouter from '@jwp/ott-ui-react/src/pages/ScreenRouting/MediaScreenRouter'; import PlaylistScreenRouter from '@jwp/ott-ui-react/src/pages/ScreenRouting/PlaylistScreenRouter'; import Layout from '@jwp/ott-ui-react/src/containers/Layout/Layout'; -import { PATH_ABOUT, PATH_CONTENT_LIST, PATH_LEGACY_SERIES, PATH_MEDIA, PATH_PLAYLIST, PATH_SEARCH, PATH_USER } from '@jwp/ott-common/src/paths'; +import { + PATH_ABOUT, + PATH_CONTENT_LIST, + PATH_LEGACY_SERIES, + PATH_MEDIA, + PATH_PLAYLIST, + PATH_SEARCH, + PATH_USER, + RELATIVE_PATH_USER_ACCOUNT, + RELATIVE_PATH_USER_FAVORITES, + RELATIVE_PATH_USER_PAYMENTS, +} from '@jwp/ott-common/src/paths'; import { APP_CONFIG_ITEM_TYPE } from '@jwp/ott-common/src/constants'; +import Account from '@jwp/ott-ui-react/src/pages/User/sections/Account/Account'; +import FavoritesSection from '@jwp/ott-ui-react/src/pages/User/sections/FavoritesSection/FavoritesSection'; +import PaymentsSection from '@jwp/ott-ui-react/src/pages/User/sections/PaymentsSection/PaymentsSection'; import RoutesContainer from '#src/containers/RoutesContainer/RoutesContainer'; @@ -29,7 +43,12 @@ export default function AppRoutes() { } /> } /> } /> - } /> + }> + } /> + } /> + } /> + } /> + } /> Date: Wed, 29 Jan 2025 22:16:51 +0100 Subject: [PATCH 2/4] chore: fix import --- platforms/web/src/containers/AppRoutes/AppRoutes.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platforms/web/src/containers/AppRoutes/AppRoutes.tsx b/platforms/web/src/containers/AppRoutes/AppRoutes.tsx index 23f3f4a5f..0cde8a3b2 100644 --- a/platforms/web/src/containers/AppRoutes/AppRoutes.tsx +++ b/platforms/web/src/containers/AppRoutes/AppRoutes.tsx @@ -24,7 +24,7 @@ import { RELATIVE_PATH_USER_PAYMENTS, } from '@jwp/ott-common/src/paths'; import { APP_CONFIG_ITEM_TYPE } from '@jwp/ott-common/src/constants'; -import Account from '@jwp/ott-ui-react/src/pages/User/sections/Account/Account'; +import AccountSection from '@jwp/ott-ui-react/src/pages/User/sections/AccountSection/AccountSection'; import FavoritesSection from '@jwp/ott-ui-react/src/pages/User/sections/FavoritesSection/FavoritesSection'; import PaymentsSection from '@jwp/ott-ui-react/src/pages/User/sections/PaymentsSection/PaymentsSection'; @@ -44,7 +44,7 @@ export default function AppRoutes() { } /> } /> }> - } /> + } /> } /> } /> } /> From 069c8011771167d2f87ea9bc555e2ba623f89bda Mon Sep 17 00:00:00 2001 From: Christiaan Scheermeijer Date: Wed, 29 Jan 2025 22:19:19 +0100 Subject: [PATCH 3/4] chore: combine imports --- packages/ui-react/src/pages/User/User.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/ui-react/src/pages/User/User.tsx b/packages/ui-react/src/pages/User/User.tsx index 0ee19f4b2..079492397 100644 --- a/packages/ui-react/src/pages/User/User.tsx +++ b/packages/ui-react/src/pages/User/User.tsx @@ -1,6 +1,6 @@ import { useCallback, useEffect } from 'react'; import { useTranslation } from 'react-i18next'; -import { useNavigate } from 'react-router-dom'; +import { useNavigate, Outlet } from 'react-router-dom'; import { shallow } from '@jwp/ott-common/src/utils/compare'; import { getModule } from '@jwp/ott-common/src/modules/container'; import { useAccountStore } from '@jwp/ott-common/src/stores/AccountStore'; @@ -13,7 +13,6 @@ import BalanceWallet from '@jwp/ott-theme/assets/icons/balance_wallet.svg?react' import Exit from '@jwp/ott-theme/assets/icons/exit.svg?react'; import Favorite from '@jwp/ott-theme/assets/icons/favorite.svg?react'; import { RELATIVE_PATH_USER_ACCOUNT, RELATIVE_PATH_USER_FAVORITES, RELATIVE_PATH_USER_PAYMENTS } from '@jwp/ott-common/src/paths'; -import { Outlet } from 'react-router'; import Button from '../../components/Button/Button'; import LoadingOverlay from '../../components/LoadingOverlay/LoadingOverlay'; From dc21b2a7898f5071d4bd79801b4327a3d2ed1d8f Mon Sep 17 00:00:00 2001 From: Christiaan Scheermeijer Date: Thu, 30 Jan 2025 12:03:58 +0100 Subject: [PATCH 4/4] chore: remove broken vitest extend --- packages/ui-react/src/components/Button/Button.test.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/ui-react/src/components/Button/Button.test.tsx b/packages/ui-react/src/components/Button/Button.test.tsx index 16453f725..dd0a6d8ac 100644 --- a/packages/ui-react/src/components/Button/Button.test.tsx +++ b/packages/ui-react/src/components/Button/Button.test.tsx @@ -1,7 +1,6 @@ import React from 'react'; import { axe } from 'vitest-axe'; import AccountCircle from '@jwp/ott-theme/assets/icons/account_circle.svg?react'; -import 'vitest-axe/extend-expect'; import { renderWithRouter } from '../../../test/utils'; import Icon from '../Icon/Icon';