diff --git a/e2e/pages/swaps/SwapView.js b/e2e/pages/swaps/SwapView.js index ba9c1b18d4ae..319d3d04900a 100644 --- a/e2e/pages/swaps/SwapView.js +++ b/e2e/pages/swaps/SwapView.js @@ -35,21 +35,7 @@ class SwapView { return title; } - // Function to check if the button is enabled - async isButtonEnabled(element) { - const attributes = await element.getAttributes(); - return attributes.enabled === true; // Check if enabled is true - } - async tapSwapButton() { - const swapButtonElement = await this.swapButton; - const delay = 500; // Delay in milliseconds - - // Wait until the button is enabled before performing swipe actions - while (!(await this.isButtonEnabled(swapButtonElement))) { - await TestHelpers.delay(delay); // Wait for the specified delay - } - await Gestures.waitAndTap(this.swapButton); } diff --git a/e2e/specs/swaps/swap-token-chart.spec.js b/e2e/specs/swaps/swap-token-chart.spec.js index 9187b191c43d..8b8e2613773d 100644 --- a/e2e/specs/swaps/swap-token-chart.spec.js +++ b/e2e/specs/swaps/swap-token-chart.spec.js @@ -99,8 +99,7 @@ describe(Regression('Swap from Token view'), () => { await SwapView.swapCompleteLabel('ETH', 'DAI'); await device.enableSynchronization(); await TestHelpers.delay(10000); - await TokenOverview.isVisible(); - await TokenOverview.tapBackButton(); + await CommonView.tapBackButton(); // Check the swap activity completed await TabBarComponent.tapActivity(); diff --git a/e2e/specs/swaps/token-details.spec.js b/e2e/specs/swaps/token-details.spec.js index b2f0db4ba994..032614eed4d7 100644 --- a/e2e/specs/swaps/token-details.spec.js +++ b/e2e/specs/swaps/token-details.spec.js @@ -48,7 +48,7 @@ describe(SmokeSwaps('Token Chart Tests'), () => { it('should not display the chart when using Sepolia test network', async () => { await switchToSepoliaNetwork(); await WalletView.tapOnToken(CustomNetworks.Sepolia.providerConfig.ticker); - await Assertions.checkIfNotVisible(TokenOverview.noChartData); + await Assertions.checkIfVisible(TokenOverview.noChartData); await Assertions.checkIfElementToHaveText(TokenOverview.tokenPrice, '$0'); }); });