address review: fix stale JSDoc, correct comments, remove redundant dispatchEvent
This commit is contained in:
parent
6489dc4896
commit
13249613c0
1 changed files with 5 additions and 6 deletions
|
|
@ -6,8 +6,9 @@
|
|||
*
|
||||
* Reuses tests/setup/ infrastructure — no new wallet or navigation helpers.
|
||||
*
|
||||
* Account 5 from the Anvil test mnemonic is used so it never collides with
|
||||
* the deploy scripts (which use accounts 0–1).
|
||||
* Account 0 from the Anvil test mnemonic is used (same as e2e tests).
|
||||
* Deploy scripts also use Account 0, but each test run gets a fresh Anvil stack,
|
||||
* so no collision occurs.
|
||||
*/
|
||||
import { expect, test } from '@playwright/test';
|
||||
import { Interface, Wallet } from 'ethers';
|
||||
|
|
@ -103,7 +104,7 @@ test('I can always leave', async ({ browser }) => {
|
|||
} else {
|
||||
const screenWidth = await page.evaluate(() => window.screen.width);
|
||||
console.log(`[TEST] DEBUG: screen.width = ${screenWidth}`);
|
||||
// Fallback to mobile login icon
|
||||
// Fallback to mobile login icon (dead code — wallet-provider always sets screen.width=1280, copied from e2e/01 for consistency)
|
||||
const mobileLoginIcon = page.locator('.navbar-end svg').first();
|
||||
if (await mobileLoginIcon.isVisible({ timeout: 2_000 })) {
|
||||
console.log('[TEST] Found mobile login icon, clicking...');
|
||||
|
|
@ -137,7 +138,7 @@ test('I can always leave', async ({ browser }) => {
|
|||
await navigateSPA(page, '/app/cheats');
|
||||
await expect(page.getByRole('heading', { name: 'Cheat Console' })).toBeVisible({ timeout: 10_000 });
|
||||
|
||||
// The LocalSwapWidget uses getByLabel('ETH to spend') for the input
|
||||
// The cheats page has an inline FInput with label 'ETH to spend'
|
||||
const swapInput = page.getByLabel('ETH to spend');
|
||||
await expect(swapInput).toBeVisible({ timeout: 15_000 });
|
||||
console.log('[TEST] Swap widget visible');
|
||||
|
|
@ -147,8 +148,6 @@ test('I can always leave', async ({ browser }) => {
|
|||
|
||||
// Use fill() which triggers input events for Vue v-model binding
|
||||
await swapInput.fill('0.1');
|
||||
// Ensure Vue picks up the value by also dispatching input event
|
||||
await swapInput.dispatchEvent('input');
|
||||
await page.waitForTimeout(500);
|
||||
|
||||
const buyButton = page.getByRole('button', { name: 'Buy' }).last();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue