From edcbcdfa84a91d30f554c00eca1ac9ae289bef5c Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Fri, 26 Sep 2025 18:01:34 -0700 Subject: [PATCH] fix flaky templates browser test (#5808) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes flaky templates modal test introduced in https://github.com/Comfy-Org/ComfyUI_frontend/pull/5802 by ensuring the templates modal is visible before querying the visible card count and asserting that it is greater than 0. If we immediately count the number of cards after executing the "load templates" command, it's possible that there are 0 visible due to them loading (rather than being caused by a legitimate bug). ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-5808-fix-flaky-templates-browser-test-27b6d73d365081e58c65f608944976a0) by [Unito](https://www.unito.io) --- browser_tests/tests/templates.spec.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/browser_tests/tests/templates.spec.ts b/browser_tests/tests/templates.spec.ts index e62d0f08d..bb8f30cf2 100644 --- a/browser_tests/tests/templates.spec.ts +++ b/browser_tests/tests/templates.spec.ts @@ -181,6 +181,7 @@ test.describe('Templates', () => { }) => { // Open templates dialog await comfyPage.executeCommand('Comfy.BrowseTemplates') + await comfyPage.templates.content.waitFor({ state: 'visible' }) const templateGrid = comfyPage.page.locator( '[data-testid="template-workflows-content"]'