diff --git a/jest.config.js b/jest.config.js index 8e215b994..3219d5eba 100644 --- a/jest.config.js +++ b/jest.config.js @@ -5,10 +5,10 @@ module.exports = { coveragePathIgnorePatterns: ['.stories.js', '.snap'], coverageThreshold: { global: { - branches: 32.75, - functions: 42.9, - lines: 43.12, - statements: 43.67, + branches: 45.45, + functions: 55.29, + lines: 60.22, + statements: 60.43, }, }, setupFiles: ['./test/setup.js', './test/env.js'], diff --git a/test/jest/mock-store.js b/test/jest/mock-store.js index f09999f10..35e52682f 100644 --- a/test/jest/mock-store.js +++ b/test/jest/mock-store.js @@ -4,7 +4,19 @@ export const createSwapsMockStore = () => { return { swaps: { customGas: { + limit: '0x0', fallBackPrice: 5, + priceEstimates: { + blockTime: 14.1, + safeLow: 2.5, + safeLowWait: 6.6, + average: 4, + avgWait: 5.3, + fast: 5, + fastWait: 3.3, + fastest: 10, + fastestWait: 0.5, + }, }, fromToken: 'ETH', }, @@ -84,7 +96,108 @@ export const createSwapsMockStore = () => { }, ], swapsState: { - quotes: {}, + quotes: { + TEST_AGG_1: { + trade: { + from: '0xe18035bf8712672935fdb4e5e431b1a0183d2dfc', + value: '0x0', + gas: '0x61a80', // 4e5 + to: '0x881D40237659C251811CEC9c364ef91dC08D300C', + }, + sourceAmount: '10000000000000000000', // 10e18 + destinationAmount: '20000000000000000000', // 20e18 + error: null, + sourceToken: '0x6b175474e89094c44da98b954eedeac495271d0f', + destinationToken: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + approvalNeeded: null, + maxGas: 600000, + averageGas: 120000, + estimatedRefund: 80000, + fetchTime: 607, + aggregator: 'TEST_AGG_1', + aggType: 'AGG', + slippage: 2, + sourceTokenInfo: { + address: '0x6b175474e89094c44da98b954eedeac495271d0f', + symbol: 'DAI', + decimals: 18, + iconUrl: 'https://foo.bar/logo.png', + }, + destinationTokenInfo: { + address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + symbol: 'USDC', + decimals: 18, + }, + fee: 1, + }, + + TEST_AGG_BEST: { + trade: { + from: '0xe18035bf8712672935fdb4e5e431b1a0183d2dfc', + value: '0x0', + gas: '0x61a80', + to: '0x881D40237659C251811CEC9c364ef91dC08D300C', + }, + sourceAmount: '10000000000000000000', + destinationAmount: '25000000000000000000', // 25e18 + error: null, + sourceToken: '0x6b175474e89094c44da98b954eedeac495271d0f', + destinationToken: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + approvalNeeded: null, + maxGas: 1100000, + averageGas: 411000, + estimatedRefund: 343090, + fetchTime: 1003, + aggregator: 'TEST_AGG_BEST', + aggType: 'AGG', + slippage: 2, + sourceTokenInfo: { + address: '0x6b175474e89094c44da98b954eedeac495271d0f', + symbol: 'DAI', + decimals: 18, + iconUrl: 'https://foo.bar/logo.png', + }, + destinationTokenInfo: { + address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + symbol: 'USDC', + decimals: 18, + }, + fee: 1, + }, + TEST_AGG_2: { + trade: { + from: '0xe18035bf8712672935fdb4e5e431b1a0183d2dfc', + value: '0x0', + gas: '0x61a80', + to: '0x881D40237659C251811CEC9c364ef91dC08D300C', + }, + sourceAmount: '10000000000000000000', + destinationAmount: '22000000000000000000', // 22e18 + error: null, + sourceToken: '0x6b175474e89094c44da98b954eedeac495271d0f', + destinationToken: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + approvalNeeded: null, + maxGas: 368000, + averageGas: 197000, + estimatedRefund: 18205, + fetchTime: 1354, + aggregator: 'TEST_AGG_2', + aggType: 'AGG', + slippage: 2, + sourceTokenInfo: { + address: '0x6b175474e89094c44da98b954eedeac495271d0f', + symbol: 'DAI', + decimals: 18, + iconUrl: 'https://foo.bar/logo.png', + }, + destinationTokenInfo: { + address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + symbol: 'USDC', + decimals: 18, + }, + fee: 1, + }, + }, fetchParams: { metaData: { sourceTokenInfo: { @@ -97,10 +210,11 @@ export const createSwapsMockStore = () => { }, tradeTxId: null, approveTxId: null, - quotesLastFetched: null, + quotesLastFetched: 1519211809934, + swapsQuoteRefreshTime: 60000, customMaxGas: '', customGasPrice: null, - selectedAggId: null, + selectedAggId: 'TEST_AGG_2', customApproveTxData: '', errorKey: '', topAggId: null, @@ -108,5 +222,17 @@ export const createSwapsMockStore = () => { swapsFeatureIsLive: false, }, }, + appState: { + modal: { + open: true, + modalState: { + name: 'test', + props: { + initialGasLimit: 100, + minimumGasLimit: 5, + }, + }, + }, + }, }; }; diff --git a/ui/__mocks__/react-router-dom.js b/ui/__mocks__/react-router-dom.js index dd15434a1..1f65e3395 100644 --- a/ui/__mocks__/react-router-dom.js +++ b/ui/__mocks__/react-router-dom.js @@ -2,7 +2,9 @@ const originalModule = jest.requireActual('react-router-dom'); module.exports = { ...originalModule, - useHistory: jest.fn(), + useHistory: jest.fn(() => { + return []; + }), useLocation: jest.fn(() => { return { pathname: '/swaps/build-quote', diff --git a/ui/components/ui/button-group/button-group.component.js b/ui/components/ui/button-group/button-group.component.js index d1f20e961..9cd5d9896 100644 --- a/ui/components/ui/button-group/button-group.component.js +++ b/ui/components/ui/button-group/button-group.component.js @@ -61,6 +61,7 @@ export default class ButtonGroup extends PureComponent { index === this.state.activeButtonIndex, }, )} + data-testid={`button-group__button${index}`} onClick={() => { this.handleButtonClick(index); child.props.onClick?.(); diff --git a/ui/components/ui/page-container/page-container-header/page-container-header.component.js b/ui/components/ui/page-container/page-container-header/page-container-header.component.js index 3717b7450..0c3995c10 100644 --- a/ui/components/ui/page-container/page-container-header/page-container-header.component.js +++ b/ui/components/ui/page-container/page-container-header/page-container-header.component.js @@ -61,6 +61,7 @@ export default class PageContainerHeader extends Component { className={classnames('page-container__header', className, { 'page-container__header--no-padding-bottom': Boolean(tabs), })} + data-testid="page-container__header" > {this.renderHeaderRow()} diff --git a/ui/pages/swaps/awaiting-signatures/__snapshots__/awaiting-signatures.test.js.snap b/ui/pages/swaps/awaiting-signatures/__snapshots__/awaiting-signatures.test.js.snap deleted file mode 100644 index a7b8b3546..000000000 --- a/ui/pages/swaps/awaiting-signatures/__snapshots__/awaiting-signatures.test.js.snap +++ /dev/null @@ -1,26 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`AwaitingSignatures renders the component with initial props for 1 confirmation 1`] = ` - -`; diff --git a/ui/pages/swaps/awaiting-signatures/awaiting-signatures.test.js b/ui/pages/swaps/awaiting-signatures/awaiting-signatures.test.js index c8e466ec2..bcf1d37ad 100644 --- a/ui/pages/swaps/awaiting-signatures/awaiting-signatures.test.js +++ b/ui/pages/swaps/awaiting-signatures/awaiting-signatures.test.js @@ -12,6 +12,6 @@ describe('AwaitingSignatures', () => { const store = configureMockStore()(createSwapsMockStore()); const { getByText } = renderWithProvider(, store); expect(getByText('Confirm with your hardware wallet')).toBeInTheDocument(); - expect(document.querySelector('.swaps-footer')).toMatchSnapshot(); + expect(getByText('Cancel')).toBeInTheDocument(); }); }); diff --git a/ui/pages/swaps/awaiting-swap/__snapshots__/awaiting-swap.test.js.snap b/ui/pages/swaps/awaiting-swap/__snapshots__/awaiting-swap.test.js.snap index 588a27dd9..c0c43246c 100644 --- a/ui/pages/swaps/awaiting-swap/__snapshots__/awaiting-swap.test.js.snap +++ b/ui/pages/swaps/awaiting-swap/__snapshots__/awaiting-swap.test.js.snap @@ -17,29 +17,3 @@ exports[`AwaitingSwap renders the component with initial props 1`] = ` `; - -exports[`AwaitingSwap renders the component with initial props 2`] = ` - -`; diff --git a/ui/pages/swaps/awaiting-swap/awaiting-swap.js b/ui/pages/swaps/awaiting-swap/awaiting-swap.js index 75f7a07b5..e1a9e934d 100644 --- a/ui/pages/swaps/awaiting-swap/awaiting-swap.js +++ b/ui/pages/swaps/awaiting-swap/awaiting-swap.js @@ -130,9 +130,10 @@ export default function AwaitingSwap({ { blockExplorerUrl: baseNetworkUrl }, ); - const isCustomBlockExplorerUrl = + const isCustomBlockExplorerUrl = Boolean( SWAPS_CHAINID_DEFAULT_BLOCK_EXPLORER_URL_MAP[chainId] || - rpcPrefs.blockExplorerUrl; + rpcPrefs.blockExplorerUrl, + ); let headerText; let statusImage; diff --git a/ui/pages/swaps/awaiting-swap/awaiting-swap.test.js b/ui/pages/swaps/awaiting-swap/awaiting-swap.test.js index bdd91c871..4f4286995 100644 --- a/ui/pages/swaps/awaiting-swap/awaiting-swap.test.js +++ b/ui/pages/swaps/awaiting-swap/awaiting-swap.test.js @@ -32,6 +32,6 @@ describe('AwaitingSwap', () => { expect( document.querySelector('.awaiting-swap__main-descrption'), ).toMatchSnapshot(); - expect(document.querySelector('.swaps-footer')).toMatchSnapshot(); + expect(getByText('View in activity')).toBeInTheDocument(); }); }); diff --git a/ui/pages/swaps/build-quote/__snapshots__/build-quote.test.js.snap b/ui/pages/swaps/build-quote/__snapshots__/build-quote.test.js.snap index c6f8bda5e..844710b12 100644 --- a/ui/pages/swaps/build-quote/__snapshots__/build-quote.test.js.snap +++ b/ui/pages/swaps/build-quote/__snapshots__/build-quote.test.js.snap @@ -8,6 +8,7 @@ exports[`BuildQuote renders the component with initial props 1`] = ` `; - -exports[`BuildQuote renders the component with initial props 2`] = ` - -`; diff --git a/ui/pages/swaps/build-quote/build-quote.test.js b/ui/pages/swaps/build-quote/build-quote.test.js index 960489281..c1a1d8042 100644 --- a/ui/pages/swaps/build-quote/build-quote.test.js +++ b/ui/pages/swaps/build-quote/build-quote.test.js @@ -42,6 +42,5 @@ describe('BuildQuote', () => { expect( document.querySelector('.slippage-buttons__button-group'), ).toMatchSnapshot(); - expect(document.querySelector('.swaps-footer')).toMatchSnapshot(); }); }); diff --git a/ui/pages/swaps/fee-card/__snapshots__/fee-card.test.js.snap b/ui/pages/swaps/fee-card/__snapshots__/fee-card.test.js.snap index 784a1f4f9..8152957ad 100644 --- a/ui/pages/swaps/fee-card/__snapshots__/fee-card.test.js.snap +++ b/ui/pages/swaps/fee-card/__snapshots__/fee-card.test.js.snap @@ -3,6 +3,7 @@ exports[`FeeCard renders the component with initial props 1`] = `
-
+
{bestQuoteText && (

{bestQuoteText}

@@ -66,7 +69,10 @@ export default function FeeCard({
-
+
{t('swapEstimatedNetworkFee')} diff --git a/ui/pages/swaps/loading-swaps-quotes/loading-swaps-quotes.test.js b/ui/pages/swaps/loading-swaps-quotes/loading-swaps-quotes.test.js new file mode 100644 index 000000000..bff5291fe --- /dev/null +++ b/ui/pages/swaps/loading-swaps-quotes/loading-swaps-quotes.test.js @@ -0,0 +1,41 @@ +import React from 'react'; +import configureMockStore from 'redux-mock-store'; + +import { + renderWithProvider, + createSwapsMockStore, +} from '../../../../test/jest'; +import LoadingSwapsQuotes from '.'; + +const createProps = (customProps = {}) => { + return { + loadingComplete: true, + onDone: jest.fn(), + aggregatorMetadata: { + agg1: { + color: '#283B4C', + title: 'agg1', + icon: 'data:image/png;base64,iVBORw0KGgoAAA', + }, + agg2: { + color: '#283B4C', + title: 'agg2', + icon: 'data:image/png;base64,iVBORw0KGgoAAA', + }, + }, + ...customProps, + }; +}; + +describe('LoadingSwapsQuotes', () => { + it('renders the component with initial props', () => { + const store = configureMockStore()(createSwapsMockStore()); + const { getByText } = renderWithProvider( + , + store, + ); + expect(getByText('Quote 1 of 2')).toBeInTheDocument(); + expect(getByText('Checking agg', { exact: false })).toBeInTheDocument(); + expect(getByText('Back')).toBeInTheDocument(); + }); +}); diff --git a/ui/pages/swaps/main-quote-summary/__snapshots__/main-quote-summary.test.js.snap b/ui/pages/swaps/main-quote-summary/__snapshots__/main-quote-summary.test.js.snap index 36a520f6f..034f7ee0e 100644 --- a/ui/pages/swaps/main-quote-summary/__snapshots__/main-quote-summary.test.js.snap +++ b/ui/pages/swaps/main-quote-summary/__snapshots__/main-quote-summary.test.js.snap @@ -3,6 +3,7 @@ exports[`MainQuoteSummary renders the component with initial props 1`] = `
-
+
-
+
2% @@ -27,6 +28,7 @@ exports[`SlippageButtons renders the component with initial props 2`] = ` + +
  • + +
  • + +
    +`; + +exports[`GasCustomizationModalComponent renders the component with initial props 2`] = ` + +`; + +exports[`GasCustomizationModalComponent renders the component with initial props 3`] = ` + +`; + +exports[`GasCustomizationModalComponent renders the component with initial props 4`] = ` + +`; + +exports[`GasCustomizationModalComponent renders the component with initial props 5`] = ` + +`; diff --git a/ui/pages/swaps/swaps-gas-customization-modal/__snapshots__/swaps-gas-customization-modal.container.test.js.snap b/ui/pages/swaps/swaps-gas-customization-modal/__snapshots__/swaps-gas-customization-modal.container.test.js.snap new file mode 100644 index 000000000..245acbf40 --- /dev/null +++ b/ui/pages/swaps/swaps-gas-customization-modal/__snapshots__/swaps-gas-customization-modal.container.test.js.snap @@ -0,0 +1,98 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`GasCustomizationModalContainer renders the component with initial props 1`] = ` +
    +
    + Customize Gas +
    +
    + Increasing fee may decrease processing times, but it is not guaranteed. +
    + + Close + +
      +
    • + +
    • +
    • + +
    • +
    +
    +`; + +exports[`GasCustomizationModalContainer renders the component with initial props 2`] = ` + +`; + +exports[`GasCustomizationModalContainer renders the component with initial props 3`] = ` + +`; + +exports[`GasCustomizationModalContainer renders the component with initial props 4`] = ` + +`; diff --git a/ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.component.js b/ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.component.js index 5a0a2dfe9..dc3c32285 100644 --- a/ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.component.js +++ b/ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.component.js @@ -129,7 +129,10 @@ export default class GasModalPageContainer extends Component { return (
    -
    +
    {this.context.t('sendAmount')} @@ -137,7 +140,10 @@ export default class GasModalPageContainer extends Component { {sendAmount}
    -
    +
    {this.context.t('transactionFee')} @@ -155,7 +161,10 @@ export default class GasModalPageContainer extends Component {
    )} -
    +
    {this.context.t('newTotal')} diff --git a/ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.component.test.js b/ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.component.test.js new file mode 100644 index 000000000..5e8660608 --- /dev/null +++ b/ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.component.test.js @@ -0,0 +1,81 @@ +import React from 'react'; + +import { renderWithProvider } from '../../../../test/jest'; +import GasCustomizationModalComponent from './swaps-gas-customization-modal.component'; + +const createProps = (customProps = {}) => { + return { + insufficientBalance: false, + onSubmit: jest.fn(), + cancelAndClose: jest.fn(), + minimumGasLimit: 100, + gasPriceButtonGroupProps: { + buttonDataLoading: false, + className: 'gas-price-button-group', + gasButtonInfo: [ + { + feeInPrimaryCurrency: '$0.52', + feeInSecondaryCurrency: '0.0048 ETH', + timeEstimate: '~ 1 min 0 sec', + priceInHexWei: '0xa1b2c3f', + gasEstimateType: 'FAST', + }, + { + feeInPrimaryCurrency: '$0.39', + feeInSecondaryCurrency: '0.004 ETH', + timeEstimate: '~ 1 min 30 sec', + priceInHexWei: '0xa1b2c39', + gasEstimateType: 'FAST', + }, + { + feeInPrimaryCurrency: '$0.30', + feeInSecondaryCurrency: '0.00354 ETH', + timeEstimate: '~ 2 min 1 sec', + priceInHexWei: '0xa1b2c30', + gasEstimateType: 'FAST', + }, + ], + handleGasPriceSelection: 'mockSelectionFunction', + noButtonActiveByDefault: true, + showCheck: true, + newTotalFiat: 'mockNewTotalFiat', + newTotalEth: 'mockNewTotalEth', + }, + infoRowProps: { + originalTotalFiat: 'mockOriginalTotalFiat', + originalTotalEth: 'mockOriginalTotalEth', + newTotalFiat: 'mockNewTotalFiat', + newTotalEth: 'mockNewTotalEth', + sendAmount: 'mockSendAmount', + transactionFee: 'mockTransactionFee', + extraInfoRow: { label: 'mockLabel', value: 'mockValue' }, + }, + ...customProps, + }; +}; + +describe('GasCustomizationModalComponent', () => { + it('renders the component with initial props', () => { + const props = createProps(); + const { getByText, getByTestId } = renderWithProvider( + , + ); + expect(getByTestId('page-container__header')).toMatchSnapshot(); + expect(getByText('$0.52')).toBeInTheDocument(); + expect(getByText('0.0048 ETH')).toBeInTheDocument(); + expect(getByTestId('button-group__button0')).toMatchSnapshot(); + expect(getByText('~ 1 min 30 sec')).toBeInTheDocument(); + expect(getByText('$0.39')).toBeInTheDocument(); + expect(getByText('0.004 ETH')).toBeInTheDocument(); + expect( + getByTestId('gas-modal-content__info-row__send-info'), + ).toMatchSnapshot(); + expect( + getByTestId('gas-modal-content__info-row__transaction-info'), + ).toMatchSnapshot(); + expect( + getByTestId('gas-modal-content__info-row__total-info'), + ).toMatchSnapshot(); + expect(getByText('Save')).toBeInTheDocument(); + }); +}); diff --git a/ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.container.test.js b/ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.container.test.js new file mode 100644 index 000000000..18bac9511 --- /dev/null +++ b/ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.container.test.js @@ -0,0 +1,34 @@ +import React from 'react'; +import configureMockStore from 'redux-mock-store'; + +import { + renderWithProvider, + createSwapsMockStore, +} from '../../../../test/jest'; +import GasCustomizationModalContainer from '.'; + +describe('GasCustomizationModalContainer', () => { + it('renders the component with initial props', () => { + const store = configureMockStore()(createSwapsMockStore()); + const { getByText, getByTestId } = renderWithProvider( + , + store, + ); + expect(getByTestId('page-container__header')).toMatchSnapshot(); + expect(getByText('Basic')).toBeInTheDocument(); + expect(getByText('Advanced')).toBeInTheDocument(); + expect(getByText('Estimated Processing Times')).toBeInTheDocument(); + expect(getByText('Send Amount')).toBeInTheDocument(); + expect(getByText('Transaction Fee')).toBeInTheDocument(); + expect( + getByTestId('gas-modal-content__info-row__send-info'), + ).toMatchSnapshot(); + expect( + getByTestId('gas-modal-content__info-row__transaction-info'), + ).toMatchSnapshot(); + expect( + getByTestId('gas-modal-content__info-row__total-info'), + ).toMatchSnapshot(); + expect(getByText('Save')).toBeInTheDocument(); + }); +}); diff --git a/ui/pages/swaps/view-quote/__snapshots__/view-quote.test.js.snap b/ui/pages/swaps/view-quote/__snapshots__/view-quote.test.js.snap new file mode 100644 index 000000000..49d491b37 --- /dev/null +++ b/ui/pages/swaps/view-quote/__snapshots__/view-quote.test.js.snap @@ -0,0 +1,150 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`ViewQuote renders the component with initial props 1`] = ` +
    + + 10 + + + + DAI + +
    +`; + +exports[`ViewQuote renders the component with initial props 2`] = ` +
    +
    + + 1 + + + DAI + + + = + + + 2.2 + + + USDC + +
    + + + +
    +
    +
    +`; + +exports[`ViewQuote renders the component with initial props 3`] = ` +
    +
    + + +
    +
    +`; + +exports[`ViewQuote renders the component with initial props 4`] = ` +
    +
    +
    + Estimated network fee +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    + 0 ETH +
    +
    + 0 +
    +
    +
    +`; diff --git a/ui/pages/swaps/view-quote/view-quote.test.js b/ui/pages/swaps/view-quote/view-quote.test.js new file mode 100644 index 000000000..51dae8a3e --- /dev/null +++ b/ui/pages/swaps/view-quote/view-quote.test.js @@ -0,0 +1,52 @@ +import React from 'react'; +import configureMockStore from 'redux-mock-store'; +import thunk from 'redux-thunk'; + +import { + renderWithProvider, + createSwapsMockStore, + setBackgroundConnection, +} from '../../../../test/jest'; +import ViewQuote from '.'; + +const middleware = [thunk]; +const createProps = (customProps = {}) => { + return { + inputValue: '5', + onInputChange: jest.fn(), + ethBalance: '6 ETH', + setMaxSlippage: jest.fn(), + maxSlippage: 15, + selectedAccountAddress: 'selectedAccountAddress', + isFeatureFlagLoaded: false, + ...customProps, + }; +}; + +setBackgroundConnection({ + resetPostFetchState: jest.fn(), + safeRefetchQuotes: jest.fn(), + setSwapsErrorKey: jest.fn(), +}); + +describe('ViewQuote', () => { + it('renders the component with initial props', () => { + const store = configureMockStore(middleware)(createSwapsMockStore()); + const props = createProps(); + const { getByText, getByTestId } = renderWithProvider( + , + store, + ); + expect(getByText('New quotes in')).toBeInTheDocument(); + expect(getByTestId('main-quote-summary__source-row')).toMatchSnapshot(); + expect( + getByTestId('main-quote-summary__exchange-rate-container'), + ).toMatchSnapshot(); + expect( + getByTestId('fee-card__savings-and-quotes-header'), + ).toMatchSnapshot(); + expect(getByTestId('fee-card__row-header')).toMatchSnapshot(); + expect(getByText('Back')).toBeInTheDocument(); + expect(getByText('Swap')).toBeInTheDocument(); + }); +});