mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-05 21:54:50 +00:00
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:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user