diff --git a/app/components/UI/AddressInputs/index.test.jsx b/app/components/UI/AddressInputs/index.test.jsx index a32e4577c0d..cc3a6d2bfc5 100644 --- a/app/components/UI/AddressInputs/index.test.jsx +++ b/app/components/UI/AddressInputs/index.test.jsx @@ -23,6 +23,7 @@ const initialState = { name: 'Account 2', }, }, + useTokenDetection: false, }, AddressBookController: { addressBook: { @@ -61,7 +62,7 @@ describe('AddressInputs', () => { fromAccountBalance="0x5" fromAccountName="DUMMY_ACCOUNT" />, - {}, + { state: initialState }, ); expect(container).toMatchSnapshot(); }); @@ -74,7 +75,7 @@ describe('AddressInputs', () => { fromAccountName="DUMMY_ACCOUNT" layout="vertical" />, - {}, + { state: initialState }, ); expect(container).toMatchSnapshot(); }); diff --git a/app/components/UI/Identicon/__snapshots__/index.test.tsx.snap b/app/components/UI/Identicon/__snapshots__/index.test.tsx.snap index 18c2cca7567..9707813bf99 100644 --- a/app/components/UI/Identicon/__snapshots__/index.test.tsx.snap +++ b/app/components/UI/Identicon/__snapshots__/index.test.tsx.snap @@ -1,5 +1,25 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`Identicon should render correctly when provided address found in tokenList and iconUrl is available 1`] = ` + +`; + exports[`Identicon should render correctly when useBlockieIcon is false 1`] = ` { const mockStore = configureMockStore(); + const mockUseTokenList = jest + .mocked(useTokenList) + .mockImplementation(() => ({})); + + it('should render correctly when provided address found in tokenList and iconUrl is available', () => { + const addressMock = '0x0439e60f02a8900a951603950d8d4527f400c3f1'; + mockUseTokenList.mockImplementation(() => [ + { + address: addressMock, + iconUrl: 'https://example.com/icon.png', + }, + ]); + + const initialState = { + settings: { useBlockieIcon: true }, + }; + const store = mockStore(initialState); + + const wrapper = render( + + + , + ); + expect(wrapper).toMatchSnapshot(); + }); it('should render correctly when useBlockieIcon is true', () => { const initialState = { settings: { useBlockieIcon: true }, diff --git a/app/components/UI/Identicon/index.tsx b/app/components/UI/Identicon/index.tsx index 87568aca4eb..6e6b2922566 100644 --- a/app/components/UI/Identicon/index.tsx +++ b/app/components/UI/Identicon/index.tsx @@ -6,6 +6,8 @@ import FadeIn from 'react-native-fade-in-image'; import Jazzicon from 'react-native-jazzicon'; import { connect } from 'react-redux'; import { useTheme } from '../../../util/theme'; +import { useTokenListEntry } from '../../../components/hooks/DisplayName/useTokenListEntry'; +import { NameType } from '../../UI/Name/Name.types'; interface IdenticonProps { /** @@ -43,23 +45,35 @@ const Identicon: React.FC = ({ useBlockieIcon = true, }) => { const { colors } = useTheme(); + const tokenListIcon = useTokenListEntry( + address || '', + NameType.EthereumAddress, + )?.iconUrl; if (!address) return null; const uri = useBlockieIcon && toDataUrl(address); + const styleForBlockieAndTokenIcon = [ + { + height: diameter, + width: diameter, + borderRadius: diameter / 2, + }, + customStyle, + ]; + + if (tokenListIcon) { + return ( + + ); + } + const image = useBlockieIcon ? ( - + ) : ( diff --git a/app/components/UI/Name/Name.test.tsx b/app/components/UI/Name/Name.test.tsx index b927c680ba8..a233e535f09 100644 --- a/app/components/UI/Name/Name.test.tsx +++ b/app/components/UI/Name/Name.test.tsx @@ -14,6 +14,11 @@ jest.mock('../../hooks/DisplayName/useDisplayName', () => ({ default: jest.fn(), })); +jest.mock('../Identicon', () => ({ + __esModule: true, + default: () => 'Identicon', +})); + const UNKNOWN_ADDRESS_CHECKSUMMED = '0x299007B3F9E23B8d432D5f545F8a4a2B3E9A5B4e'; const EXPECTED_UNKNOWN_ADDRESS_CHECKSUMMED = '0x29900...A5B4e'; diff --git a/app/components/UI/Name/__snapshots__/Name.test.tsx.snap b/app/components/UI/Name/__snapshots__/Name.test.tsx.snap index 75d9eb71ec6..2d61fb1f825 100644 --- a/app/components/UI/Name/__snapshots__/Name.test.tsx.snap +++ b/app/components/UI/Name/__snapshots__/Name.test.tsx.snap @@ -16,64 +16,7 @@ exports[`Name recognized address should return name 1`] = ` } } > - - - - - - + Identicon -`; \ No newline at end of file +`; diff --git a/app/components/Views/confirmations/Send/index.test.tsx b/app/components/Views/confirmations/Send/index.test.tsx index a11f2bb49d6..21252ed0ad9 100644 --- a/app/components/Views/confirmations/Send/index.test.tsx +++ b/app/components/Views/confirmations/Send/index.test.tsx @@ -50,6 +50,9 @@ const initialState = { TokenBalancesController: { contractBalances: {}, }, + TokenListController: { + tokenList: [], + }, PreferencesController: { featureFlags: {}, identities: { diff --git a/app/components/hooks/DisplayName/useTokenList.test.ts b/app/components/hooks/DisplayName/useTokenList.test.ts index c46a8084ab6..0e2860e06d5 100644 --- a/app/components/hooks/DisplayName/useTokenList.test.ts +++ b/app/components/hooks/DisplayName/useTokenList.test.ts @@ -1,19 +1,19 @@ import React from 'react'; -import { type TokenListMap } from '@metamask/assets-controllers'; +import { type TokenListToken } from '@metamask/assets-controllers'; import { selectChainId } from '../../../selectors/networkController'; import { selectUseTokenDetection } from '../../../selectors/preferencesController'; -import { selectTokenList } from '../../../selectors/tokenListController'; +import { selectTokenListArray } from '../../../selectors/tokenListController'; import { isMainnetByChainId } from '../../../util/networks'; import useTokenList from './useTokenList'; const MAINNET_TOKEN_ADDRESS_MOCK = '0xdAC17F958D2ee523a2206206994597C13D831ec7'; const MAINNET_TOKEN_NAME_MOCK = 'Tether USD'; -const normalizedMainnetTokenListMock = { - [MAINNET_TOKEN_ADDRESS_MOCK.toLowerCase()]: { +const normalizedMainnetTokenListMock = [ + { name: MAINNET_TOKEN_NAME_MOCK, }, -}; +]; jest.mock('@metamask/contract-metadata', () => ({ __esModule: true, default: { @@ -36,7 +36,7 @@ jest.mock('../../../selectors/preferencesController', () => ({ })); jest.mock('../../../selectors/tokenListController', () => ({ - selectTokenList: jest.fn(), + selectTokenListArray: jest.fn(), })); jest.mock('../../../util/networks', () => ({ @@ -46,27 +46,29 @@ jest.mock('../../../util/networks', () => ({ const CHAIN_ID_MOCK = '0x1'; const TOKEN_NAME_MOCK = 'MetaMask Token'; const TOKEN_ADDRESS_MOCK = '0x0439e60F02a8900a951603950d8D4527f400C3f1'; -const TOKEN_LIST_MOCK = { - [TOKEN_ADDRESS_MOCK]: { +const TOKEN_LIST_ARRAY_MOCK = [ + { name: TOKEN_NAME_MOCK, + address: TOKEN_ADDRESS_MOCK, }, -} as unknown as TokenListMap; -const normalizedTokenListMock = { - [TOKEN_ADDRESS_MOCK.toLowerCase()]: { +] as unknown as TokenListToken[]; +const normalizedTokenListMock = [ + { + address: TOKEN_ADDRESS_MOCK, name: TOKEN_NAME_MOCK, }, -}; +]; describe('useTokenList', () => { const selectChainIdMock = jest.mocked(selectChainId); const selectUseTokenDetectionMock = jest.mocked(selectUseTokenDetection); - const selectTokenListMock = jest.mocked(selectTokenList); + const selectTokenListArrayMock = jest.mocked(selectTokenListArray); const isMainnetByChainIdMock = jest.mocked(isMainnetByChainId); beforeEach(() => { jest.resetAllMocks(); selectChainIdMock.mockReturnValue(CHAIN_ID_MOCK); selectUseTokenDetectionMock.mockReturnValue(true); - selectTokenListMock.mockReturnValue(TOKEN_LIST_MOCK); + selectTokenListArrayMock.mockReturnValue(TOKEN_LIST_ARRAY_MOCK); isMainnetByChainIdMock.mockReturnValue(true); const memoizedValues = new Map(); diff --git a/app/components/hooks/DisplayName/useTokenList.ts b/app/components/hooks/DisplayName/useTokenList.ts index 6726fffbbf3..3e99976658e 100644 --- a/app/components/hooks/DisplayName/useTokenList.ts +++ b/app/components/hooks/DisplayName/useTokenList.ts @@ -1,38 +1,27 @@ import { useMemo } from 'react'; -import { type TokenListMap } from '@metamask/assets-controllers'; import contractMap from '@metamask/contract-metadata'; - +import { TokenListToken } from '@metamask/assets-controllers'; import { useSelector } from 'react-redux'; import { selectChainId } from '../../../selectors/networkController'; import { selectUseTokenDetection } from '../../../selectors/preferencesController'; -import { selectTokenList } from '../../../selectors/tokenListController'; +import { selectTokenListArray } from '../../../selectors/tokenListController'; import { isMainnetByChainId } from '../../../util/networks'; -function normalizeTokenAddresses(tokenMap: TokenListMap) { - return Object.keys(tokenMap).reduce((acc, address) => { - const tokenMetadata = tokenMap[address]; - return { - ...acc, - [address.toLowerCase()]: { - ...tokenMetadata, - }, - }; - }, {}); -} - -const NORMALIZED_MAINNET_TOKEN_LIST = normalizeTokenAddresses(contractMap); +const NORMALIZED_MAINNET_TOKEN_ARRAY = Object.values( + contractMap, +) as TokenListToken[]; -export default function useTokenList(): TokenListMap { +export default function useTokenList(): TokenListToken[] { const chainId = useSelector(selectChainId); const isMainnet = isMainnetByChainId(chainId); const isTokenDetectionEnabled = useSelector(selectUseTokenDetection); - const tokenList = useSelector(selectTokenList); + const tokenListArray = useSelector(selectTokenListArray); const shouldUseStaticList = !isTokenDetectionEnabled && isMainnet; return useMemo(() => { if (shouldUseStaticList) { - return NORMALIZED_MAINNET_TOKEN_LIST; + return NORMALIZED_MAINNET_TOKEN_ARRAY; } - return normalizeTokenAddresses(tokenList); - }, [shouldUseStaticList, tokenList]); + return tokenListArray; + }, [shouldUseStaticList, tokenListArray]); } diff --git a/app/components/hooks/DisplayName/useTokenListEntry.test.ts b/app/components/hooks/DisplayName/useTokenListEntry.test.ts index 7aeb4144129..bd576c0bb28 100644 --- a/app/components/hooks/DisplayName/useTokenListEntry.test.ts +++ b/app/components/hooks/DisplayName/useTokenListEntry.test.ts @@ -1,4 +1,4 @@ -import { TokenListMap } from '@metamask/assets-controllers'; +import { TokenListToken } from '@metamask/assets-controllers'; import { NameType } from '../../UI/Name/Name.types'; import { useTokenListEntry } from './useTokenListEntry'; import useTokenList from './useTokenList'; @@ -18,12 +18,13 @@ describe('useTokenListEntry', () => { beforeEach(() => { jest.resetAllMocks(); - useTokenListMock.mockReturnValue({ - [TOKEN_ADDRESS_MOCK.toLowerCase()]: { + useTokenListMock.mockReturnValue([ + { + address: TOKEN_ADDRESS_MOCK.toLowerCase(), name: TOKEN_NAME_MOCK, symbol: TOKEN_SYMBOL_MOCK, }, - } as TokenListMap); + ] as unknown as TokenListToken[]); }); it('returns undefined if no token found', () => { diff --git a/app/components/hooks/DisplayName/useTokenListEntry.ts b/app/components/hooks/DisplayName/useTokenListEntry.ts index 6fecba6303f..607ceab0eda 100644 --- a/app/components/hooks/DisplayName/useTokenListEntry.ts +++ b/app/components/hooks/DisplayName/useTokenListEntry.ts @@ -1,3 +1,4 @@ +import { TokenListToken } from '@metamask/assets-controllers'; import { NameType } from '../../UI/Name/Name.types'; import useTokenList from './useTokenList'; @@ -7,16 +8,18 @@ export interface UseTokenListEntriesRequest { } export function useTokenListEntries(requests: UseTokenListEntriesRequest[]) { - const tokenList = useTokenList(); + const tokenListArray = useTokenList(); return requests.map(({ value, type }) => { - if (type !== NameType.EthereumAddress) { + if (type !== NameType.EthereumAddress || !value) { return null; } const normalizedValue = value.toLowerCase(); - return tokenList[normalizedValue]; + return tokenListArray.find( + (token: TokenListToken) => token.address === normalizedValue, + ); }); } diff --git a/app/selectors/tokenListController.ts b/app/selectors/tokenListController.ts index 4cdee2c6586..294c3a6ed3e 100644 --- a/app/selectors/tokenListController.ts +++ b/app/selectors/tokenListController.ts @@ -2,6 +2,7 @@ import { createSelector } from 'reselect'; import { TokenListState } from '@metamask/assets-controllers'; import { RootState } from '../reducers'; import { tokenListToArray } from '../util/tokens'; +import { createDeepEqualSelector } from '../selectors/util'; const selectTokenLIstConstrollerState = (state: RootState) => state.engine.backgroundState.TokenListController; @@ -20,7 +21,7 @@ export const selectTokenList = createSelector( * Return token list array from TokenListController. * Can pass directly into useSelector. */ -export const selectTokenListArray = createSelector( +export const selectTokenListArray = createDeepEqualSelector( selectTokenList, tokenListToArray, ); diff --git a/bitrise.yml b/bitrise.yml index 5a2c7b440ce..cecb20a724c 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -117,6 +117,8 @@ stages: workflows: - run_tag_smoke_accounts_ios: {} - run_tag_smoke_accounts_android: {} + - run_tag_smoke_assets_ios: {} + - run_tag_smoke_assets_android: {} - run_tag_smoke_confirmations_ios: {} - run_tag_smoke_confirmations_android: {} - run_tag_smoke_swaps_ios: {} @@ -139,6 +141,8 @@ stages: - run_tag_smoke_confirmations_android: {} - run_tag_smoke_accounts_ios: {} - run_tag_smoke_accounts_android: {} + - run_tag_smoke_assets_ios: {} + - run_tag_smoke_assets_android: {} - run_tag_smoke_swaps_ios: {} - run_tag_smoke_swaps_android: {} - run_tag_smoke_core_ios: {} @@ -470,6 +474,22 @@ workflows: - TEST_SUITE_TAG: '.*SmokeAccounts.*' after_run: - android_e2e_test + run_tag_smoke_assets_ios: + envs: + - TEST_SUITE_FOLDER: './e2e/specs/assets/*' + - TEST_SUITE_TAG: '.*SmokeAssets.*' + after_run: + - ios_e2e_test + run_tag_smoke_assets_android: + meta: + bitrise.io: + stack: linux-docker-android-20.04 + machine_type_id: elite-xl + envs: + - TEST_SUITE_FOLDER: './e2e/specs/assets/*' + - TEST_SUITE_TAG: '.*SmokeAssets.*' + after_run: + - android_e2e_test run_tag_smoke_confirmations_ios: envs: - TEST_SUITE_FOLDER: './e2e/specs/confirmations/*' diff --git a/e2e/fixtures/fixture-builder.js b/e2e/fixtures/fixture-builder.js index 4ed0bc8e979..62b3e396547 100644 --- a/e2e/fixtures/fixture-builder.js +++ b/e2e/fixtures/fixture-builder.js @@ -2,7 +2,7 @@ import { getGanachePort } from './utils'; import { merge } from 'lodash'; -import { PopularNetworksList } from '../resources/networks.e2e'; +import { CustomNetworks, PopularNetworksList } from '../resources/networks.e2e'; const DAPP_URL = 'localhost'; /** @@ -715,6 +715,22 @@ class FixtureBuilder { return this; } + withSepoliaNetwork() { + const fixtures = this.fixture.state.engine.backgroundState; + + fixtures.NetworkController = { + isCustomNetwork: true, + providerConfig: { + type: 'rpc', + chainId: CustomNetworks.Sepolia.providerConfig.chainId, + rpcUrl: CustomNetworks.Sepolia.providerConfig.rpcTarget, + nickname: CustomNetworks.Sepolia.providerConfig.nickname, + ticker: CustomNetworks.Sepolia.providerConfig.ticker, + }, + }; + return this; + } + withPopularNetworks() { const fixtures = this.fixture.state.engine.backgroundState; const networkIDs = {}; // Object to store network configurations diff --git a/e2e/pages/Send/TransactionConfirmView.js b/e2e/pages/Send/TransactionConfirmView.js index 93ce056d05c..59dc11cb5c5 100644 --- a/e2e/pages/Send/TransactionConfirmView.js +++ b/e2e/pages/Send/TransactionConfirmView.js @@ -1,6 +1,5 @@ import Gestures from '../../utils/Gestures'; import Matchers from '../../utils/Matchers'; - import { EditGasViewSelectorsText, EditGasViewSelectorsIDs, @@ -40,7 +39,7 @@ class TransactionConfirmationView { } get transactionAmount() { - return Matchers.getElementByText( + return Matchers.getElementByID( TransactionConfirmViewSelectorsIDs.COMFIRM_TXN_AMOUNT, ); } @@ -81,6 +80,8 @@ class TransactionConfirmationView { } async tapEstimatedGasLink() { + await Gestures.swipe(this.transactionAmount, 'up', 'fast'); + await Gestures.waitAndTap(this.estimatedGasLink); } diff --git a/e2e/resources/networks.e2e.js b/e2e/resources/networks.e2e.js index 24e43f00a87..a348bded2e6 100644 --- a/e2e/resources/networks.e2e.js +++ b/e2e/resources/networks.e2e.js @@ -3,7 +3,6 @@ import { toHex } from '@metamask/controller-utils'; /* eslint-disable @typescript-eslint/no-require-imports, import/no-commonjs */ const InfuraKey = process.env.MM_INFURA_PROJECT_ID; const infuraProjectId = InfuraKey === 'null' ? '' : InfuraKey; -const TENDERLY_KEY = process.env.TENDERLY_NETWORK_ID; const PopularNetworksList = { Avalanche: { @@ -85,9 +84,9 @@ const CustomNetworks = { }, Sepolia: { providerConfig: { - type: 'mainnet', - chainId: '11155111', - rpcTarget: 'https://sepolia.infura.io/v3/', + type: 'rpc', + chainId: '0xaa36a7', + rpcTarget: `https://sepolia.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161`, nickname: 'Sepolia', ticker: 'SepoliaETH', }, @@ -98,7 +97,7 @@ const CustomNetworks = { providerConfig: { type: 'rpc', chainId: '0x1', - rpcUrl: `https://rpc.tenderly.co/fork/${TENDERLY_KEY}`, + rpcUrl: `https://rpc.tenderly.co/fork/bbfe5a2e-2426-4512-a5f8-46ce85fe9ad6`, nickname: 'Tenderly', ticker: 'ETH', }, diff --git a/e2e/specs/assets/import-tokens.spec.js b/e2e/specs/assets/import-tokens.spec.js index aa87e42f14d..f85b160f879 100644 --- a/e2e/specs/assets/import-tokens.spec.js +++ b/e2e/specs/assets/import-tokens.spec.js @@ -1,5 +1,5 @@ 'use strict'; -import { SmokeCore } from '../../tags'; +import { SmokeAssets } from '../../tags'; import TestHelpers from '../../helpers'; import WalletView from '../../pages/WalletView'; import ImportTokensView from '../../pages/ImportTokensView'; @@ -16,7 +16,7 @@ import ConfirmAddAssetView from '../../pages/ConfirmAddAsset'; const fixtureServer = new FixtureServer(); -describe(SmokeCore('Import Tokens'), () => { +describe(SmokeAssets('Import Tokens'), () => { beforeAll(async () => { await TestHelpers.reverseServerPort(); const fixture = new FixtureBuilder().build(); diff --git a/e2e/specs/assets/token-detection-import-all.spec.js b/e2e/specs/assets/token-detection-import-all.spec.js index 1beb7f71a14..b13a2c42593 100644 --- a/e2e/specs/assets/token-detection-import-all.spec.js +++ b/e2e/specs/assets/token-detection-import-all.spec.js @@ -1,11 +1,11 @@ 'use strict'; import { importWalletWithRecoveryPhrase } from '../../viewHelper'; -import { SmokeCore } from '../../tags'; +import { SmokeAssets } from '../../tags'; import WalletView from '../../pages/WalletView'; import DetectedTokensView from '../../pages/wallet/DetectedTokensView'; import Assertions from '../../utils/Assertions'; -describe(SmokeCore('Import all tokens detected'), () => { +describe(SmokeAssets('Import all tokens detected'), () => { beforeAll(async () => { await device.launchApp(); }); diff --git a/e2e/specs/confirmations/advanced-gas-fees.spec.js b/e2e/specs/confirmations/advanced-gas-fees.spec.js index 480bb443f23..24c63da4812 100644 --- a/e2e/specs/confirmations/advanced-gas-fees.spec.js +++ b/e2e/specs/confirmations/advanced-gas-fees.spec.js @@ -15,9 +15,6 @@ import WalletActionsModal from '../../pages/modals/WalletActionsModal'; import TestHelpers from '../../helpers'; import Assertions from '../../utils/Assertions'; import { AmountViewSelectorsText } from '../../selectors/SendFlow/AmountView.selectors'; -import NetworkListModal from '../../pages/modals/NetworkListModal'; -import NetworkEducationModal from '../../pages/modals/NetworkEducationModal'; -import { CustomNetworks } from '../../resources/networks.e2e'; const VALID_ADDRESS = '0xebe6CcB6B55e1d094d9c58980Bc10Fed69932cAb'; @@ -30,7 +27,7 @@ describe(SmokeConfirmations('Advanced Gas Fees and Priority Tests'), () => { it('should edit priority gas settings and send ETH', async () => { await withFixtures( { - fixture: new FixtureBuilder().withGanacheNetwork().build(), + fixture: new FixtureBuilder().withSepoliaNetwork().build(), restartDevice: true, ganacheOptions: defaultGanacheOptions, }, @@ -40,15 +37,6 @@ describe(SmokeConfirmations('Advanced Gas Fees and Priority Tests'), () => { // Check that we are on the wallet screen await WalletView.isVisible(); - await WalletView.tapNetworksButtonOnNavBar(); - await TestHelpers.delay(2000); - await NetworkListModal.changeNetworkTo( - CustomNetworks.Sepolia.providerConfig.nickname, - ); - await Assertions.checkIfVisible(NetworkEducationModal.container); - await NetworkEducationModal.tapGotItButton(); - await Assertions.checkIfNotVisible(NetworkEducationModal.container); - //Tap send Icon await TestHelpers.delay(2000); await TabBarComponent.tapActions(); diff --git a/e2e/specs/quarantine/import-nft.failing.js b/e2e/specs/quarantine/import-nft.failing.js index 6e352a6cd23..68eca90dcf0 100644 --- a/e2e/specs/quarantine/import-nft.failing.js +++ b/e2e/specs/quarantine/import-nft.failing.js @@ -1,5 +1,5 @@ 'use strict'; -import { SmokeCore } from '../../tags'; +import { SmokeAssets } from '../../tags'; import TestHelpers from '../../helpers'; import WalletView from '../../pages/WalletView'; import AddCustomTokenView from '../../pages/AddCustomTokenView'; @@ -11,7 +11,7 @@ import { import { SMART_CONTRACTS } from '../../../app/util/test/smart-contracts'; import FixtureBuilder from '../../fixtures/fixture-builder'; -describe(SmokeCore('Import NFT'), () => { +describe(SmokeAssets('Import NFT'), () => { beforeAll(async () => { jest.setTimeout(150000); }); diff --git a/e2e/specs/settings/fiat-on-testnets.spec.js b/e2e/specs/settings/fiat-on-testnets.spec.js index 063198e0f3d..ab911a2fb7c 100644 --- a/e2e/specs/settings/fiat-on-testnets.spec.js +++ b/e2e/specs/settings/fiat-on-testnets.spec.js @@ -1,5 +1,5 @@ 'use strict'; -import { SmokeCore } from '../../tags'; +import { SmokeAssets } from '../../tags'; import SettingsView from '../../pages/Settings/SettingsView'; import TabBarComponent from '../../pages/TabBarComponent'; import { loginToApp } from '../../viewHelper'; @@ -18,7 +18,7 @@ import TestHelpers from '../../helpers.js'; const SEPOLIA = CustomNetworks.Sepolia.providerConfig.nickname; -describe(SmokeCore('Fiat On Testnets Setting'), () => { +describe(SmokeAssets('Fiat On Testnets Setting'), () => { beforeEach(async () => { jest.setTimeout(150000); await TestHelpers.reverseServerPort(); diff --git a/e2e/specs/swaps/swap-action-smoke.spec.js b/e2e/specs/swaps/swap-action-smoke.spec.js index a79378e5030..08d198fc8e0 100644 --- a/e2e/specs/swaps/swap-action-smoke.spec.js +++ b/e2e/specs/swaps/swap-action-smoke.spec.js @@ -83,6 +83,7 @@ describe(SmokeSwaps('Swap from Actions'), () => { await SwapView.tapIUnderstandPriceWarning(); await SwapView.swipeToSwap(); await SwapView.waitForSwapToComplete(sourceTokenSymbol, destTokenSymbol); + await Assertions.checkIfVisible(TabBarComponent.tabBarActivityButton); await TabBarComponent.tapActivity(); await ActivitiesView.isVisible(); await ActivitiesView.tapOnSwapActivity( diff --git a/e2e/tags.js b/e2e/tags.js index 9a441bcc1b8..8e78b934e57 100644 --- a/e2e/tags.js +++ b/e2e/tags.js @@ -5,6 +5,7 @@ const tags = { smokeConfirmations: 'SmokeConfirmations', SmokeSwaps: 'SmokeSwaps', SmokeRest: 'SmokeRest', + smokeAssets: 'smokeAssets', }; const Regression = (testName) => `${tags.regression} ${testName}`; @@ -13,5 +14,13 @@ const SmokeCore = (testName) => `${tags.smokeCore} ${testName}`; const SmokeConfirmations = (testName) => `${tags.smokeConfirmations} ${testName}`; const SmokeSwaps = (testName) => `${tags.SmokeSwaps} ${testName}`; +const SmokeAssets = (testName) => `${tags.smokeAssets} ${testName}`; -export { Regression, SmokeAccounts, SmokeCore, SmokeConfirmations, SmokeSwaps }; +export { + Regression, + SmokeAccounts, + SmokeCore, + SmokeConfirmations, + SmokeSwaps, + SmokeAssets, +};