Skip to content

Gui replacement#46

Merged
mike-diamond merged 12 commits intomainfrom
gui-replacement
Apr 27, 2026
Merged

Gui replacement#46
mike-diamond merged 12 commits intomainfrom
gui-replacement

Conversation

@mike-diamond
Copy link
Copy Markdown
Contributor

No description provided.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
vault-interface Ready Ready Preview, Comment Apr 27, 2026 11:45am

Request Review

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, guardian fixture, and anvil fixture; migrate extendTest to @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.

Comment thread playwright.config.ts Outdated
Comment thread e2e/extendTest.ts
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>
@mike-diamond mike-diamond merged commit adec2df into main Apr 27, 2026
3 checks passed
@mike-diamond mike-diamond deleted the gui-replacement branch April 27, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants