From ce43301e9e27f4a47112e1ee411041f1bcec3313 Mon Sep 17 00:00:00 2001 From: seaona Date: Wed, 19 Feb 2025 18:02:17 +0100 Subject: [PATCH 1/4] flakiness fixes --- .../pages/confirmations/redesign/confirmation.ts | 4 +++- test/e2e/page-objects/pages/home/activity-list.ts | 4 +++- .../speed-up-and-cancel-confirmations.spec.ts | 13 ++++++------- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/test/e2e/page-objects/pages/confirmations/redesign/confirmation.ts b/test/e2e/page-objects/pages/confirmations/redesign/confirmation.ts index 9ad3e4f81007..7d197b8baf46 100644 --- a/test/e2e/page-objects/pages/confirmations/redesign/confirmation.ts +++ b/test/e2e/page-objects/pages/confirmations/redesign/confirmation.ts @@ -45,7 +45,9 @@ class Confirmation { } async clickFooterConfirmButton() { - await this.driver.clickElement(this.footerConfirmButton); + await this.driver.clickElementAndWaitForWindowToClose( + this.footerConfirmButton, + ); } async clickHeaderAccountDetailsButton() { diff --git a/test/e2e/page-objects/pages/home/activity-list.ts b/test/e2e/page-objects/pages/home/activity-list.ts index 4d98908e6439..32082b7c41e1 100644 --- a/test/e2e/page-objects/pages/home/activity-list.ts +++ b/test/e2e/page-objects/pages/home/activity-list.ts @@ -252,7 +252,9 @@ class ActivityListPage { } async click_confirmTransactionReplacement() { - await this.driver.clickElement(this.confirmTransactionReplacementButton); + await this.driver.clickElementAndWaitToDisappear( + this.confirmTransactionReplacementButton, + ); } async check_waitForTransactionStatus(status: 'confirmed' | 'cancelled') { diff --git a/test/e2e/tests/confirmations/transactions/speed-up-and-cancel-confirmations.spec.ts b/test/e2e/tests/confirmations/transactions/speed-up-and-cancel-confirmations.spec.ts index bc41a491708f..fd85c073a1d1 100644 --- a/test/e2e/tests/confirmations/transactions/speed-up-and-cancel-confirmations.spec.ts +++ b/test/e2e/tests/confirmations/transactions/speed-up-and-cancel-confirmations.spec.ts @@ -10,7 +10,6 @@ import { createDappTransaction } from '../../../page-objects/flows/transaction'; import Confirmation from '../../../page-objects/pages/confirmations/redesign/confirmation'; import ActivityListPage from '../../../page-objects/pages/home/activity-list'; import HomePage from '../../../page-objects/pages/home/homepage'; -import { SMART_CONTRACTS } from '../../../seeder/smart-contracts'; import { TestSuiteArguments } from './shared'; const { WINDOW_TITLES, withFixtures } = require('../../../helpers'); @@ -28,10 +27,9 @@ describe('Speed Up and Cancel Transaction Tests', function () { .withPermissionControllerConnectedToTestDapp() .build(), localNodeOptions: defaultGanacheOptionsForType2Transactions, - smartContract: SMART_CONTRACTS.PIGGYBANK, title: this.test?.fullTitle(), }, - async ({ driver }: TestSuiteArguments) => { + async ({ driver, ganacheServer }: TestSuiteArguments) => { await unlockWallet(driver); // Create initial stuck transaction @@ -43,7 +41,6 @@ describe('Speed Up and Cancel Transaction Tests', function () { }); // Wait for confirmation dialog and confirm initial transaction - await driver.waitUntilXWindowHandles(3); await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); const confirmationPage = new Confirmation(driver); @@ -53,6 +50,7 @@ describe('Speed Up and Cancel Transaction Tests', function () { await driver.switchToWindowWithTitle( WINDOW_TITLES.ExtensionInFullScreenView, ); + await ganacheServer?.mineBlock(); const homePage = new HomePage(driver); await homePage.goToActivityList(); @@ -63,6 +61,7 @@ describe('Speed Up and Cancel Transaction Tests', function () { await activityListPage.click_transactionListItem(); await activityListPage.click_speedUpTransaction(); await activityListPage.click_confirmTransactionReplacement(); + await ganacheServer?.mineBlock(); await activityListPage.check_waitForTransactionStatus('confirmed'); }, @@ -79,10 +78,9 @@ describe('Speed Up and Cancel Transaction Tests', function () { .withPermissionControllerConnectedToTestDapp() .build(), localNodeOptions: defaultGanacheOptionsForType2Transactions, - smartContract: SMART_CONTRACTS.PIGGYBANK, title: this.test?.fullTitle(), }, - async ({ driver }: TestSuiteArguments) => { + async ({ driver, ganacheServer }: TestSuiteArguments) => { await unlockWallet(driver); // Create initial stuck transaction @@ -93,11 +91,11 @@ describe('Speed Up and Cancel Transaction Tests', function () { to: DEFAULT_FIXTURE_ACCOUNT, }); - await driver.waitUntilXWindowHandles(3); await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); const confirmationPage = new Confirmation(driver); await confirmationPage.clickFooterConfirmButton(); + await ganacheServer?.mineBlock(); await driver.switchToWindowWithTitle( WINDOW_TITLES.ExtensionInFullScreenView, @@ -111,6 +109,7 @@ describe('Speed Up and Cancel Transaction Tests', function () { await activityListPage.click_cancelTransaction(); await activityListPage.click_confirmTransactionReplacement(); + await ganacheServer?.mineBlock(); await activityListPage.check_waitForTransactionStatus('cancelled'); }, From 46b8fee16fd3dd6e5a6b79a95e48d885e275c75e Mon Sep 17 00:00:00 2001 From: seaona Date: Wed, 19 Feb 2025 18:18:22 +0100 Subject: [PATCH 2/4] enable testrun in ci --- .circleci/config.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c46b88be39d9..f2561ee18031 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -138,7 +138,6 @@ workflows: requires: - prep-deps - test-e2e-chrome-webpack: - <<: *main_master_rc_only requires: - prep-build-test-webpack - get-changed-files-with-git-diff @@ -147,7 +146,6 @@ workflows: - prep-build-test - get-changed-files-with-git-diff - test-e2e-firefox: - <<: *main_master_rc_only requires: - prep-build-test-mv2 - get-changed-files-with-git-diff From 2e08273058f8c2d23e2d589768c429755b69bc5d Mon Sep 17 00:00:00 2001 From: seaona Date: Wed, 19 Feb 2025 18:34:14 +0100 Subject: [PATCH 3/4] fix --- .../page-objects/pages/confirmations/redesign/confirmation.ts | 4 +--- test/e2e/page-objects/pages/home/activity-list.ts | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/test/e2e/page-objects/pages/confirmations/redesign/confirmation.ts b/test/e2e/page-objects/pages/confirmations/redesign/confirmation.ts index 7d197b8baf46..9ad3e4f81007 100644 --- a/test/e2e/page-objects/pages/confirmations/redesign/confirmation.ts +++ b/test/e2e/page-objects/pages/confirmations/redesign/confirmation.ts @@ -45,9 +45,7 @@ class Confirmation { } async clickFooterConfirmButton() { - await this.driver.clickElementAndWaitForWindowToClose( - this.footerConfirmButton, - ); + await this.driver.clickElement(this.footerConfirmButton); } async clickHeaderAccountDetailsButton() { diff --git a/test/e2e/page-objects/pages/home/activity-list.ts b/test/e2e/page-objects/pages/home/activity-list.ts index 32082b7c41e1..4d98908e6439 100644 --- a/test/e2e/page-objects/pages/home/activity-list.ts +++ b/test/e2e/page-objects/pages/home/activity-list.ts @@ -252,9 +252,7 @@ class ActivityListPage { } async click_confirmTransactionReplacement() { - await this.driver.clickElementAndWaitToDisappear( - this.confirmTransactionReplacementButton, - ); + await this.driver.clickElement(this.confirmTransactionReplacementButton); } async check_waitForTransactionStatus(status: 'confirmed' | 'cancelled') { From bfee23b7424dd36ae02d5e95429728baa63d9538 Mon Sep 17 00:00:00 2001 From: seaona Date: Wed, 19 Feb 2025 18:54:16 +0100 Subject: [PATCH 4/4] add ci filtrers back --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index f2561ee18031..c46b88be39d9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -138,6 +138,7 @@ workflows: requires: - prep-deps - test-e2e-chrome-webpack: + <<: *main_master_rc_only requires: - prep-build-test-webpack - get-changed-files-with-git-diff @@ -146,6 +147,7 @@ workflows: - prep-build-test - get-changed-files-with-git-diff - test-e2e-firefox: + <<: *main_master_rc_only requires: - prep-build-test-mv2 - get-changed-files-with-git-diff