Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(e2e): Fix Chrome Beta channel #1691

Merged
merged 48 commits into from
Dec 10, 2024
Merged
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
651c0dd
chore: Added support for the 'chrome-dev' channel in Playwright confi…
nelitow Dec 2, 2024
46a2e3f
chore: update Playwright installation in CI workflow
nelitow Dec 2, 2024
988e681
chore: update Playwright configuration to use 'chrome-beta' channel a…
nelitow Dec 2, 2024
3f4e595
chore: update Playwright installation in CI workflow to separate brow…
nelitow Dec 2, 2024
197e1c4
chore: update Playwright installation in CI workflow to include 'chro…
nelitow Dec 2, 2024
5f03b96
undo changes
nelitow Dec 2, 2024
ae9d2d4
Revert "undo changes"
nelitow Dec 3, 2024
8aefb85
chore: update Playwright configuration and CI workflow to remove 'chr…
nelitow Dec 3, 2024
8183d07
Update playwright.config.ts
nelitow Dec 3, 2024
3da8e4b
Merge branch 'master' into nj/tests/run-tets-on-chrome-dev
nelitow Dec 4, 2024
7f98ae5
Revert "Update playwright.config.ts"
nelitow Dec 4, 2024
c5f809b
Merge branch 'master' into nj/tests/run-tets-on-chrome-dev
nelitow Dec 5, 2024
5fd09a2
chore: enhance E2E testing setup by adding Chrome project and updatin…
nelitow Dec 6, 2024
b86fd0f
Merge branch 'master' into nj/tests/run-tets-on-chrome-dev
nelitow Dec 6, 2024
17eb2ec
feat: enhance E2E testing setup with browser input and new CI workflows
nelitow Dec 6, 2024
2620c75
Merge branch 'master' into nj/tests/run-tets-on-chrome-dev
nelitow Dec 6, 2024
6032b22
fix: adjust Playwright retries based on CI environment
nelitow Dec 6, 2024
20d715d
Merge branch 'nj/tests/run-tets-on-chrome-dev' of https://github.com/…
nelitow Dec 6, 2024
90cafd4
fix: remove maxFailures setting in Playwright config for E2E tests
nelitow Dec 6, 2024
7db7f5f
Merge branch 'master' into nj/tests/run-tets-on-chrome-dev
nelitow Dec 9, 2024
5c5e25a
feat(e2e): add support for Chrome Beta in E2E tests and adjust maxFai…
nelitow Dec 9, 2024
d0d8feb
Merge branch 'master' into nj/tests/run-tets-on-chrome-dev
nelitow Dec 9, 2024
2394951
feat(playwright): adjust retries and maxFailures for CI environments
nelitow Dec 9, 2024
30d54e9
feat(e2e): add logging for inputs and support for Chrome Beta in E2E …
nelitow Dec 9, 2024
abb320d
feat(e2e): update Playwright browser installation to include Chromium…
nelitow Dec 9, 2024
ac5b4d9
feat(playwright): import environment variables in Playwright config
nelitow Dec 9, 2024
7eeff65
refactor(playwright): remove CI-specific retries and maxFailures from…
nelitow Dec 9, 2024
f6ab59d
feat(playwright): add Chromium project configuration to Playwright setup
nelitow Dec 9, 2024
e59298b
refactor(e2e): remove console logging of inputs from GitHub action
nelitow Dec 10, 2024
9d57fcb
Update playwright.config.ts
nelitow Dec 10, 2024
d086585
chore(workflows): rename Playwright report artifacts for stability an…
nelitow Dec 10, 2024
9ca4d18
ci(workflows): allow continuation on error for Chrome Beta tests
nelitow Dec 10, 2024
79a71c4
feat(playwright): add testIgnore configuration for specific test files
nelitow Dec 10, 2024
01c53cf
Update playwright.config.ts
nelitow Dec 10, 2024
04743d6
ci(workflows): increase timeout for E2E contract tests to 20 minutes
nelitow Dec 10, 2024
0d38ab5
Merge branch 'master' into nj/tests/run-tets-on-chrome-dev
nelitow Dec 10, 2024
4464835
fix: add retry logic for tests in CI environment
nelitow Dec 10, 2024
4a75393
fix: add resolution for nanoid package version
nelitow Dec 10, 2024
3d848d2
Merge branch 'master' into nj/tests/run-tets-on-chrome-dev
nelitow Dec 10, 2024
119291f
fix: update nanoid to latest version for improved performance and sec…
nelitow Dec 10, 2024
914bc78
fix: remove retry logic for tests in Playwright configuration
nelitow Dec 10, 2024
ebb1d3d
fix: reduce timeout for E2E tests in GitHub Actions workflow
nelitow Dec 10, 2024
cf40841
refactor: consolidate Playwright browser installation into a reusable…
nelitow Dec 10, 2024
24dd50a
fix: update action.yaml descriptions and format for consistency
nelitow Dec 10, 2024
45247c6
fix: update action.yaml to use the correct path for setup-playwright …
nelitow Dec 10, 2024
4370fe8
Update .github/actions/setup-playwright/action.yaml
nelitow Dec 10, 2024
9b9776e
Update .github/workflows/pr-tests-e2e-crx-lock.yml
nelitow Dec 10, 2024
1d321b8
Update .github/workflows/pr-tests-e2e.yml
nelitow Dec 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: enhance E2E testing setup with browser input and new CI workflows
- Added a required input for browser selection (chromium or chrome-beta) in action.yaml.
- Updated E2E test commands to dynamically run tests based on the selected browser.
- Created a new CI job for testing with Chrome Beta, alongside the existing Chrome Stable job.
- Modified playwright.config.ts to reflect the change from 'chrome' to 'chromium' for consistency in project naming.
  • Loading branch information
