Conversation
milosh86
commented
Sep 11, 2025
- fix metamask setup and Typescript issues
- simplify it to a sequential execution for now
Signed-off-by: Milos Dzepina <milos@aragon.org>
There was a problem hiding this comment.
Pull Request Overview
This PR fixes MetaMask setup and TypeScript issues by adding error handling and simplifying test execution to sequential mode.
- Added error handling and validation for MetaMask wallet setup
- Changed Network enum to const assertion pattern for better TypeScript compatibility
- Configured Playwright to run tests sequentially instead of in parallel
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/setup/wallet.setup.ts | Added environment variable validation and error handling for MetaMask wallet import |
| src/helpers/types/enum/network.ts | Converted enum to const assertion pattern with proper typing |
| playwright.config.ts | Disabled parallel execution and forced sequential test runs with headless mode |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| try { | ||
| await metamask.importWallet(SEED_PHRASE); | ||
| } catch (error) { | ||
| throw new Error(`Failed to import MetaMask wallet: ${String(error)}`); |
There was a problem hiding this comment.
The error message could be more helpful by preserving the original error structure. Consider using error instanceof Error ? error.message : String(error) to get the actual error message instead of converting the entire error object to string.
| throw new Error(`Failed to import MetaMask wallet: ${String(error)}`); | |
| throw new Error(`Failed to import MetaMask wallet: ${error instanceof Error ? error.message : String(error)}`); |
| timeout: 120_000, | ||
| use: { | ||
| baseURL, | ||
| headless: true, |
There was a problem hiding this comment.
The headless: true setting is duplicated between the global use configuration and the project-specific configuration. Remove the duplication by keeping it only in the global use section since project settings inherit from global settings.
| use: { | ||
| ...devices['Desktop Chrome'], | ||
| baseURL, | ||
| headless: true, |
There was a problem hiding this comment.
The headless: true setting is duplicated between the global use configuration and the project-specific configuration. Remove the duplication by keeping it only in the global use section since project settings inherit from global settings.
| headless: true, |