Skip to content

Commit cb0dab6

Browse files
authored
[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
1 parent 568be0c commit cb0dab6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

browser_tests/tests/dialog.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ test('Does not report warning on undo/redo', async ({ comfyPage }) => {
3636
await comfyPage.loadWorkflow('missing/missing_nodes')
3737
await comfyPage.closeDialog()
3838

39+
// Wait for any async operations to complete after dialog closes
40+
await comfyPage.nextFrame()
41+
await comfyPage.page.waitForTimeout(100)
42+
3943
// Make a change to the graph
4044
await comfyPage.doubleClickCanvas()
4145
await comfyPage.searchBox.fillAndSelectFirstNode('KSampler')

0 commit comments

Comments
 (0)