From 771102a51a566374e23dc5e7e42567102c28977b Mon Sep 17 00:00:00 2001 From: Priya Narayanaswamy Date: Wed, 2 Oct 2024 11:37:29 +0200 Subject: [PATCH] test: Improve test flakiness --- test/e2e/helpers.js | 2 +- test/e2e/tests/tokens/custom-token-send-transfer.spec.js | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/test/e2e/helpers.js b/test/e2e/helpers.js index cf337b84e8f5..2e76f1d03589 100644 --- a/test/e2e/helpers.js +++ b/test/e2e/helpers.js @@ -858,7 +858,7 @@ const sendScreenToConfirmScreen = async ( ) => { await openActionMenuAndStartSendFlow(driver); await driver.fill('[data-testid="ens-input"]', recipientAddress); - await driver.fill('.unit-input__input', quantity); + await driver.fill('[data-testid="currency-input"]', quantity); // check if element exists and click it await driver.clickElementSafe({ diff --git a/test/e2e/tests/tokens/custom-token-send-transfer.spec.js b/test/e2e/tests/tokens/custom-token-send-transfer.spec.js index de2aa2addcf8..700a51cb2944 100644 --- a/test/e2e/tests/tokens/custom-token-send-transfer.spec.js +++ b/test/e2e/tests/tokens/custom-token-send-transfer.spec.js @@ -2,7 +2,6 @@ const { strict: assert } = require('assert'); const { withFixtures, defaultGanacheOptions, - switchToNotificationWindow, openDapp, unlockWallet, editGasFeeForm, @@ -118,7 +117,7 @@ describe('Transfer custom tokens @no-mmi', function () { // transfer token from dapp await openDapp(driver, contractAddress); await driver.clickElement({ text: 'Transfer Tokens', tag: 'button' }); - await switchToNotificationWindow(driver); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); await driver.waitForSelector({ text: '1.5 TST', tag: 'h1' }); // edit gas fee @@ -174,7 +173,7 @@ describe('Transfer custom tokens @no-mmi', function () { text: 'Transfer Tokens Without Gas', tag: 'button', }); - await switchToNotificationWindow(driver); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); await driver.waitForSelector({ text: '1.5 TST', tag: 'h1' }); await driver.clickElement({ text: 'Confirm', tag: 'button' });