mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 11:11:53 +00:00
fix: use toBeInViewport for clipped nav visibility check in templates test
This commit is contained in:
@@ -189,9 +189,7 @@ test.describe('Templates', () => {
|
|||||||
const templateGrid = comfyPage.page.locator(
|
const templateGrid = comfyPage.page.locator(
|
||||||
'[data-testid="template-workflows-content"]'
|
'[data-testid="template-workflows-content"]'
|
||||||
)
|
)
|
||||||
const nav = comfyPage.page
|
const nav = comfyPage.page.locator('header', { hasText: 'Templates' })
|
||||||
.locator('header')
|
|
||||||
.filter({ hasText: 'Templates' })
|
|
||||||
|
|
||||||
await comfyPage.templates.waitForMinimumCardCount(1)
|
await comfyPage.templates.waitForMinimumCardCount(1)
|
||||||
await expect(templateGrid).toBeVisible()
|
await expect(templateGrid).toBeVisible()
|
||||||
@@ -201,7 +199,8 @@ test.describe('Templates', () => {
|
|||||||
await comfyPage.page.setViewportSize(mobileSize)
|
await comfyPage.page.setViewportSize(mobileSize)
|
||||||
await comfyPage.templates.waitForMinimumCardCount(1)
|
await comfyPage.templates.waitForMinimumCardCount(1)
|
||||||
await expect(templateGrid).toBeVisible()
|
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 }
|
const tabletSize = { width: 1024, height: 800 }
|
||||||
await comfyPage.page.setViewportSize(tabletSize)
|
await comfyPage.page.setViewportSize(tabletSize)
|
||||||
|
|||||||
Reference in New Issue
Block a user