@@ -3,7 +3,7 @@ import { shallow } from 'enzyme';
33import { render , fireEvent } from '@testing-library/react-native' ;
44import AssetElement from './' ;
55import { getAssetTestId } from '../../../../wdio/screen-objects/testIDs/Screens/WalletView.testIds' ;
6- import { FIAT_BALANCE_TEST_ID , MAIN_BALANCE_TEST_ID } from './index.constants' ;
6+ import { BALANCE_TEST_ID , SECONDARY_BALANCE_TEST_ID } from './index.constants' ;
77
88describe ( 'AssetElement' , ( ) => {
99 const onPressMock = jest . fn ( ) ;
@@ -28,7 +28,7 @@ describe('AssetElement', () => {
2828 expect ( wrapper ) . toMatchSnapshot ( ) ;
2929 } ) ;
3030
31- it ( 'renders the asset balance if provided' , ( ) => {
31+ it ( 'renders the main balance if provided' , ( ) => {
3232 const { getByText } = render (
3333 < AssetElement asset = { erc20Token } balance = { erc20Token . balance } /> ,
3434 ) ;
@@ -56,33 +56,33 @@ describe('AssetElement', () => {
5656 expect ( onLongPressMock ) . toHaveBeenCalledWith ( erc20Token ) ;
5757 } ) ;
5858
59- it ( 'renders the fiat and token balance' , ( ) => {
59+ it ( 'renders the main and secondary balance' , ( ) => {
6060 const { getByTestId } = render (
6161 < AssetElement
6262 balance = { erc20Token . balance }
63- mainBalance = { erc20Token . balance }
63+ secondaryBalance = { erc20Token . balance }
6464 asset = { erc20Token }
6565 /> ,
6666 ) ;
6767
68- expect ( getByTestId ( FIAT_BALANCE_TEST_ID ) ) . toBeDefined ( ) ;
69- expect ( getByTestId ( MAIN_BALANCE_TEST_ID ) ) . toBeDefined ( ) ;
68+ expect ( getByTestId ( BALANCE_TEST_ID ) ) . toBeDefined ( ) ;
69+ expect ( getByTestId ( SECONDARY_BALANCE_TEST_ID ) ) . toBeDefined ( ) ;
7070 } ) ;
7171
72- it ( 'renders the fiat balance with privacy mode' , ( ) => {
72+ it ( 'renders the main and secondary balance with privacy mode' , ( ) => {
7373 const { getByTestId } = render (
7474 < AssetElement
7575 asset = { erc20Token }
7676 balance = { erc20Token . balance }
77- mainBalance = { erc20Token . balance }
77+ secondaryBalance = { erc20Token . balance }
7878 privacyMode
7979 /> ,
8080 ) ;
8181
82- const fiatBalance = getByTestId ( FIAT_BALANCE_TEST_ID ) ;
83- const mainBalance = getByTestId ( MAIN_BALANCE_TEST_ID ) ;
82+ const mainBalance = getByTestId ( BALANCE_TEST_ID ) ;
83+ const secondaryBalance = getByTestId ( SECONDARY_BALANCE_TEST_ID ) ;
8484
85- expect ( fiatBalance . props . children ) . toBe ( '•••••••••' ) ;
86- expect ( mainBalance . props . children ) . toBe ( '••••••' ) ;
85+ expect ( mainBalance . props . children ) . toBe ( '•••••••••' ) ;
86+ expect ( secondaryBalance . props . children ) . toBe ( '••••••' ) ;
8787 } ) ;
8888} ) ;
0 commit comments