diff --git a/e2e/fixtures/fixture-builder.js b/e2e/fixtures/fixture-builder.js index a39cce3ec0f..5f81a06d709 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'; /** @@ -719,6 +719,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/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/settings/fiat-on-testnets.spec.js b/e2e/specs/settings/fiat-on-testnets.spec.js index 0b308dc8c88..906c2a6649b 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 { WalletViewSelectorsIDs } from '../../selectors/wallet/WalletView.select 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(