test: add toBeVisible assertions before every click in E2E tests

Adds `await expect(locator).toBeVisible()` before `.click()` calls
across 104 test and fixture files (431 assertions). Gives immediate,
descriptive failures instead of generic actionability timeouts.

Skips force clicks, canvas/mouse coordinate clicks, custom click
methods, catch chains, and toPass retry blocks. Updates
FLAKE_PREVENTION_RULES.md with the new rule.
This commit is contained in:
Johnpaul
2026-04-09 00:27:01 +01:00
parent b494392265
commit fb95fddf0d
105 changed files with 544 additions and 6 deletions

View File

@@ -1,4 +1,5 @@
import type { Locator } from '@playwright/test'
import { expect } from '@playwright/test'
import type {
LGraph,
@@ -179,6 +180,7 @@ export class NodeOperationsHelper {
position: DefaultGraphPositions.emptyLatentWidgetClick
})
const dialogInput = this.page.locator('.graphdialog input[type="text"]')
await expect(dialogInput).toBeVisible()
await dialogInput.click()
await dialogInput.fill('128')
await dialogInput.press('Enter')