From 25a912936952c2e217e53286df06fa1a5e27765d Mon Sep 17 00:00:00 2001 From: bergeron Date: Tue, 3 Oct 2023 12:53:46 -0500 Subject: [PATCH] fix edit gas popover test --- .../edit-gas-fee-popover.test.js | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/ui/components/app/edit-gas-fee-popover/edit-gas-fee-popover.test.js b/ui/components/app/edit-gas-fee-popover/edit-gas-fee-popover.test.js index b7382bc5ddb0..a28d469d0683 100644 --- a/ui/components/app/edit-gas-fee-popover/edit-gas-fee-popover.test.js +++ b/ui/components/app/edit-gas-fee-popover/edit-gas-fee-popover.test.js @@ -7,6 +7,10 @@ import { ETH } from '../../../helpers/constants/common'; import configureStore from '../../../store/store'; import { GasFeeContextProvider } from '../../../contexts/gasFee'; +import { + TransactionStatus, + TransactionType, +} from '../../../../shared/constants/transaction'; import EditGasFeePopover from './edit-gas-fee-popover'; jest.mock('../../../store/actions', () => ({ @@ -112,13 +116,25 @@ describe('EditGasFeePopover', () => { }); it('should not show insufficient balance message if transaction value is less than balance', () => { - render({ txProps: { userFeeLevel: 'high', txParams: { value: '0x64' } } }); + render({ + txProps: { + status: TransactionStatus.unapproved, + type: TransactionType.simpleSend, + userFeeLevel: 'high', + txParams: { value: '0x64', from: '0xAddress' }, + }, + }); expect(screen.queryByText('Insufficient funds.')).not.toBeInTheDocument(); }); it('should show insufficient balance message if transaction value is more than balance', () => { render({ - txProps: { userFeeLevel: 'high', txParams: { value: '0x5208' } }, + txProps: { + status: TransactionStatus.unapproved, + type: TransactionType.simpleSend, + userFeeLevel: 'high', + txParams: { value: '0x5208', from: '0xAddress' }, + }, }); expect(screen.queryByText('Insufficient funds.')).toBeInTheDocument(); });