Skip to content

Commit bbee7cc

Browse files
committed
fix: footer test case
1 parent 9942dd7 commit bbee7cc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

ui/pages/confirmations/components/confirm/footer/footer.test.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import { useIsGaslessSupported } from '../../../hooks/gas/useIsGaslessSupported'
3232
import { useInsufficientBalanceAlerts } from '../../../hooks/alerts/transactions/useInsufficientBalanceAlerts';
3333
import { useIsGaslessLoading } from '../../../hooks/gas/useIsGaslessLoading';
3434
import { useConfirmationNavigation } from '../../../hooks/useConfirmationNavigation';
35+
import { useUserSubscriptions } from '../../../../../hooks/subscription/useSubscription';
3536
import Footer from './footer';
3637

3738
jest.mock('../../../hooks/gas/useIsGaslessLoading');
@@ -59,6 +60,7 @@ jest.mock(
5960
);
6061

6162
jest.mock('../../../hooks/useOriginThrottling');
63+
jest.mock('../../../../../hooks/subscription/useSubscription');
6264

6365
jest.mock('react-router-dom-v5-compat', () => ({
6466
useNavigate: jest.fn(),
@@ -86,6 +88,7 @@ describe('ConfirmFooter', () => {
8688
);
8789
const useIsGaslessLoadingMock = jest.mocked(useIsGaslessLoading);
8890
const useConfirmationNavigationMock = jest.mocked(useConfirmationNavigation);
91+
const useUserSubscriptionsMock = jest.mocked(useUserSubscriptions);
8992

9093
beforeEach(() => {
9194
mockUseOriginThrottling.mockReturnValue({
@@ -100,6 +103,13 @@ describe('ConfirmFooter', () => {
100103
useIsGaslessLoadingMock.mockReturnValue({
101104
isGaslessLoading: false,
102105
});
106+
107+
useUserSubscriptionsMock.mockReturnValue({
108+
trialedProducts: [],
109+
loading: false,
110+
subscriptions: [],
111+
error: undefined,
112+
});
103113
});
104114

105115
it('should match snapshot with signature confirmation', () => {

0 commit comments

Comments
 (0)