Add testnet E2E workflow and testnet config support#655
Add testnet E2E workflow and testnet config support#655
Conversation
Introduces a scheduled GitHub Actions workflow for running E2E tests against Fuel testnet, with support for both soft and hard test suites. Adds Playwright testnet config, environment variable overrides for testnet credentials, and utility functions to detect and configure testnet/local environments. Updates README with workflow badge and .env.example with testnet config instructions.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Introduces a new workflow for running end-to-end tests against the testnet environment. This workflow sets up environment variables, builds the project, installs Playwright browsers, runs soft E2E tests, and uploads test artifacts. Intended for testing and marked for deletion after evaluation.
Wraps the soft E2E test command with xvfb-run in both test-testnet-e2e and testnet-e2e-cron workflows to ensure proper execution of browser-based tests in headless CI environments.
Set VITE_FUEL_CHAIN_NAME, VITE_FUEL_INDEXER_API, VITE_STAKING_ENV, and VITE_ECOSYSTEM_PROJECTS_URL environment variables in test-testnet-e2e.yml and testnet-e2e-cron.yml to ensure correct configuration for testnet builds.
Introduces a dedicated Playwright config for soft testnet E2E tests and updates GitHub workflows to use this config. This improves test isolation and reporting, and excludes problematic ecosystem tests from the soft testnet runs.
PR SummaryMedium Risk Overview Updates the E2E harness to support testnet execution: introduces testnet-specific Playwright configs (soft reporter output + hard timeouts), adds environment-based detection/utilities ( Written by Cursor Bugbot for commit c1871b4. This will update automatically on new commits. Configure here. |
- Remove temporary test-testnet-e2e.yml workflow - Remove auto-issue creation (too flaky for automated issues) - Fix env.ts to read FUEL_PROVIDER_URL from env var instead of hardcoding - Use isTestnetEnvironment() from env.ts in fixtures instead of inline check - Add MetaMask try/catch fix for approveNewNetwork/approveSwitchNetwork - Add stabilization delays in connectToMetamask
Update Testnet E2E workflow to only run soft tests on schedule or when inputs request them and change uploaded artifact path for soft test HTML reports. Streamline hard/bridge fixtures: remove extra CI-only browser flags, reduce dynamic waits to a fixed short wait, and simplify MetaMask setup by removing retry loops and extra CI stabilization sleeps; still attempt network switch but ignore failures. Refactor env utils: remove isLocalEnvironment and related helpers; make getProviderUrl prefer FUEL_PROVIDER_URL when set and otherwise return testnet or local provider URLs based on isTestnetEnvironment; simplify getMetaMaskNetwork to a ternary. These changes reduce CI-specific heuristics and centralize provider configuration via env vars.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| E2E_TARGET_ENV: testnet | ||
| # Testnet wallet credentials (to be added as secrets) | ||
| E2E_ETH_MNEMONIC: ${{ secrets.E2E_TESTNET_ETH_MNEMONIC }} | ||
| E2E_FUEL_MNEMONIC: ${{ secrets.E2E_TESTNET_FUEL_MNEMONIC }} |
There was a problem hiding this comment.
Fuel mnemonic environment variable not used
High Severity
The workflow sets E2E_FUEL_MNEMONIC from secrets but the code never reads this environment variable. The test code calls getFuelMnemonic() which returns a hardcoded constant from @fuels/playwright-utils, not an environment variable. Hard tests will use the default mnemonic instead of the testnet-specific one, causing wallet setup to fail with unfunded accounts.
| VITE_FUEL_INDEXER_API=https://explorer-indexer-testnet.fuel.network | ||
| VITE_STAKING_ENV=TESTNET | ||
| VITE_ECOSYSTEM_PROJECTS_URL=https://raw.githubusercontent.com/FuelLabs/fuel-ecosystem/refs/heads/main/projects.json | ||
| EOF |
There was a problem hiding this comment.
Missing required VITE_FUEL_PROVIDER environment variable
High Severity
The workflow doesn't set VITE_FUEL_PROVIDER in the .env file or build environment variables, but packages/app-explorer/src/services/graphqlClient.ts throws an error if this variable is missing. The build step will fail with "Missing VITE_FUEL_PROVIDER environment variable", preventing any tests from running.


Introduces a scheduled GitHub Actions workflow for running E2E tests against Fuel testnet, with support for both soft and hard test suites. Adds Playwright testnet config, environment variable overrides for testnet credentials, and utility functions to detect and configure testnet/local environments. Updates README with workflow badge and .env.example with testnet config instructions.
Summary
Checklist