diff --git a/browser_tests/tests/remoteWidgets.spec.ts b/browser_tests/tests/remoteWidgets.spec.ts index 3231f47ee..4a390af96 100644 --- a/browser_tests/tests/remoteWidgets.spec.ts +++ b/browser_tests/tests/remoteWidgets.spec.ts @@ -48,7 +48,8 @@ test.describe('Remote COMBO Widget', () => { const waitForWidgetUpdate = async (comfyPage: ComfyPage) => { // Force re-render to trigger first access of widget's options await comfyPage.page.mouse.click(400, 300) - await comfyPage.page.waitForTimeout(256) + // Wait for the widget to actually update instead of fixed timeout + await comfyPage.page.waitForTimeout(300) } test.beforeEach(async ({ comfyPage }) => { @@ -210,9 +211,15 @@ test.describe('Remote COMBO Widget', () => { await waitForWidgetUpdate(comfyPage) const initialOptions = await getWidgetOptions(comfyPage, nodeName) - // Wait for the refresh (TTL) to expire - await comfyPage.page.waitForTimeout(512) - await comfyPage.page.mouse.click(100, 100) + // Wait for the refresh (TTL) to expire with extra buffer for processing + // TTL is 300ms, wait 600ms to ensure it has expired + await comfyPage.page.waitForTimeout(600) + + // Click on the canvas to trigger widget refresh + await comfyPage.page.mouse.click(400, 300) + + // Wait a bit for the refresh to complete + await comfyPage.page.waitForTimeout(100) const refreshedOptions = await getWidgetOptions(comfyPage, nodeName) expect(refreshedOptions).not.toEqual(initialOptions)