Skip to content

Commit

Permalink
fix(container): add missing mock for payment modal tests (#14887)
Browse files Browse the repository at this point in the history
ref: MANAGER-14722

Signed-off-by: Jacques Larique <[email protected]>
  • Loading branch information
JacquesLarique committed Jan 15, 2025
1 parent 39fcb77 commit fd66de4
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { PAYMENT_ALERTS } from './constants';
import PaymentModal, { IPaymentMethod } from './PaymentModal';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import * as ManagerApi from '@ovh-ux/manager-core-api';
import { ModalTypes } from '@/context/modals/modals.context';

vi.mock('@/context', () => ({
useShell: () => ({
Expand All @@ -13,6 +14,10 @@ vi.mock('@/context', () => ({
}),
}));

vi.mock('@/context/modals', () => ({
useModals: () => ({ current: ModalTypes.payment })
}));

// Expired card in 50 days
const mockValidResponse: ManagerApi.IcebergFetchResultV6<IPaymentMethod> = {
data: [
Expand Down

0 comments on commit fd66de4

Please sign in to comment.