From e5d85db632798f7a526dabfdea6d666637f8b304 Mon Sep 17 00:00:00 2001 From: Alexander Brown <448862+DrJKL@users.noreply.github.com> Date: Sun, 18 Jan 2026 19:42:06 -0800 Subject: [PATCH] fix: use toBeInViewport for clipped nav visibility check in templates test --- browser_tests/tests/templates.spec.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/browser_tests/tests/templates.spec.ts b/browser_tests/tests/templates.spec.ts index 977f3f6df7..ae7e3747d1 100644 --- a/browser_tests/tests/templates.spec.ts +++ b/browser_tests/tests/templates.spec.ts @@ -189,9 +189,7 @@ test.describe('Templates', () => { const templateGrid = comfyPage.page.locator( '[data-testid="template-workflows-content"]' ) - const nav = comfyPage.page - .locator('header') - .filter({ hasText: 'Templates' }) + const nav = comfyPage.page.locator('header', { hasText: 'Templates' }) await comfyPage.templates.waitForMinimumCardCount(1) await expect(templateGrid).toBeVisible() @@ -201,7 +199,8 @@ test.describe('Templates', () => { await comfyPage.page.setViewportSize(mobileSize) await comfyPage.templates.waitForMinimumCardCount(1) await expect(templateGrid).toBeVisible() - await expect(nav).not.toBeVisible() // Nav should collapse at mobile size + // Nav header is clipped by overflow-hidden parent at mobile size + await expect(nav).not.toBeInViewport() const tabletSize = { width: 1024, height: 800 } await comfyPage.page.setViewportSize(tabletSize)