Gui replacement#46
Merged
mike-diamond merged 12 commits intomainfrom Apr 27, 2026
Merged
Conversation
Signed-off-by: MikeDiam <info@mdiamond.ru>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Replaces the previous GuardianUI-based E2E wallet/provider setup with a custom Playwright + injected EIP-1193 provider approach, while refactoring wallet-related fixtures and stabilizing E2E waits.
Changes:
- Remove
@guardianui/test,guardianfixture, andanvilfixture; migrateextendTestto@playwright/test. - Add a custom injected EIP-1193 provider plus new wallet helpers (init, switchChain, balance setters, chain reset).
- Update E2E tests/fixtures to use
wallet.init()and adjust load-state waits.
Reviewed changes
Copilot reviewed 39 out of 40 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| playwright.config.ts | Refactors webServer configuration and adds optional second RPC port handling. |
| package.json | Removes @guardianui/test dev dependency. |
| e2e/types.d.ts | Removes GUI/Guardian/Anvil fixture types; updates Window.e2e typing. |
| e2e/tests/balance.spec.ts | Switches test setup to wallet.init(). |
| e2e/tests/boost.spec.ts | Switches test setup to wallet.init(). |
| e2e/tests/burn.spec.ts | Switches test setup to wallet.init(). |
| e2e/tests/loader.spec.ts | Uses wallet.init() instead of GUI/Guardian provider init. |
| e2e/tests/mint.spec.ts | Switches test setup to wallet.init(). |
| e2e/tests/stake.spec.ts | Switches test setup to wallet.init(). |
| e2e/tests/unboost.spec.ts | Switches test setup to wallet.init(). |
| e2e/tests/unstake.spec.ts | Switches test setup to wallet.init(). |
| e2e/fixtures/wallet/chains.ts | Introduces chain metadata (RPC URLs, chain IDs, holders) and token addresses. |
| e2e/fixtures/wallet/init.ts | Adds wallet initialization (inject provider, set address/chain state). |
| e2e/fixtures/wallet/switchChain.ts | Adds chain switching via wallet_switchEthereumChain. |
| e2e/fixtures/wallet/setEthBalance.ts | Adds ETH balance setting via Anvil JSON-RPC. |
| e2e/fixtures/wallet/setBalance.ts | Refactors token balance setting to use new balance helpers and GraphQL mocking. |
| e2e/fixtures/wallet/index.ts | Rebuilds wallet fixture around new stateful helpers and removes GUI/Anvil deps. |
| e2e/fixtures/wallet/connectWithBalance.ts | Refactors to depend on injected setBalance instead of creating it internally. |
| e2e/fixtures/wallet/checkWalletList.ts | Renames exported types/functions for consistency (CheckWalletList, createCheckWalletList). |
| e2e/fixtures/wallet/helpers/index.ts | Exports new wallet helper utilities. |
| e2e/fixtures/wallet/helpers/balance.ts | Implements ERC-20 balance provisioning via holder impersonation + transfer. |
| e2e/fixtures/wallet/helpers/impersonate.ts | Adds cached Anvil impersonation helper. |
| e2e/fixtures/wallet/helpers/initProvider.ts | Injects custom EIP-1193 provider script + signer helpers; seeds balances. |
| e2e/fixtures/wallet/helpers/eip1193-provider.js | New in-browser EIP-1193 provider shim for E2E. |
| e2e/fixtures/wallet/helpers/resetAllChains.ts | Adds Anvil fork reset logic (mainnet required; gnosis optional). |
| e2e/fixtures/vault/setVaultData.ts | Uses wallet.getAddress() instead of reading in-page signer address. |
| e2e/fixtures/vault/index.ts | Wires wallet into vault fixture to support updated setVaultData. |
| e2e/fixtures/sdk/mint.ts | Passes wallet address into page.evaluate instead of reading window.ethereum.signer.address. |
| e2e/fixtures/sdk/deposit.ts | Same as mint: address passed from fixture into page.evaluate. |
| e2e/fixtures/sdk/index.ts | Wires wallet into SDK fixture methods. |
| e2e/fixtures/swap/setSdkTransactions.ts | Adjusts reload wait from networkidle to domcontentloaded. |
| e2e/fixtures/swap/helpers/checkTokenDropdown.ts | Removes networkidle waits around dropdown interactions. |
| e2e/fixtures/swap/actions/boost.ts | Removes networkidle wait before checking tx-completion modal. |
| e2e/fixtures/element/checkLink.ts | Removes networkidle wait before checking page heading visibility. |
| e2e/fixtures/index.ts | Removes exports/types for deleted anvil and guardian fixtures. |
| e2e/fixtures/guardian.ts | Removes GuardianUI provider fixture implementation. |
| e2e/fixtures/anvil/index.ts | Removes legacy anvil fixture. |
| e2e/fixtures/anvil/setBalance.ts | Removes legacy Anvil setBalance implementation. |
| e2e/extendTest.ts | Migrates to Playwright base test, adds chain reset hook, updates fixtures list. |
| .github/workflows/e2e.yml | Removes GuardianUI API key secrets from E2E workflow environment. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
Frontend SDK was reading chain state via NEXT_PUBLIC_MAINNET_NETWORK_URL (real Alchemy mainnet) while wallet writes go through anvil. The mismatch made every read-driven assertion (balances, allowances, vault positions) return zero in tests. Override getWeb3Url to point at 127.0.0.1:8545 when the SW_e2e cookie is set.
Captures the post-receipt mintToken.balanceOf so a status=1 multicall that silently mints zero shares fails at the fixture rather than surfacing as a downstream UI assertion miss.
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
Signed-off-by: MikeDiam <info@mdiamond.ru>
Cast0001
approved these changes
Apr 27, 2026
dfkadyr
approved these changes
Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.