Skip to content

Commit

Permalink
feat(e2e): Debuging PW web tests on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Vere-Grey committed Dec 3, 2024
1 parent 2377817 commit c218b84
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/test-suite-web-e2e-pw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ jobs:
# - TEST_GROUP: "@group=device-management"
# CONTAINERS: "trezor-user-env-unix"
# CYPRESS_USE_TREZOR_USER_ENV_BRIDGE: "1"
- TEST_GROUP: "@group=settings"
CONTAINERS: "trezor-user-env-unix"
CYPRESS_USE_TREZOR_USER_ENV_BRIDGE: "1"
# - TEST_GROUP: "@group=settings"
# CONTAINERS: "trezor-user-env-unix"
# CYPRESS_USE_TREZOR_USER_ENV_BRIDGE: "1"
# - TEST_GROUP: "@group=metadata"
# CONTAINERS: "trezor-user-env-unix"
# CYPRESS_USE_TREZOR_USER_ENV_BRIDGE: "1"
Expand Down Expand Up @@ -150,17 +150,19 @@ jobs:
- name: Install Playwright browsers
run: npx playwright install

## MOVE PULL HERE

- name: Run Playwright e2e tests
env:
COMPOSE_FILE: ./docker/docker-compose.suite-ci.yml
BASE_URL: https://dev.suite.sldev.cz/suite-web/feat-parametrize-pw-suite/web/

BASE_URL: https://dev.suite.sldev.cz/suite-web/convert-cy-pw-settings/web/
## reporter url
TRACK_SUITE_URL: https://track-suite-ff9ad9f5b4f6.herokuapp.com
## when debugging or developing tests it does not make sense to have retries,
## in other cases retries are useful to avoid occasional failures due to flaky tests
ALLOW_RETRY: false
TEST_GROUP: ${{ matrix.TEST_GROUP }}
GITHUB_ACTION: true
CI_JOB_ID: ${{ github.run_id }}
CI_COMMIT_SHA: ${{ github.sha }}
CI_JOB_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
Expand Down
4 changes: 2 additions & 2 deletions docker/docker-compose.suite-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ services:
- XDG_RUNTIME_DIR=/var/tmp
ports:
- "9001:9001"
- "9002:9002"
- "21325:21325"
- "21326:21326"
network_mode: bridge # this makes docker reuse existing networks

bitcoin-regtest:
image: ghcr.io/trezor/trezor-user-env-regtest # this is a special image that runs regtest and blockbook
depends_on:
- trezor-user-env-unix
ports:
- "50001:50001"
network_mode: service:trezor-user-env-unix
5 changes: 4 additions & 1 deletion packages/suite-desktop-core/e2e/support/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ const test = base.extend<Fixtures>({
const tracePath = `${testInfo.outputDir}/trace.electron.zip`;
await window.context().tracing.stop({ path: tracePath });
} else {
await page.goto('/');
// eslint-disable-next-line no-console
console.log('Config:', process.env.BASE_URL || 'http://localhost:8000');
await page.goto(process.env.BASE_URL || 'http://localhost:8000');
// await page.goto('/');
await use(page);
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class OnboardingActions {
}

async completeOnboarding() {
await this.optionallyDismissFwHashCheckError();
// await this.optionallyDismissFwHashCheckError();
await this.analyticsContinueButton.click();
await this.onboardingContinueButton.click();
await this.onboardingViewOnlySkipButton.click();
Expand Down

0 comments on commit c218b84

Please sign in to comment.