Replace all 10 bare waitForTimeout() calls in tests/e2e/usertest/helpers.ts with proper event-driven Playwright waits per AGENTS.md Engineering Principle #3 ("replace when touched"): connectWallet(): - Remove 500ms resize-event sleep: connectButton.isVisible({ timeout: 5_000 }) already waits for the layout to settle after the resize event - Remove 2000ms "connector init" sleep: the subsequent isVisible check was already event-driven - Replace 2x 1000ms panel-animation sleeps with injectedConnector.waitFor({ state: 'visible' }) — the .connectors-element appearing is the exact observable DOM event - Remove 2x 2000ms "handshake" sleeps: walletDisplay.waitFor() at the end of the function is the correct gate for connection completion attemptStake(): - Remove 3000ms post-goto sleep: tokenAmountSlider.waitFor() at the next line is the correct page-load gate - Remove 2x 500ms debounce sleeps after fill/select: stakeButton.waitFor() downstream is the correct reactive-state gate - Remove 3000ms post-transaction sleep: the button returning to "Stake" text (waitFor at line 619) is already the correct transaction-completion gate Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| e2e | ||
| setup | ||
| HEALTH_CHECKS.md | ||
| verify-swap.sh | ||