From 5c6dab4c7cb15d67504fd80581e5323b95607a56 Mon Sep 17 00:00:00 2001 From: Horacio Herrera Date: Mon, 8 Jan 2024 12:19:13 +0100 Subject: [PATCH] frontend: restrict desktop tests to frontend changes --- .github/workflows/test-desktop.yml | 11 +++++++++-- .../desktop/tests/onboarding-from-scratch.e2e.ts | 14 ++++++++------ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-desktop.yml b/.github/workflows/test-desktop.yml index 61943ba17..d26e26df0 100644 --- a/.github/workflows/test-desktop.yml +++ b/.github/workflows/test-desktop.yml @@ -5,9 +5,16 @@ permissions: on: push: - branches: [e2e] + branches: [main, e2e] + paths: + - frontend/* + - ".github/workflows/test-desktop.yml" + pull_request: - branches: [e2e] + branches: [main, e2e] + paths: + - frontend/* + - ".github/workflows/test-desktop.yml" concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/frontend/apps/desktop/tests/onboarding-from-scratch.e2e.ts b/frontend/apps/desktop/tests/onboarding-from-scratch.e2e.ts index 92a30d812..a8c0b285e 100755 --- a/frontend/apps/desktop/tests/onboarding-from-scratch.e2e.ts +++ b/frontend/apps/desktop/tests/onboarding-from-scratch.e2e.ts @@ -37,13 +37,15 @@ test('Onboarding from scratch', async ({onboardingPage}) => { }) await test.step('Wallet', async () => { - // let elWalletBtn = await appWindow.locator('#btn-accept-wallet') + let elWalletBtn = await appWindow.locator('#btn-accept-wallet') let elNextBtn = await appWindow.locator('#btn-next') - // await elWalletBtn.click() - // let elWalletSuccessMssg = await appWindow.getByText( - // 'Your wallet is ready to use!', - // ) - // await expect(elWalletSuccessMssg).toBeVisible() + // we need to give the backend some warm-up time for this to work. + await appWindow.waitForTimeout(6000) + await elWalletBtn.click() + let elWalletSuccessMssg = await appWindow.getByText( + 'Your wallet is ready to use!', + ) + await expect(elWalletSuccessMssg).toBeVisible() expect(elNextBtn).toBeInViewport() await elNextBtn.click() })