mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-19 22:09:37 +00:00
## Summary Popover components for graph mode are appendTo self so scale/translate works, however in the sidebar this causes them to be clipped by the parent overflow. This adds a provide/inject flag to change these to be appended to the body. ## Changes - **What**: - add append to injection for overriding where popovers are mounted - ensure dropdowns respect this flag - extract enterAppModeWithInputs helper - tests Before: <img width="225" height="140" alt="image" src="https://github.com/user-attachments/assets/bd83b0cd-49a9-45dd-8344-4c10221444fc" /> After: <img width="238" height="225" alt="image" src="https://github.com/user-attachments/assets/286e28e9-b37d-4ffc-91a9-7c340757d3fc" /> ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-10338-fix-App-mode-Widget-dropdowns-clipped-in-sidebar-3296d73d365081e2ba38e3e82006d65e) by [Unito](https://www.unito.io)
62 lines
1.8 KiB
TypeScript
62 lines
1.8 KiB
TypeScript
import {
|
|
comfyPageFixture as test,
|
|
comfyExpect as expect
|
|
} from '../fixtures/ComfyPage'
|
|
|
|
test.describe('Linear Mode', { tag: '@ui' }, () => {
|
|
test.beforeEach(async ({ comfyPage }) => {
|
|
await comfyPage.settings.setSetting('Comfy.UseNewMenu', 'Top')
|
|
await comfyPage.setup()
|
|
})
|
|
|
|
test('Displays linear controls when app mode active', async ({
|
|
comfyPage
|
|
}) => {
|
|
await comfyPage.appMode.enterAppModeWithInputs([])
|
|
|
|
await expect(
|
|
comfyPage.page.locator('[data-testid="linear-widgets"]')
|
|
).toBeVisible({ timeout: 5000 })
|
|
})
|
|
|
|
test('Run button visible in linear mode', async ({ comfyPage }) => {
|
|
await comfyPage.appMode.enterAppModeWithInputs([])
|
|
|
|
await expect(
|
|
comfyPage.page.locator('[data-testid="linear-run-button"]')
|
|
).toBeVisible({ timeout: 5000 })
|
|
})
|
|
|
|
test('Workflow info section visible', async ({ comfyPage }) => {
|
|
await comfyPage.appMode.enterAppModeWithInputs([])
|
|
|
|
await expect(
|
|
comfyPage.page.locator('[data-testid="linear-workflow-info"]')
|
|
).toBeVisible({ timeout: 5000 })
|
|
})
|
|
|
|
test('Returns to graph mode', async ({ comfyPage }) => {
|
|
await comfyPage.appMode.enterAppModeWithInputs([])
|
|
|
|
await expect(
|
|
comfyPage.page.locator('[data-testid="linear-widgets"]')
|
|
).toBeVisible({ timeout: 5000 })
|
|
|
|
await comfyPage.appMode.toggleAppMode()
|
|
|
|
await expect(comfyPage.canvas).toBeVisible({ timeout: 5000 })
|
|
await expect(
|
|
comfyPage.page.locator('[data-testid="linear-widgets"]')
|
|
).not.toBeVisible()
|
|
})
|
|
|
|
test('Canvas not visible in app mode', async ({ comfyPage }) => {
|
|
await comfyPage.appMode.enterAppModeWithInputs([])
|
|
|
|
await expect(
|
|
comfyPage.page.locator('[data-testid="linear-widgets"]')
|
|
).toBeVisible({ timeout: 5000 })
|
|
await expect(comfyPage.canvas).not.toBeVisible()
|
|
})
|
|
})
|