test: replace waitForTimeout with retrying assertions

- widget.spec.ts: use expect().toPass() for combo refresh

- subgraph.spec.ts: use comfyPage.setup() after reload

- nodeLibrary.spec.ts: use toHaveCount() for debounced search

- remoteWidgets.spec.ts: use expect().toPass() for backoff test

- litegraphUtils.ts: refactor navigateIntoSubgraph to use toPass()

Amp-Thread-ID: https://ampcode.com/threads/T-019c11f1-e839-772c-8890-b77cfdf70124
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Alexander Brown
2026-01-30 18:51:55 -08:00
parent 679288500a
commit 1ec55fdf31
5 changed files with 23 additions and 40 deletions

View File

@@ -52,10 +52,10 @@ test.describe('Combo text widget', { tag: ['@screenshot', '@widget'] }, () => {
await comfyPage.page.keyboard.press('r')
// Wait for nodes' widgets to be updated
await comfyPage.page.waitForTimeout(500)
const refreshedComboValues = await getComboValues()
expect(refreshedComboValues).not.toEqual(initialComboValues)
await expect(async () => {
const refreshedComboValues = await getComboValues()
expect(refreshedComboValues).not.toEqual(initialComboValues)
}).toPass({ timeout: 5000 })
})
test('Should refresh combo values of nodes with v2 combo input spec', async ({