[bugfix] Fix flaky test 'Does not report warning on undo/redo' (#5488)

Add additional wait after closing the dialog to ensure all async operations
complete before continuing with the test. This prevents race conditions
where the dialog might not be fully closed when the test proceeds.

The test was failing intermittently because closeDialog() waits for the
dialog to be hidden, but there may be additional async state updates that
need to complete after the dialog closes.

Fixes flaky test in dialog.spec.ts:33
This commit is contained in:
snomiao
2025-09-11 17:30:30 +09:00
committed by GitHub
parent 568be0c44c
commit cb0dab6cdc

View File

@@ -36,6 +36,10 @@ test('Does not report warning on undo/redo', async ({ comfyPage }) => {
await comfyPage.loadWorkflow('missing/missing_nodes') await comfyPage.loadWorkflow('missing/missing_nodes')
await comfyPage.closeDialog() await comfyPage.closeDialog()
// Wait for any async operations to complete after dialog closes
await comfyPage.nextFrame()
await comfyPage.page.waitForTimeout(100)
// Make a change to the graph // Make a change to the graph
await comfyPage.doubleClickCanvas() await comfyPage.doubleClickCanvas()
await comfyPage.searchBox.fillAndSelectFirstNode('KSampler') await comfyPage.searchBox.fillAndSelectFirstNode('KSampler')