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> |
||
|---|---|---|
| .. | ||
| usertest | ||
| 01-acquire-and-stake.spec.ts | ||
| 02-max-stake-all-tax-rates.spec.ts | ||
| 03-verify-graphql-url.spec.ts | ||
| 04-recenter-positions.spec.ts | ||
| 05-optimizer-integration.spec.ts | ||
| 06-dashboard-pages.spec.ts | ||