From 8983ec9d67d60f7880d1b902d447250e93bc5d84 Mon Sep 17 00:00:00 2001 From: itaven Date: Fri, 28 Jun 2024 19:49:11 +0400 Subject: [PATCH 1/3] fix: import_key() MM refactor --- packages/wallets/src/metamask/metamask.page.ts | 8 +++----- wallets-testing/playwright.config.ts | 2 +- wallets-testing/test/widgets/ethereum.spec.ts | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/wallets/src/metamask/metamask.page.ts b/packages/wallets/src/metamask/metamask.page.ts index 711735f1..32c0aa3a 100644 --- a/packages/wallets/src/metamask/metamask.page.ts +++ b/packages/wallets/src/metamask/metamask.page.ts @@ -42,6 +42,7 @@ export class MetamaskPage implements WalletPage { .waitFor({ state: 'visible' }); await this.unlock(); if (await this.networkDisplay.isVisible()) { + console.log('da visible'); await this.closePopover(); } }); @@ -253,11 +254,8 @@ export class MetamaskPage implements WalletPage { await test.step('Import key', async () => { if (!this.page) throw "Page isn't ready"; await this.navigate(); - // Remove me when MM to be more stable - do { - await this.page.reload(); - await this.closePopover(); - } while (!(await this.page.getByTestId('account-menu-icon').isVisible())); + await this.closePopover(); + await this.page.click('data-testid=account-menu-icon'); await this.page.click('text=Add account or hardware wallet'); await this.page.click('text=Import account'); diff --git a/wallets-testing/playwright.config.ts b/wallets-testing/playwright.config.ts index b8c7ec70..b7d2437e 100644 --- a/wallets-testing/playwright.config.ts +++ b/wallets-testing/playwright.config.ts @@ -23,7 +23,7 @@ const config: PlaywrightTestConfig = { /* Run tests in files in parallel */ fullyParallel: true, /* Fail the build on CI if you accidentally left test.only in the source code. */ - forbidOnly: !!process.env.CI, + // forbidOnly: !!process.env.CI, /* Retry on CI only */ retries: process.env.CI ? 2 : 0, /* Opt out of parallel tests on CI. */ diff --git a/wallets-testing/test/widgets/ethereum.spec.ts b/wallets-testing/test/widgets/ethereum.spec.ts index e94c1b8e..359d6de9 100644 --- a/wallets-testing/test/widgets/ethereum.spec.ts +++ b/wallets-testing/test/widgets/ethereum.spec.ts @@ -29,7 +29,7 @@ test.describe('Ethereum', () => { browserService = moduleFixture.get(BrowserService); }); - test(`Metamask stake`, async () => { + test.only(`Metamask stake`, async () => { await browserService.setupWithNode( METAMASK_COMMON_CONFIG, ETHEREUM_WIDGET_CONFIG, From 1d707e8486d7885923173d92d47f9046ae11bc50 Mon Sep 17 00:00:00 2001 From: itaven Date: Fri, 28 Jun 2024 19:50:07 +0400 Subject: [PATCH 2/3] fix: repeat each --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a8b1e297..207e8180 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,7 +34,7 @@ jobs: run: npx playwright install --with-deps - name: Run wallets tests - run: xvfb-run --auto-servernum -- yarn test:widgets + run: xvfb-run --auto-servernum -- yarn test:widgets --repeat-each 10 working-directory: wallets-testing env: RPC_URL: ${{ secrets.RPC_URL }} From 6a23f4fd6212e4b0841a314771309db511e01a04 Mon Sep 17 00:00:00 2001 From: itaven Date: Tue, 30 Jul 2024 11:22:21 +0300 Subject: [PATCH 3/3] debug: repeat-each 15 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 207e8180..df42124e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,7 +34,7 @@ jobs: run: npx playwright install --with-deps - name: Run wallets tests - run: xvfb-run --auto-servernum -- yarn test:widgets --repeat-each 10 + run: xvfb-run --auto-servernum -- yarn test:widgets --repeat-each 15 working-directory: wallets-testing env: RPC_URL: ${{ secrets.RPC_URL }}