From f91a215bb71c7c29406f45a731cac318d7a4380f Mon Sep 17 00:00:00 2001 From: Aizad Ridzo <103104395+aizad-deriv@users.noreply.github.com> Date: Wed, 19 Jun 2024 18:44:14 +0800 Subject: [PATCH] [WALL] Aizad/WALL-2899/WalletMarketCurrencyIcon-test-case (#15685) * chore: added WalletMarketCurrencyIcon test case * chore: rerun workflow --- .../WalletMarketCurrencyIcon.tsx | 2 +- .../WalletMarketCurrencyIcon.spec.tsx | 46 +++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 packages/wallets/src/components/WalletMarketCurrencyIcon/__test__/WalletMarketCurrencyIcon.spec.tsx diff --git a/packages/wallets/src/components/WalletMarketCurrencyIcon/WalletMarketCurrencyIcon.tsx b/packages/wallets/src/components/WalletMarketCurrencyIcon/WalletMarketCurrencyIcon.tsx index ca68ccc978c3..59e43996a77a 100644 --- a/packages/wallets/src/components/WalletMarketCurrencyIcon/WalletMarketCurrencyIcon.tsx +++ b/packages/wallets/src/components/WalletMarketCurrencyIcon/WalletMarketCurrencyIcon.tsx @@ -32,7 +32,7 @@ const WalletMarketCurrencyIcon: FC = ({ currency } else MarketTypeIcon = 'IcWalletOptionsLight'; return ( -
+
{ + it('renders MT5 Financial Icon', () => { + render( + + ); + const marketIcon = screen.getByTestId('dt_wallet_icon'); + const currencyIcon = screen.getByTestId('dt_wallet_currency_icon'); + expect(screen.getByTestId('dt_wallet_market_icon')).toBeInTheDocument(); + expect(marketIcon).toBeInTheDocument(); + expect(currencyIcon).toBeInTheDocument(); + }); + + it('renders DXTrade icon', () => { + render( + + ); + const marketIcon = screen.getByTestId('dt_wallet_icon'); + const currencyIcon = screen.getByTestId('dt_wallet_currency_icon'); + expect(screen.getByTestId('dt_wallet_market_icon')).toBeInTheDocument(); + expect(marketIcon).toBeInTheDocument(); + expect(currencyIcon).toBeInTheDocument(); + }); + + it('renders Options icon', () => { + render(); + const marketIcon = screen.getByTestId('dt_wallet_icon'); + const currencyIcon = screen.getByTestId('dt_wallet_currency_icon'); + expect(screen.getByTestId('dt_wallet_market_icon')).toBeInTheDocument(); + expect(marketIcon).toBeInTheDocument(); + expect(currencyIcon).toBeInTheDocument(); + }); +});