Skip to content

test(web): add Playwright E2E tests for multi-delegator UI#2

Closed
dev-jodee wants to merge 6 commits intomainfrom
feat/e2e-playwright-tests
Closed

test(web): add Playwright E2E tests for multi-delegator UI#2
dev-jodee wants to merge 6 commits intomainfrom
feat/e2e-playwright-tests

Conversation

@dev-jodee
Copy link
Collaborator

Summary

  • Serial devnet test suite covering the full instruction lifecycle: delegation (init, create fixed, revoke, create recurring, revoke, close), plans (create, update, subscribe, cancel, sunset), and UI components
  • Copies the wallet injection + mock Phantom pattern from the escrow E2E tests verbatim
  • All instruction panels updated with autofill buttons and rememberXxx calls matching the escrow panel pattern (start empty → autofill from QuickDefaults → save PDAs back after success)
  • SavedValuesContext extended with subscriptionPda default; QuickDefaults shows all six default fields
  • justfile: e2e-test recipe added

Test Plan

  • Add PLAYRIGHT_WALLET=<base58-secret-key> and PLAYWRIGHT_TOKEN_MINT=<token-2022-devnet-mint> to .env at repo root
  • Ensure the test wallet has devnet SOL + a Token-2022 ATA for the mint
  • just e2e-test or pnpm --filter @multidelegator/web test:e2e

Serial devnet test suite covering the full instruction lifecycle:
delegation (init, create fixed, revoke, create recurring, revoke, close),
plans (create, update, subscribe, cancel, update to sunset), and UI
components (RpcBadge, ProgramBadge, QuickDefaults, RecentTransactions).

- Copies the wallet injection + mock Phantom pattern from escrow E2E tests
- All instruction panels updated with autofill buttons and rememberXxx calls
  matching the escrow panel pattern (start empty, autofill from QuickDefaults,
  save PDAs back after success)
- SavedValuesContext extended with subscriptionPda default
- QuickDefaults shows all six default fields including Subscription PDA
- justfile: e2e-test recipe added

Requires PLAYRIGHT_WALLET and PLAYWRIGHT_TOKEN_MINT in .env at repo root.
@github-actions
Copy link

github-actions bot commented Mar 20, 2026

Compute Unit Report

Instruction Samples Min CUs Max CUs Avg CUs Est Cost (Low) [SOL] Est Cost (Med) [SOL] Est Cost (High) [SOL]
cancel_subscription 6 1963 1963 1963 0.000005000 0.000005078 0.000005981
close_multi_delegate 2 1835 1835 1835 0.000005000 0.000005073 0.000005917
create_fixed_delegation 24 3562 11062 4543 0.000005001 0.000005181 0.000007271
create_plan 63 3523 15537 4978 0.000005001 0.000005199 0.000007489
create_recurring_delegation 17 3586 9586 4909 0.000005001 0.000005196 0.000007454
delete_plan 4 401 401 401 0.000005000 0.000005016 0.000005200
init_multi_delegate 92 5672 21117 8976 0.000005002 0.000005359 0.000009488
revoke_delegation 7 271 422 297 0.000005000 0.000005011 0.000005148
subscribe 11 6557 11057 7920 0.000005002 0.000005316 0.000008960
transfer_fixed 4 8465 8465 8465 0.000005002 0.000005338 0.000009232
transfer_recurring 13 8546 8616 8567 0.000005002 0.000005342 0.000009283
transfer_subscription 10 8826 8946 8869 0.000005002 0.000005354 0.000009434
update_plan 17 397 403 400 0.000005000 0.000005016 0.000005200

Generated: 2026-04-03

- expiryTs=0 means Unix epoch 1970 (always in the past) — use NOW+1yr
- startTs=0 is also in the past for recurring delegation — use NOW
- UpdatePlan to Sunset requires a non-zero future endTs — use NOW+1yr
- CreatePlan planId=0 collides across re-runs — use seconds-based unique ID
- Fix misleading UI hints that said '0 = no expiry' for timestamp fields
@dev-jodee dev-jodee requested a review from amilz March 20, 2026 16:57
amilz
amilz previously approved these changes Mar 20, 2026
@dev-jodee
Copy link
Collaborator Author

Github bug, was already squashed and merged

@dev-jodee dev-jodee closed this Mar 20, 2026
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.

2 participants