nelitow committed Dec 6, 2024
commit 17eb2ece33d35487ddbf2dd02eb9414d2467faba
23 changes: 8 additions & 15 deletions .github/actions/e2e-tests-contracts/action.yaml
Original file line number Diff line number Diff line change
@@ -10,6 +10,9 @@ inputs:
genesisSecret:
description: Secret of genesis to fund the master wallet
required: false
browser:
description: Browser to run tests on (chromium or chrome-beta)
required: true

runs:
using: 'composite'
@@ -26,23 +29,13 @@ runs:
NODE_ENV: test

# E2E tests running with Playwright
- name: Install Playwright Browsers
shell: bash
run: npx playwright install --with-deps chrome chrome-beta

- name: Run E2E Contract Tests (Chrome Stable - Required)
- name: Install Playwright Browsers (${{ inputs.browser }})
shell: bash
run: xvfb-run --auto-servernum -- pnpm test:e2e:contracts --project=chrome
env:
PORT: 5173
VITE_FUEL_PROVIDER_URL: ${{ inputs.providerUrl }}
VITE_MASTER_WALLET_MNEMONIC: ${{ inputs.masterMnemonic }}
VITE_WALLET_SECRET: ${{ inputs.genesisSecret }}
run: npx playwright install --with-deps ${{ inputs.browser }}

- name: Run E2E Contract Tests (Chrome Beta - Non-blocking)
- name: Run E2E Contract Tests
shell: bash
continue-on-error: true
run: xvfb-run --auto-servernum -- pnpm test:e2e:contracts --project=chrome-beta
run: xvfb-run --auto-servernum -- pnpm test:e2e:contracts --project=${{ inputs.browser }}
env:
PORT: 5173
VITE_FUEL_PROVIDER_URL: ${{ inputs.providerUrl }}
@@ -52,7 +45,7 @@ runs:
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
name: playwright-report-${{ inputs.browser }}
path: |
packages/app/playwright-report/
packages/app/playwright-html/
57 changes: 53 additions & 4 deletions .github/workflows/pr-tests-e2e-contracts.yml
Original file line number Diff line number Diff line change
@@ -11,11 +11,11 @@ concurrency:

jobs:
tests-e2e-contracts:
name: Test
name: Test (Chrome Stable)
runs-on: buildjet-8vcpu-ubuntu-2204
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.11.0
@@ -41,16 +41,65 @@ jobs:
run: pnpm deploy:contracts
working-directory: ./packages/e2e-contract-tests

- name: Run E2E Contract Tests - Local
- name: Run E2E Contract Tests
uses: ./.github/actions/e2e-tests-contracts
with:
providerUrl: "http://localhost:4000/v1/graphql"
masterMnemonic: ${{ secrets.VITE_MASTER_WALLET_MNEMONIC }}
genesisSecret: "0xa449b1ffee0e2205fa924c6740cc48b3b473aa28587df6dab12abc245d1f5298"
browser: 'chromium'

- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-e2e-contract-tests-report
path: packages/e2e-contract-tests/playwright-results
retention-days: 30
retention-days: 30

tests-e2e-contracts-beta:
name: Test (Chrome Beta)
runs-on: buildjet-8vcpu-ubuntu-2204
timeout-minutes: 10
continue-on-error: true
nelitow marked this conversation as resolved.
Show resolved Hide resolved
steps:
- uses: actions/checkout@v4
- uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.11.0
pnpm-version: 9.5.0

- uses: FuelLabs/github-actions/setups/docker@master
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: ./.github/actions/setup-rust

- name: Run PNPM install
id: pnpm-cache
run:
pnpm recursive install --frozen-lockfile

- name: Start Test Node
run: pnpm node:up

- name: Generate .env app
run: cp packages/app/.env.example packages/app/.env

- name: Build & Deploy Contracts
run: pnpm deploy:contracts
working-directory: ./packages/e2e-contract-tests
- uses: ./.github/actions/e2e-tests-contracts
with:
providerUrl: "http://localhost:4000/v1/graphql"
masterMnemonic: ${{ secrets.VITE_MASTER_WALLET_MNEMONIC }}
genesisSecret: "0xa449b1ffee0e2205fa924c6740cc48b3b473aa28587df6dab12abc245d1f5298"
browser: 'chrome-beta'

- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-e2e-contract-tests-report-beta
path: packages/e2e-contract-tests/playwright-results
retention-days: 30


4 changes: 2 additions & 2 deletions packages/e2e-contract-tests/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -29,9 +29,9 @@ const config: PlaywrightTestConfig = defineConfig({
},
projects: [
{
name: 'chrome',
name: 'chromium',
use: {
...devices['Desktop Chrome'],
...devices['Desktop Chromium'],
},
},
{
Loading