mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +00:00
Backport of #10338 to core/1.42 Conflict resolution: modify/delete on linearMode.spec.ts — kept the file (new test file). Co-authored-by: pythongosssss <125205205+pythongosssss@users.noreply.github.com>
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()
|
|
})
|
|
})
|