Skip to content

Commit edcbcdf

Browse files
fix flaky templates browser test (#5808)
Fixes flaky templates modal test introduced in #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)
1 parent 1f4a52c commit edcbcdf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

browser_tests/tests/templates.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ test.describe('Templates', () => {
181181
}) => {
182182
// Open templates dialog
183183
await comfyPage.executeCommand('Comfy.BrowseTemplates')
184+
await comfyPage.templates.content.waitFor({ state: 'visible' })
184185

185186
const templateGrid = comfyPage.page.locator(
186187
'[data-testid="template-workflows-content"]'

0 commit comments

Comments
 (0)