From 6b7ac781fb8fa953ab591baac3747b4b4ca39056 Mon Sep 17 00:00:00 2001 From: openhands Date: Fri, 6 Mar 2026 01:12:26 +0000 Subject: [PATCH] fix: E2E test files use file-level eslint-disable for no-restricted-syntax, suppressing all future rules in that group (#451) Co-Authored-By: Claude Sonnet 4.6 --- tests/e2e/01-acquire-and-stake.spec.ts | 9 ++++- tests/e2e/02-max-stake-all-tax-rates.spec.ts | 9 ++++- tests/e2e/06-dashboard-pages.spec.ts | 9 ++++- tests/e2e/usertest/alex-newcomer.spec.ts | 11 +++++- tests/e2e/usertest/all-personas.spec.ts | 7 +++- tests/e2e/usertest/marcus-degen.spec.ts | 11 +++++- .../e2e/usertest/priya-institutional.spec.ts | 9 ++++- tests/e2e/usertest/sarah-yield-farmer.spec.ts | 10 ++++- .../usertest/test-a-passive-holder.spec.ts | 16 +++++++- tests/e2e/usertest/test-b-staker-v2.spec.ts | 39 ++++++++++++++++++- tests/e2e/usertest/test-b-staker.spec.ts | 37 +++++++++++++++++- tests/e2e/usertest/tyler-retail-degen.spec.ts | 8 +++- 12 files changed, 163 insertions(+), 12 deletions(-) diff --git a/tests/e2e/01-acquire-and-stake.spec.ts b/tests/e2e/01-acquire-and-stake.spec.ts index b538e24..f3ab929 100644 --- a/tests/e2e/01-acquire-and-stake.spec.ts +++ b/tests/e2e/01-acquire-and-stake.spec.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-restricted-syntax -- waitForTimeout: no event source exists for Ponder indexing lag and UI re-renders after on-chain transactions in E2E tests. See AGENTS.md #Engineering Principles. */ import { expect, test, type APIRequestContext } from '@playwright/test'; import { Wallet } from 'ethers'; import { createWalletContext } from '../setup/wallet-provider'; @@ -82,9 +81,11 @@ test.describe('Acquire & Stake', () => { await page.evaluate(() => { window.dispatchEvent(new Event('resize')); }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for Ponder indexing lag and UI re-renders after on-chain transactions in E2E tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(500); // Give extra time for wallet connectors to initialize + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for Ponder indexing lag and UI re-renders after on-chain transactions in E2E tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); // Connect wallet flow: @@ -122,6 +123,7 @@ test.describe('Acquire & Stake', () => { } if (panelOpened) { + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for Ponder indexing lag and UI re-renders after on-chain transactions in E2E tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(1_000); // Look for the injected wallet connector in the slideout panel @@ -130,6 +132,7 @@ test.describe('Acquire & Stake', () => { if (await injectedConnector.isVisible({ timeout: 5_000 })) { console.log('[TEST] Clicking first wallet connector...'); await injectedConnector.click(); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for Ponder indexing lag and UI re-renders after on-chain transactions in E2E tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); } else { console.log('[TEST] WARNING: No wallet connector found in panel'); @@ -163,6 +166,7 @@ test.describe('Acquire & Stake', () => { const mintButton = page.getByRole('button', { name: 'Mint' }); await expect(mintButton).toBeEnabled(); await mintButton.click(); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for Ponder indexing lag and UI re-renders after on-chain transactions in E2E tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); console.log('[TEST] Navigating to get-krk page to buy KRK...'); @@ -190,6 +194,7 @@ test.describe('Acquire & Stake', () => { } catch (e) { console.log('[TEST] No "Submitting" state detected, swap may have completed instantly'); } + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for Ponder indexing lag and UI re-renders after on-chain transactions in E2E tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); console.log('[TEST] Verifying swap via RPC...'); @@ -218,6 +223,7 @@ test.describe('Acquire & Stake', () => { // Now test staking via UI console.log('[TEST] Navigating to stake page...'); await navigateSPA(page, '/app/stake'); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for Ponder indexing lag and UI re-renders after on-chain transactions in E2E tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); // Wait for the stake form to be initialized @@ -263,6 +269,7 @@ test.describe('Acquire & Stake', () => { console.log('[TEST] Polling GraphQL for staking position (Ponder indexing latency)...'); let positions: Awaited> = []; for (let attempt = 0; attempt < 15; attempt++) { + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for Ponder indexing lag and UI re-renders after on-chain transactions in E2E tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); positions = await fetchPositions(request, ACCOUNT_ADDRESS); if (positions.length > 0) break; diff --git a/tests/e2e/02-max-stake-all-tax-rates.spec.ts b/tests/e2e/02-max-stake-all-tax-rates.spec.ts index b142ead..26afc48 100644 --- a/tests/e2e/02-max-stake-all-tax-rates.spec.ts +++ b/tests/e2e/02-max-stake-all-tax-rates.spec.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-restricted-syntax -- waitForTimeout: no event source exists for Ponder indexing lag and UI re-renders after on-chain transactions in E2E tests. See AGENTS.md #Engineering Principles. */ import { expect, test, type APIRequestContext } from '@playwright/test'; import { Wallet } from 'ethers'; import { createWalletContext } from '../setup/wallet-provider'; @@ -103,9 +102,11 @@ test.describe('Max Stake All Tax Rates', () => { await page.evaluate(() => { window.dispatchEvent(new Event('resize')); }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for Ponder indexing lag and UI re-renders after on-chain transactions in E2E tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(500); // Give extra time for wallet connectors to initialize + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for Ponder indexing lag and UI re-renders after on-chain transactions in E2E tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); // Connect wallet flow: @@ -143,6 +144,7 @@ test.describe('Max Stake All Tax Rates', () => { } if (panelOpened) { + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for Ponder indexing lag and UI re-renders after on-chain transactions in E2E tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(1_000); // Look for the injected wallet connector in the slideout panel @@ -151,6 +153,7 @@ test.describe('Max Stake All Tax Rates', () => { if (await injectedConnector.isVisible({ timeout: 5_000 })) { console.log('[TEST] Clicking first wallet connector...'); await injectedConnector.click(); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for Ponder indexing lag and UI re-renders after on-chain transactions in E2E tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); } else { console.log('[TEST] WARNING: No wallet connector found in panel'); @@ -174,6 +177,7 @@ test.describe('Max Stake All Tax Rates', () => { const mintButton = page.getByRole('button', { name: 'Mint' }); await expect(mintButton).toBeEnabled(); await mintButton.click(); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for Ponder indexing lag and UI re-renders after on-chain transactions in E2E tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); // Step 2: Buy a large amount of KRK tokens via the get-krk page @@ -199,6 +203,7 @@ test.describe('Max Stake All Tax Rates', () => { } catch (e) { console.log('[TEST] Swap may have completed instantly'); } + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for Ponder indexing lag and UI re-renders after on-chain transactions in E2E tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); // Verify we have KRK tokens @@ -225,6 +230,7 @@ test.describe('Max Stake All Tax Rates', () => { // Step 3: Navigate to stake page console.log('[TEST] Navigating to stake page...'); await navigateSPA(page, '/app/stake'); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for Ponder indexing lag and UI re-renders after on-chain transactions in E2E tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); const tokenAmountSlider = page.getByRole('slider', { name: 'Token Amount' }); @@ -282,6 +288,7 @@ test.describe('Max Stake All Tax Rates', () => { } positionCount++; + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for Ponder indexing lag and UI re-renders after on-chain transactions in E2E tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); } diff --git a/tests/e2e/06-dashboard-pages.spec.ts b/tests/e2e/06-dashboard-pages.spec.ts index e4491f1..2b316e9 100644 --- a/tests/e2e/06-dashboard-pages.spec.ts +++ b/tests/e2e/06-dashboard-pages.spec.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-restricted-syntax -- waitForTimeout/Promise+setTimeout: no event source exists for Ponder indexing lag and UI re-renders; Promise+setTimeout is used for polling Ponder over HTTP where no push subscription is available. See AGENTS.md #Engineering Principles. */ import { test, expect, type APIRequestContext } from '@playwright/test'; import { Wallet } from 'ethers'; import { createWalletContext } from '../setup/wallet-provider'; @@ -61,6 +60,7 @@ test.describe('Dashboard Pages', () => { console.log(`[TEST] Ponder has ${positions.length} positions after ${Date.now() - start}ms`); break; } + // eslint-disable-next-line no-restricted-syntax -- no event source exists for Ponder indexing lag and UI re-renders; Promise+setTimeout used for polling Ponder over HTTP where no push subscription is available. See AGENTS.md #Engineering Principles. await new Promise(r => setTimeout(r, pollMs)); } if (!found) { @@ -85,6 +85,7 @@ test.describe('Dashboard Pages', () => { waitUntil: 'domcontentloaded', }); await page.waitForLoadState('networkidle'); + // eslint-disable-next-line no-restricted-syntax -- no event source exists for Ponder indexing lag and UI re-renders; Promise+setTimeout used for polling Ponder over HTTP where no push subscription is available. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2000); // Should show the address (truncated) @@ -148,6 +149,7 @@ test.describe('Dashboard Pages', () => { waitUntil: 'domcontentloaded', }); await page.waitForLoadState('networkidle'); + // eslint-disable-next-line no-restricted-syntax -- no event source exists for Ponder indexing lag and UI re-renders; Promise+setTimeout used for polling Ponder over HTTP where no push subscription is available. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2000); // Should show position entries with links to position detail @@ -179,6 +181,7 @@ test.describe('Dashboard Pages', () => { waitUntil: 'domcontentloaded', }); await page.waitForLoadState('networkidle'); + // eslint-disable-next-line no-restricted-syntax -- no event source exists for Ponder indexing lag and UI re-renders; Promise+setTimeout used for polling Ponder over HTTP where no push subscription is available. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2000); // Page should render without crashing @@ -229,6 +232,7 @@ test.describe('Dashboard Pages', () => { waitUntil: 'domcontentloaded', }); await page.waitForLoadState('networkidle'); + // eslint-disable-next-line no-restricted-syntax -- no event source exists for Ponder indexing lag and UI re-renders; Promise+setTimeout used for polling Ponder over HTTP where no push subscription is available. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2000); // Should show position ID @@ -302,6 +306,7 @@ test.describe('Dashboard Pages', () => { waitUntil: 'domcontentloaded', }); await page.waitForLoadState('networkidle'); + // eslint-disable-next-line no-restricted-syntax -- no event source exists for Ponder indexing lag and UI re-renders; Promise+setTimeout used for polling Ponder over HTTP where no push subscription is available. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2000); // Should show "not found" state without crashing @@ -345,6 +350,7 @@ test.describe('Dashboard Pages', () => { waitUntil: 'domcontentloaded', }); await page.waitForLoadState('networkidle'); + // eslint-disable-next-line no-restricted-syntax -- no event source exists for Ponder indexing lag and UI re-renders; Promise+setTimeout used for polling Ponder over HTTP where no push subscription is available. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2000); // Click owner link → should navigate to wallet page @@ -352,6 +358,7 @@ test.describe('Dashboard Pages', () => { await expect(ownerLink).toBeVisible({ timeout: 10_000 }); await ownerLink.click(); await page.waitForLoadState('networkidle'); + // eslint-disable-next-line no-restricted-syntax -- no event source exists for Ponder indexing lag and UI re-renders; Promise+setTimeout used for polling Ponder over HTTP where no push subscription is available. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2000); // Should now be on the wallet page diff --git a/tests/e2e/usertest/alex-newcomer.spec.ts b/tests/e2e/usertest/alex-newcomer.spec.ts index d0f3333..28b7d51 100644 --- a/tests/e2e/usertest/alex-newcomer.spec.ts +++ b/tests/e2e/usertest/alex-newcomer.spec.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. */ import { expect, test } from '@playwright/test'; import { Wallet } from 'ethers'; import { createWalletContext } from '../../setup/wallet-provider'; @@ -52,6 +51,7 @@ test.describe('Alex Rivera - Crypto-Curious Newcomer', () => { // --- Landing Page (Reads Carefully) --- let pageStart = Date.now(); await page.goto(`${STACK_WEBAPP_URL}/app/`, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); await takeScreenshot(page, personaName, 'landing-page', report); @@ -83,6 +83,7 @@ test.describe('Alex Rivera - Crypto-Curious Newcomer', () => { logObservation(personaName, 'No security information visible - makes me nervous to connect wallet', report); } + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); // --- Decides to Connect Wallet (Cautiously) --- @@ -103,6 +104,7 @@ test.describe('Alex Rivera - Crypto-Curious Newcomer', () => { // --- Navigate to Stake Page to Learn --- pageStart = Date.now(); await page.goto(`${STACK_WEBAPP_URL}/app/stake`); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); recordPageVisit('Stake (learning)', page.url(), pageStart, report); @@ -119,6 +121,7 @@ test.describe('Alex Rivera - Crypto-Curious Newcomer', () => { logObservation(personaName, 'Found info icon - let me read this...', report); // Try to hover to see tooltip await infoIcon.hover().catch(() => {}); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(1_000); await takeScreenshot(page, personaName, 'reading-info-tooltip', report); logCopyFeedback(personaName, 'Info tooltips help, but still too technical for total beginners', report); @@ -145,6 +148,7 @@ test.describe('Alex Rivera - Crypto-Curious Newcomer', () => { pageStart = Date.now(); await page.goto(`${STACK_WEBAPP_URL}/app/cheats`); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); recordPageVisit('Cheats (confused)', page.url(), pageStart, report); @@ -175,11 +179,13 @@ test.describe('Alex Rivera - Crypto-Curious Newcomer', () => { recordAction('Buy KRK', false, error.message, report); } + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); // --- Navigate to Stake (Intimidated) --- pageStart = Date.now(); await page.goto(`${STACK_WEBAPP_URL}/app/stake`); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); recordPageVisit('Stake (attempting)', page.url(), pageStart, report); @@ -210,10 +216,12 @@ test.describe('Alex Rivera - Crypto-Curious Newcomer', () => { await takeScreenshot(page, personaName, 'stake-failed', report); } + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); // --- Check for Progress Indicators --- await page.goto(`${STACK_WEBAPP_URL}/app/stake`); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); await takeScreenshot(page, personaName, 'looking-for-my-position', report); @@ -233,6 +241,7 @@ test.describe('Alex Rivera - Crypto-Curious Newcomer', () => { logCopyFeedback(personaName, 'Need comparison: "Coinbase: 4% simple. Kraiken: 8-15% but you choose your own risk level"', report); // --- Final Feelings --- + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); await takeScreenshot(page, personaName, 'final-state', report); diff --git a/tests/e2e/usertest/all-personas.spec.ts b/tests/e2e/usertest/all-personas.spec.ts index 3e1bdfb..cfebe15 100644 --- a/tests/e2e/usertest/all-personas.spec.ts +++ b/tests/e2e/usertest/all-personas.spec.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. */ import { test } from '@playwright/test'; import { Wallet } from 'ethers'; import { createWalletContext } from '../../setup/wallet-provider'; @@ -102,6 +101,7 @@ test.describe('All Personas - Fresh Pool State', () => { try { // 1. Navigate to app await page.goto(`${STACK_WEBAPP_URL}/app/`, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); await takeScreenshot(page, persona.shortName, '1-landing', report); logObservation(persona.shortName, 'Arrived at app', report); @@ -114,6 +114,7 @@ test.describe('All Personas - Fresh Pool State', () => { // 3. Mint ETH await page.goto(`${STACK_WEBAPP_URL}/app/cheats`); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(1_000); await mintEth(page, STACK_RPC_URL, address, persona.ethToMint); await takeScreenshot(page, persona.shortName, '3-eth-minted', report); @@ -126,10 +127,12 @@ test.describe('All Personas - Fresh Pool State', () => { recordAction(`Buy KRK with ${persona.ethToSpend} ETH`, true, undefined, report); console.log(`[${persona.shortName}] ✅ Bought KRK with ${persona.ethToSpend} ETH`); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); // 5. Navigate to stake page await page.goto(`${STACK_WEBAPP_URL}/app/stake`); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); await takeScreenshot(page, persona.shortName, '5-stake-page', report); @@ -140,10 +143,12 @@ test.describe('All Personas - Fresh Pool State', () => { await takeScreenshot(page, persona.shortName, '6-stake-complete', report); console.log(`[${persona.shortName}] ✅ Staked ${stakeAmount} KRK at ${persona.taxRate}% tax`); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); // 7. Verify position exists await page.goto(`${STACK_WEBAPP_URL}/app/stake`); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); const myPositionsSection = page.locator('.my-positions-list, [class*="my-position"], [class*="MyPosition"]').first(); diff --git a/tests/e2e/usertest/marcus-degen.spec.ts b/tests/e2e/usertest/marcus-degen.spec.ts index f7e8c69..ba6a9eb 100644 --- a/tests/e2e/usertest/marcus-degen.spec.ts +++ b/tests/e2e/usertest/marcus-degen.spec.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. */ import { expect, test } from '@playwright/test'; import { Wallet } from 'ethers'; import { createWalletContext } from '../../setup/wallet-provider'; @@ -52,6 +51,7 @@ test.describe('Marcus "Flash" Chen - Degen/MEV Hunter', () => { // --- Landing Page --- let pageStart = Date.now(); await page.goto(`${STACK_WEBAPP_URL}/app/`, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); await takeScreenshot(page, personaName, 'landing-page', report); @@ -88,6 +88,7 @@ test.describe('Marcus "Flash" Chen - Degen/MEV Hunter', () => { // --- Mint ETH (Cheats) --- pageStart = Date.now(); await page.goto(`${STACK_WEBAPP_URL}/app/cheats`); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(1_000); recordPageVisit('Cheats', page.url(), pageStart, report); @@ -106,6 +107,7 @@ test.describe('Marcus "Flash" Chen - Degen/MEV Hunter', () => { await takeScreenshot(page, personaName, 'small-swap-complete', report); logTokenomicsQuestion(personaName, 'What\'s the slippage on this tiny swap? Is three-position liquidity working?', report); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); // --- Test Larger Swap --- @@ -116,15 +118,18 @@ test.describe('Marcus "Flash" Chen - Degen/MEV Hunter', () => { await takeScreenshot(page, personaName, 'large-swap-complete', report); logTokenomicsQuestion(personaName, 'Did I hit the discovery edge? What\'s the actual buy depth?', report); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(5_000); // Reload page to ensure balance is fresh await page.reload(); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); // --- Navigate to Stake Page --- pageStart = Date.now(); await page.goto(`${STACK_WEBAPP_URL}/app/stake`); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(4_000); recordPageVisit('Stake', page.url(), pageStart, report); @@ -145,12 +150,14 @@ test.describe('Marcus "Flash" Chen - Degen/MEV Hunter', () => { await takeScreenshot(page, personaName, 'low-tax-stake-failed', report); } + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); // --- Try to Snatch Another Position (if visible) --- logObservation(personaName, 'Scrolling through active positions looking for snatch targets...', report); await page.goto(`${STACK_WEBAPP_URL}/app/stake`); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); await takeScreenshot(page, personaName, 'looking-for-snatch-targets', report); @@ -168,6 +175,7 @@ test.describe('Marcus "Flash" Chen - Degen/MEV Hunter', () => { // --- Check Statistics --- pageStart = Date.now(); await page.goto(`${STACK_WEBAPP_URL}/app/stake`); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(1_000); const statsVisible = await page.getByText('Statistics').isVisible().catch(() => false); @@ -178,6 +186,7 @@ test.describe('Marcus "Flash" Chen - Degen/MEV Hunter', () => { } // --- Final Thoughts --- + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); await takeScreenshot(page, personaName, 'final-dashboard', report); diff --git a/tests/e2e/usertest/priya-institutional.spec.ts b/tests/e2e/usertest/priya-institutional.spec.ts index 0d540e1..78e1543 100644 --- a/tests/e2e/usertest/priya-institutional.spec.ts +++ b/tests/e2e/usertest/priya-institutional.spec.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. */ import { expect, test } from '@playwright/test'; import { Wallet } from 'ethers'; import { createWalletContext } from '../../setup/wallet-provider'; @@ -52,6 +51,7 @@ test.describe('Dr. Priya Malhotra - Institutional/Analytical Investor', () => { // --- Landing Page (Critical Analysis) --- let pageStart = Date.now(); await page.goto(`${STACK_WEBAPP_URL}/app/`, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); await takeScreenshot(page, personaName, 'landing-page', report); @@ -101,6 +101,7 @@ test.describe('Dr. Priya Malhotra - Institutional/Analytical Investor', () => { // --- Examine Stake Page Statistics --- pageStart = Date.now(); await page.goto(`${STACK_WEBAPP_URL}/app/stake`); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); recordPageVisit('Stake (analysis)', page.url(), pageStart, report); @@ -111,6 +112,7 @@ test.describe('Dr. Priya Malhotra - Institutional/Analytical Investor', () => { // --- Examine Three-Position Liquidity Claim --- pageStart = Date.now(); await page.goto(`${STACK_WEBAPP_URL}/app/cheats`); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); recordPageVisit('Cheats (liquidity analysis)', page.url(), pageStart, report); @@ -154,11 +156,13 @@ test.describe('Dr. Priya Malhotra - Institutional/Analytical Investor', () => { recordAction('Buy KRK with 5.0 ETH', false, error.message, report); } + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); // --- Navigate to Stake for Optimal Tax Rate Analysis --- pageStart = Date.now(); await page.goto(`${STACK_WEBAPP_URL}/app/stake`); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); recordPageVisit('Stake (optimization)', page.url(), pageStart, report); @@ -190,10 +194,12 @@ test.describe('Dr. Priya Malhotra - Institutional/Analytical Investor', () => { recordAction('Stake 500 KRK at 12% tax', false, error.message, report); } + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); // --- Review Position Management Interface --- await page.goto(`${STACK_WEBAPP_URL}/app/stake`); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); await takeScreenshot(page, personaName, 'position-management', report); @@ -212,6 +218,7 @@ test.describe('Dr. Priya Malhotra - Institutional/Analytical Investor', () => { logTokenomicsQuestion(personaName, 'How does this integrate with broader Base ecosystem? Cross-protocol synergies?', report); // --- Final Assessment --- + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); await takeScreenshot(page, personaName, 'final-analysis', report); diff --git a/tests/e2e/usertest/sarah-yield-farmer.spec.ts b/tests/e2e/usertest/sarah-yield-farmer.spec.ts index 166f513..a468bb3 100644 --- a/tests/e2e/usertest/sarah-yield-farmer.spec.ts +++ b/tests/e2e/usertest/sarah-yield-farmer.spec.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. */ import { expect, test } from '@playwright/test'; import { Wallet } from 'ethers'; import { createWalletContext } from '../../setup/wallet-provider'; @@ -52,6 +51,7 @@ test.describe('Sarah Park - Cautious Yield Farmer', () => { // --- Landing Page (Reads Everything) --- let pageStart = Date.now(); await page.goto(`${STACK_WEBAPP_URL}/app/`, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); await takeScreenshot(page, personaName, 'landing-page', report); @@ -93,6 +93,7 @@ test.describe('Sarah Park - Cautious Yield Farmer', () => { // --- Navigate to Stake Page to Learn --- pageStart = Date.now(); await page.goto(`${STACK_WEBAPP_URL}/app/stake`); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); recordPageVisit('Stake (research)', page.url(), pageStart, report); @@ -117,6 +118,7 @@ test.describe('Sarah Park - Cautious Yield Farmer', () => { // --- Mint ETH --- pageStart = Date.now(); await page.goto(`${STACK_WEBAPP_URL}/app/cheats`); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(1_000); recordPageVisit('Cheats', page.url(), pageStart, report); @@ -132,6 +134,7 @@ test.describe('Sarah Park - Cautious Yield Farmer', () => { await takeScreenshot(page, personaName, 'test-purchase-complete', report); logObservation(personaName, 'Test purchase successful. Now buying more for actual staking.', report); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); // --- Buy enough for staking (split to reduce slippage) --- @@ -139,11 +142,13 @@ test.describe('Sarah Park - Cautious Yield Farmer', () => { recordAction('Buy KRK with 3.0 ETH total', true, undefined, report); logObservation(personaName, 'Bought more KRK. Now ready to stake.', report); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); // --- Navigate Back to Stake --- pageStart = Date.now(); await page.goto(`${STACK_WEBAPP_URL}/app/stake`); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); recordPageVisit('Stake (attempt)', page.url(), pageStart, report); @@ -167,10 +172,12 @@ test.describe('Sarah Park - Cautious Yield Farmer', () => { await takeScreenshot(page, personaName, 'stake-error', report); } + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); // --- Check Active Positions --- await page.goto(`${STACK_WEBAPP_URL}/app/stake`); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); await takeScreenshot(page, personaName, 'checking-my-position', report); @@ -191,6 +198,7 @@ test.describe('Sarah Park - Cautious Yield Farmer', () => { logCopyFeedback(personaName, 'Needs a "Why Kraiken?" section comparing to traditional staking/lending', report); // --- Final Thoughts --- + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); await takeScreenshot(page, personaName, 'final-review', report); diff --git a/tests/e2e/usertest/test-a-passive-holder.spec.ts b/tests/e2e/usertest/test-a-passive-holder.spec.ts index 48341bc..8842777 100644 --- a/tests/e2e/usertest/test-a-passive-holder.spec.ts +++ b/tests/e2e/usertest/test-a-passive-holder.spec.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. */ import { expect, test } from '@playwright/test'; import { Wallet } from 'ethers'; import { createWalletContext } from '../../setup/wallet-provider'; @@ -51,6 +50,7 @@ test.describe('Test A: Passive Holder Journey', () => { try { // Step 1: Navigate to landing page await page.goto(LANDING_PAGE_URL, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); // Tyler's quick evaluation @@ -120,6 +120,7 @@ test.describe('Test A: Passive Holder Journey', () => { try { await page.goto(LANDING_PAGE_URL, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(1_000); // Click Get KRK button @@ -128,6 +129,7 @@ test.describe('Test A: Passive Holder Journey', () => { if (buttonVisible) { await getKrkButton.click(); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); // Check if navigated to web-app @@ -181,6 +183,7 @@ test.describe('Test A: Passive Holder Journey', () => { try { // Navigate to web-app to connect wallet await page.goto(`${STACK_WEBAPP_URL}/app/`, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); // Mint ETH and buy KRK programmatically @@ -197,6 +200,7 @@ test.describe('Test A: Passive Holder Journey', () => { // Navigate back to landing page await page.goto(LANDING_PAGE_URL, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); // Check for reasons to return @@ -254,6 +258,7 @@ test.describe('Test A: Passive Holder Journey', () => { try { await page.goto(LANDING_PAGE_URL, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); observations.push('Reading the page... trying to understand what this protocol does'); @@ -321,6 +326,7 @@ test.describe('Test A: Passive Holder Journey', () => { try { await page.goto(LANDING_PAGE_URL, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(1_000); // Try to click Get KRK @@ -329,6 +335,7 @@ test.describe('Test A: Passive Holder Journey', () => { if (buttonVisible) { await getKrkButton.click(); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); observations.push('Clicked "Get KRK" - now what?'); @@ -385,6 +392,7 @@ test.describe('Test A: Passive Holder Journey', () => { try { await page.goto(`${STACK_WEBAPP_URL}/app/`, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); // Simulate getting KRK @@ -400,6 +408,7 @@ test.describe('Test A: Passive Holder Journey', () => { // Navigate back to landing await page.goto(LANDING_PAGE_URL, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); observations.push('Okay, I have KRK now... what should I do with it?'); @@ -467,6 +476,7 @@ test.describe('Test A: Passive Holder Journey', () => { try { await page.goto(LANDING_PAGE_URL, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); observations.push('Scanning for key metrics: APY, TVL, risk factors...'); @@ -538,6 +548,7 @@ test.describe('Test A: Passive Holder Journey', () => { try { await page.goto(LANDING_PAGE_URL, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(1_000); const getKrkButton = page.getByRole('button', { name: /get.*krk/i }).first(); @@ -545,6 +556,7 @@ test.describe('Test A: Passive Holder Journey', () => { if (buttonVisible) { await getKrkButton.click(); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); observations.push('Evaluating acquisition flow - time is money'); @@ -605,6 +617,7 @@ test.describe('Test A: Passive Holder Journey', () => { try { await page.goto(`${STACK_WEBAPP_URL}/app/`, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); // Acquire KRK @@ -621,6 +634,7 @@ test.describe('Test A: Passive Holder Journey', () => { // Return to landing page await page.goto(LANDING_PAGE_URL, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); observations.push('Now holding KRK - what ongoing value does landing page provide?'); diff --git a/tests/e2e/usertest/test-b-staker-v2.spec.ts b/tests/e2e/usertest/test-b-staker-v2.spec.ts index 9422c25..5e4c03a 100644 --- a/tests/e2e/usertest/test-b-staker-v2.spec.ts +++ b/tests/e2e/usertest/test-b-staker-v2.spec.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. */ /** * Test B: Comprehensive Staker Journey (v2) * @@ -76,11 +75,13 @@ test.describe('Test B: Staker Journey v2', () => { try { observations.push('Navigating to stake page...'); await page.goto(STAKE_PAGE_URL, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); // Connect wallet observations.push('Connecting wallet...'); await connectWallet(page); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); const walletDisplay = page.getByText(/0x[a-fA-F0-9]{4}/i).first(); @@ -117,8 +118,10 @@ test.describe('Test B: Staker Journey v2', () => { try { await page.goto(STAKE_PAGE_URL, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); await connectWallet(page); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); observations.push('Looking for my existing position created in setup...'); @@ -176,8 +179,10 @@ test.describe('Test B: Staker Journey v2', () => { try { await page.goto(STAKE_PAGE_URL, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); await connectWallet(page); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); observations.push('Looking for other positions with lower tax rates to snatch...'); @@ -192,11 +197,13 @@ test.describe('Test B: Staker Journey v2', () => { const amountInput = page.getByLabel('Staking Amount').or(page.locator('input[type="number"]').first()); await amountInput.waitFor({ state: 'visible', timeout: 10_000 }); await amountInput.fill('200'); // Amount to snatch + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(500); // Select HIGHER tax rate than victim (Sarah has index 10, so use index 12+) const taxSelect = page.locator('select.tax-select').or(page.getByRole('combobox', { name: /tax/i }).first()); await taxSelect.selectOption({ index: 12 }); // Higher than Sarah's medium tax + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(1_000); // Check button text @@ -221,6 +228,7 @@ test.describe('Test B: Staker Journey v2', () => { // Execute snatch observations.push('Executing snatch transaction...'); await stakeButton.click(); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); // Wait for transaction completion @@ -234,6 +242,7 @@ test.describe('Test B: Staker Journey v2', () => { observations.push('⚠ Snatch transaction may be pending'); } + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); // Verify snatched position appears @@ -279,9 +288,11 @@ test.describe('Test B: Staker Journey v2', () => { try { observations.push('Sarah connecting to view her staked position...'); await page.goto(STAKE_PAGE_URL, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); await connectWallet(page); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); // Look for position @@ -317,8 +328,10 @@ test.describe('Test B: Staker Journey v2', () => { try { await page.goto(STAKE_PAGE_URL, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); await connectWallet(page); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); observations.push('Analyzing P&L metrics for risk assessment...'); @@ -380,8 +393,10 @@ test.describe('Test B: Staker Journey v2', () => { try { await page.goto(STAKE_PAGE_URL, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); await connectWallet(page); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); observations.push('Exiting position to recover KRK...'); @@ -405,6 +420,7 @@ test.describe('Test B: Staker Journey v2', () => { // Expand position to see actions await position.click(); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(1_000); // Look for Unstake/Exit button @@ -421,10 +437,12 @@ test.describe('Test B: Staker Journey v2', () => { // Click exit await exitButton.click(); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); // Wait for transaction try { + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(5_000); // Give time for tx confirmation observations.push('✓ Exit transaction submitted'); } catch (error) { @@ -432,6 +450,7 @@ test.describe('Test B: Staker Journey v2', () => { } // Verify position is gone + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); const stillVisible = await position.isVisible().catch(() => false); @@ -480,9 +499,11 @@ test.describe('Test B: Staker Journey v2', () => { try { observations.push('Priya (fresh staker) connecting wallet...'); await page.goto(STAKE_PAGE_URL, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); await connectWallet(page); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); // Verify no existing positions @@ -518,8 +539,10 @@ test.describe('Test B: Staker Journey v2', () => { try { await page.goto(STAKE_PAGE_URL, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); await connectWallet(page); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); observations.push('Filling staking form as a new user...'); @@ -531,6 +554,7 @@ test.describe('Test B: Staker Journey v2', () => { if (hasInput) { observations.push('✓ Staking Amount input found'); await amountInput.fill('100'); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(500); observations.push('✓ Filled amount: 100 KRK'); } else { @@ -561,13 +585,16 @@ test.describe('Test B: Staker Journey v2', () => { try { await page.goto(STAKE_PAGE_URL, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); await connectWallet(page); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); // Fill amount first const amountInput = page.getByLabel('Staking Amount'); await amountInput.fill('100'); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(500); observations.push('Selecting tax rate...'); @@ -581,6 +608,7 @@ test.describe('Test B: Staker Journey v2', () => { // Select a mid-range tax rate (index 5) await taxSelect.selectOption({ index: 5 }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(500); const selectedValue = await taxSelect.inputValue(); @@ -614,8 +642,10 @@ test.describe('Test B: Staker Journey v2', () => { try { await page.goto(STAKE_PAGE_URL, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); await connectWallet(page); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); observations.push('Completing stake form and executing transaction...'); @@ -623,10 +653,12 @@ test.describe('Test B: Staker Journey v2', () => { // Fill form const amountInput = page.getByLabel('Staking Amount'); await amountInput.fill('100'); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(500); const taxSelect = page.locator('select.tax-select'); await taxSelect.selectOption({ index: 5 }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(1_000); // Find stake button using reference selector @@ -659,6 +691,7 @@ test.describe('Test B: Staker Journey v2', () => { // Click stake button observations.push('Clicking stake button...'); await stakeButton.click(); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); // The wallet provider auto-signs, but check for transaction state @@ -666,12 +699,14 @@ test.describe('Test B: Staker Journey v2', () => { // Wait for transaction completion try { + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(5_000); observations.push('✓ Transaction submitted'); } catch (error) { observations.push('⚠ Transaction may be pending'); } + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); // Screenshot after stake @@ -702,8 +737,10 @@ test.describe('Test B: Staker Journey v2', () => { try { await page.goto(STAKE_PAGE_URL, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); await connectWallet(page); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); observations.push('Checking for new position in Active Positions...'); diff --git a/tests/e2e/usertest/test-b-staker.spec.ts b/tests/e2e/usertest/test-b-staker.spec.ts index d2200de..126508c 100644 --- a/tests/e2e/usertest/test-b-staker.spec.ts +++ b/tests/e2e/usertest/test-b-staker.spec.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. */ import { expect, test } from '@playwright/test'; import { Wallet } from 'ethers'; import { createWalletContext } from '../../setup/wallet-provider'; @@ -52,6 +51,7 @@ test.describe('Test B: Staker Journey', () => { try { await page.goto(`${STACK_WEBAPP_URL}/app/`, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); observations.push('Setting up: acquiring KRK for staking tests...'); @@ -78,6 +78,7 @@ test.describe('Test B: Staker Journey', () => { try { await page.goto(STAKE_PAGE_URL, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); observations.push('Scanning for arbitrage angles, tax rate gaps, snatching opportunities...'); @@ -105,6 +106,7 @@ test.describe('Test B: Staker Journey', () => { if (hasTooltip) { observations.push('✓ Tax rate has tooltip - explains tradeoff'); await infoIcon.hover(); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(1_000); const tooltipText = await page.locator('[role="tooltip"], .tooltip').textContent().catch(() => ''); @@ -170,10 +172,12 @@ test.describe('Test B: Staker Journey', () => { try { await page.goto(STAKE_PAGE_URL, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); // Connect wallet await connectWallet(page); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); observations.push('Going for lowest tax rate - maximum upside, I\'ll just monitor for snatches'); @@ -182,11 +186,13 @@ test.describe('Test B: Staker Journey', () => { const stakeAmountInput = page.getByLabel(/staking amount/i).or(page.locator('input[type="number"]').first()); await stakeAmountInput.waitFor({ state: 'visible', timeout: 10_000 }); await stakeAmountInput.fill('100'); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(500); // Select lowest tax rate (index 0 or value "5") const taxSelect = page.getByRole('combobox', { name: /tax/i }).first(); await taxSelect.selectOption({ index: 0 }); // Pick first option (lowest) + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(500); const selectedTax = await taxSelect.inputValue(); @@ -209,11 +215,13 @@ test.describe('Test B: Staker Journey', () => { try { await stakeButton.click(); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(1_000); // Wait for transaction const txInProgress = await page.getByRole('button', { name: /sign|waiting|confirm/i }).isVisible({ timeout: 3_000 }).catch(() => false); if (txInProgress) { + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(5_000); } @@ -223,6 +231,7 @@ test.describe('Test B: Staker Journey', () => { feedback.overall.friction.push('Could not complete stake transaction'); } + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); // Screenshot after stake @@ -247,9 +256,11 @@ test.describe('Test B: Staker Journey', () => { try { await page.goto(STAKE_PAGE_URL, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); await connectWallet(page); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); observations.push('Checking my position - where\'s the P&L?'); @@ -339,6 +350,7 @@ test.describe('Test B: Staker Journey', () => { try { await page.goto(`${STACK_WEBAPP_URL}/app/`, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); observations.push('Funding wallet for conservative staking test...'); @@ -364,6 +376,7 @@ test.describe('Test B: Staker Journey', () => { try { await page.goto(STAKE_PAGE_URL, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); observations.push('Looking for risk disclosures, worst-case scenarios, and safety features...'); @@ -383,6 +396,7 @@ test.describe('Test B: Staker Journey', () => { observations.push('✓ Tax rate info icon found'); await page.locator('svg[data-icon="circle-info"], svg[class*="info"]').first().hover(); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(1_000); const tooltipText = await page.locator('[role="tooltip"], .tooltip').textContent().catch(() => ''); @@ -445,9 +459,11 @@ test.describe('Test B: Staker Journey', () => { try { await page.goto(STAKE_PAGE_URL, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); await connectWallet(page); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); observations.push('Choosing medium tax rate - balance between returns and safety'); @@ -456,6 +472,7 @@ test.describe('Test B: Staker Journey', () => { const stakeAmountInput = page.getByLabel(/staking amount/i).or(page.locator('input[type="number"]').first()); await stakeAmountInput.waitFor({ state: 'visible', timeout: 10_000 }); await stakeAmountInput.fill('50'); // Conservative amount + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(500); // Select medium tax rate (index 2-3, or 10-15%) @@ -463,6 +480,7 @@ test.describe('Test B: Staker Journey', () => { const options = await taxSelect.locator('option').count(); const midIndex = Math.floor(options / 2); await taxSelect.selectOption({ index: midIndex }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(500); const selectedTax = await taxSelect.inputValue(); @@ -478,10 +496,12 @@ test.describe('Test B: Staker Journey', () => { try { await stakeButton.click(); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(1_000); const txInProgress = await page.getByRole('button', { name: /sign|waiting|confirm/i }).isVisible({ timeout: 3_000 }).catch(() => false); if (txInProgress) { + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(5_000); } @@ -491,6 +511,7 @@ test.describe('Test B: Staker Journey', () => { feedback.overall.friction.push('Stake transaction failed'); } + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); const postStakePath = join(screenshotDir, `post-stake-${Date.now()}.png`); @@ -514,9 +535,11 @@ test.describe('Test B: Staker Journey', () => { try { await page.goto(STAKE_PAGE_URL, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); await connectWallet(page); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); observations.push('Evaluating: Can I clearly see my position, returns, and risks?'); @@ -599,6 +622,7 @@ test.describe('Test B: Staker Journey', () => { try { await page.goto(`${STACK_WEBAPP_URL}/app/`, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); observations.push('Preparing test wallet...'); @@ -624,6 +648,7 @@ test.describe('Test B: Staker Journey', () => { try { await page.goto(STAKE_PAGE_URL, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); observations.push('Looking for: docs, contract addresses, audit reports, technical specs...'); @@ -702,9 +727,11 @@ test.describe('Test B: Staker Journey', () => { try { await page.goto(STAKE_PAGE_URL, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); await connectWallet(page); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); observations.push('Evaluating UI quality: precision, accuracy, professionalism...'); @@ -729,6 +756,7 @@ test.describe('Test B: Staker Journey', () => { observations.push('Testing edge cases: trying to stake 0...'); const stakeInput = page.getByLabel(/staking amount/i).or(page.locator('input[type="number"]').first()); await stakeInput.fill('0'); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(500); const hasValidation = await page.locator('text=/invalid|minimum|required/i').isVisible().catch(() => false); @@ -769,9 +797,11 @@ test.describe('Test B: Staker Journey', () => { try { await page.goto(STAKE_PAGE_URL, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); await connectWallet(page); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); observations.push('Executing small test stake to evaluate position reporting...'); @@ -779,10 +809,12 @@ test.describe('Test B: Staker Journey', () => { // Fill form const stakeInput = page.getByLabel(/staking amount/i).or(page.locator('input[type="number"]').first()); await stakeInput.fill('25'); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(500); const taxSelect = page.getByRole('combobox', { name: /tax/i }).first(); await taxSelect.selectOption({ index: 1 }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(500); // Execute @@ -790,10 +822,12 @@ test.describe('Test B: Staker Journey', () => { try { await stakeButton.click(); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(1_000); const txInProgress = await page.getByRole('button', { name: /sign|waiting|confirm/i }).isVisible({ timeout: 3_000 }).catch(() => false); if (txInProgress) { + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(5_000); } @@ -802,6 +836,7 @@ test.describe('Test B: Staker Journey', () => { observations.push(`✗ Stake failed: ${error.message}`); } + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); // Evaluate position reporting diff --git a/tests/e2e/usertest/tyler-retail-degen.spec.ts b/tests/e2e/usertest/tyler-retail-degen.spec.ts index 50ccb30..e13a68b 100644 --- a/tests/e2e/usertest/tyler-retail-degen.spec.ts +++ b/tests/e2e/usertest/tyler-retail-degen.spec.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. */ import { expect, test } from '@playwright/test'; import { Wallet } from 'ethers'; import { createWalletContext } from '../../setup/wallet-provider'; @@ -52,6 +51,7 @@ test.describe('Tyler "Bags" Morrison - Retail Degen', () => { // --- Landing Page (Barely Looks) --- let pageStart = Date.now(); await page.goto(`${STACK_WEBAPP_URL}/app/`, { waitUntil: 'domcontentloaded' }); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(1_000); await takeScreenshot(page, personaName, 'landing-page', report); @@ -82,6 +82,7 @@ test.describe('Tyler "Bags" Morrison - Retail Degen', () => { // --- Navigate to Cheats (Finds It Randomly) --- pageStart = Date.now(); await page.goto(`${STACK_WEBAPP_URL}/app/cheats`); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(1_000); recordPageVisit('Cheats', page.url(), pageStart, report); @@ -115,11 +116,13 @@ test.describe('Tyler "Bags" Morrison - Retail Degen', () => { await takeScreenshot(page, personaName, 'buy-error', report); } + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(5_000); // --- Navigate to Stake (No Idea What He's Doing) --- pageStart = Date.now(); await page.goto(`${STACK_WEBAPP_URL}/app/stake`); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); recordPageVisit('Stake', page.url(), pageStart, report); @@ -143,10 +146,12 @@ test.describe('Tyler "Bags" Morrison - Retail Degen', () => { await takeScreenshot(page, personaName, 'stake-failed', report); } + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(3_000); // --- Checks for Immediate Gains --- await page.goto(`${STACK_WEBAPP_URL}/app/stake`); + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); await takeScreenshot(page, personaName, 'checking-gains', report); @@ -183,6 +188,7 @@ test.describe('Tyler "Bags" Morrison - Retail Degen', () => { } // --- Final Thoughts --- + // eslint-disable-next-line no-restricted-syntax -- waitForTimeout: no event source exists for animation settling, wallet connector UI transitions, and debounced state updates in user-simulation tests. See AGENTS.md #Engineering Principles. await page.waitForTimeout(2_000); await takeScreenshot(page, personaName, 'final-confused-state', report);