Compare commits

...

5 Commits

Author SHA1 Message Date
Alexander Brown
efbb58cf67 Merge branch 'main' into glary/replace-delay-with-retrying-assertions 2026-04-08 11:29:47 -07:00
Glary-Bot
0802cbc76b fix: add fast-fail timeout to inner toBeHidden assertion
The inner toBeHidden() had a 5s default timeout that consumed the
entire toPass budget, preventing retry intervals from firing.
Adding { timeout: 200 } makes the assertion fail fast so toPass
retries at 300ms/500ms/1000ms — the 300ms+ retries land after
the dialog's 266ms debounce window.
2026-04-08 06:26:47 +00:00
Glary-Bot
c205530282 fix: use dispatchEvent to bypass canvas overlay for dialog dismiss
The dialog's click-outside handler (LGraphCanvas.prompt L7175-7190)
registers via setTimeout(10ms) with a 256ms debounce. The canvas
z-999 overlay blocks normal Playwright click() and force:true
doesn't set e.target to the canvas element. dispatchEvent('click')
bypasses the overlay while correctly targeting the canvas. Custom
toPass intervals [300, 500, 1000] start past the 266ms debounce.
2026-04-08 05:53:54 +00:00
Glary-Bot
78b0ec5efb fix: address CI failures in delay-removal tests
- Toggle test (flaky): add nextFrame() after screenshot match to
  settle canvas before re-toggle click
- Dialog tests (failed): add force:true to canvas click inside
  toPass() to bypass actionability checks that hung on dialog
  overlay, and increase timeout to 5s
2026-04-08 05:20:02 +00:00
Glary-Bot
81c0a625f2 test: replace hardcoded delay() calls with retrying assertions
- Remove comfyPage.delay(1000) in toggle test — the preceding
  toHaveScreenshot already confirms the canvas is stable
- Replace comfyPage.delay(300) in two dialog-dismiss tests with
  toPass() blocks that retry the click+hidden assertion, handling
  the case where the click-outside handler isn't attached yet
2026-04-08 04:49:19 +00:00

View File

@@ -335,7 +335,7 @@ test.describe('Node Interaction', () => {
await expect(comfyPage.canvas).toHaveScreenshot(
'text-encode-toggled-off.png'
)
await comfyPage.delay(1000)
await comfyPage.nextFrame()
await comfyPage.canvas.click({
position: DefaultGraphPositions.textEncodeNodeToggler
})
@@ -358,14 +358,13 @@ test.describe('Node Interaction', () => {
})
const legacyPrompt = comfyPage.page.locator('.graphdialog')
await expect(legacyPrompt).toBeVisible()
await comfyPage.delay(300)
await comfyPage.canvas.click({
position: {
x: 10,
y: 10
}
})
await expect(legacyPrompt).toBeHidden()
// The dialog registers its click-outside handler via setTimeout(10ms)
// with a 256ms debounce (see LGraphCanvas.prompt). dispatchEvent
// bypasses the canvas z-999 overlay that blocks normal clicks.
await expect(async () => {
await comfyPage.canvas.dispatchEvent('click', { bubbles: true })
await expect(legacyPrompt).toBeHidden({ timeout: 200 })
}).toPass({ intervals: [300, 500, 1000], timeout: 5_000 })
})
test('Can close prompt dialog with canvas click (text widget)', async ({
@@ -381,14 +380,10 @@ test.describe('Node Interaction', () => {
})
const legacyPrompt = comfyPage.page.locator('.graphdialog')
await expect(legacyPrompt).toBeVisible()
await comfyPage.delay(300)
await comfyPage.canvas.click({
position: {
x: 10,
y: 10
}
})
await expect(legacyPrompt).toBeHidden()
await expect(async () => {
await comfyPage.canvas.dispatchEvent('click', { bubbles: true })
await expect(legacyPrompt).toBeHidden({ timeout: 200 })
}).toPass({ intervals: [300, 500, 1000], timeout: 5_000 })
})
test(