mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-19 22:09:37 +00:00
## Summary Simplifies test setup for common settings ## Changes - **What**: - add vue-nodes tag to auto enable nodes 2.0 - remove UseNewMenu Top as this is default ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-11184-test-Simplify-vue-node-menu-test-setup-3416d73d3650815487e0c357d28761fe) by [Unito](https://www.unito.io)
99 lines
2.8 KiB
TypeScript
99 lines
2.8 KiB
TypeScript
import {
|
|
comfyPageFixture as test,
|
|
comfyExpect as expect
|
|
} from '@e2e/fixtures/ComfyPage'
|
|
|
|
test.describe('Bottom Panel Logs', { tag: '@ui' }, () => {
|
|
test('should open bottom panel via toggle button', async ({ comfyPage }) => {
|
|
const { bottomPanel } = comfyPage
|
|
|
|
await expect(bottomPanel.root).toBeHidden()
|
|
await bottomPanel.toggleButton.click()
|
|
await expect(bottomPanel.root).toBeVisible()
|
|
})
|
|
|
|
test('should show Logs tab when terminal panel opens', async ({
|
|
comfyPage
|
|
}) => {
|
|
const { bottomPanel } = comfyPage
|
|
|
|
await bottomPanel.toggleButton.click()
|
|
await expect(bottomPanel.root).toBeVisible()
|
|
|
|
const logsTab = comfyPage.page.getByRole('tab', { name: /Logs/i })
|
|
await expect(logsTab).toBeVisible()
|
|
})
|
|
|
|
test('should close bottom panel via toggle button', async ({ comfyPage }) => {
|
|
const { bottomPanel } = comfyPage
|
|
|
|
await bottomPanel.toggleButton.click()
|
|
await expect(bottomPanel.root).toBeVisible()
|
|
|
|
await bottomPanel.toggleButton.click()
|
|
await expect(bottomPanel.root).toBeHidden()
|
|
})
|
|
|
|
test('should switch between shortcuts and terminal panels', async ({
|
|
comfyPage
|
|
}) => {
|
|
const { bottomPanel } = comfyPage
|
|
|
|
await bottomPanel.keyboardShortcutsButton.click()
|
|
await expect(bottomPanel.root).toBeVisible()
|
|
await expect(
|
|
comfyPage.page.locator('[id*="tab_shortcuts-essentials"]')
|
|
).toBeVisible()
|
|
|
|
await bottomPanel.toggleButton.click()
|
|
|
|
const logsTab = comfyPage.page.getByRole('tab', { name: /Logs/i })
|
|
await expect(logsTab).toBeVisible()
|
|
await expect(
|
|
comfyPage.page.locator('[id*="tab_shortcuts-essentials"]')
|
|
).toBeHidden()
|
|
})
|
|
|
|
test('should persist Logs tab content in bottom panel', async ({
|
|
comfyPage
|
|
}) => {
|
|
const { bottomPanel } = comfyPage
|
|
|
|
await bottomPanel.toggleButton.click()
|
|
await expect(bottomPanel.root).toBeVisible()
|
|
|
|
const logsTab = comfyPage.page.getByRole('tab', { name: /Logs/i })
|
|
await expect(logsTab).toBeVisible()
|
|
|
|
const isAlreadyActive =
|
|
(await logsTab.getAttribute('aria-selected')) === 'true'
|
|
if (!isAlreadyActive) {
|
|
await logsTab.click()
|
|
}
|
|
|
|
const xtermContainer = bottomPanel.root.locator('.xterm')
|
|
await expect(xtermContainer).toBeVisible()
|
|
})
|
|
|
|
test('should render xterm container in terminal panel', async ({
|
|
comfyPage
|
|
}) => {
|
|
const { bottomPanel } = comfyPage
|
|
|
|
await bottomPanel.toggleButton.click()
|
|
await expect(bottomPanel.root).toBeVisible()
|
|
|
|
const logsTab = comfyPage.page.getByRole('tab', { name: /Logs/i })
|
|
await expect(logsTab).toBeVisible()
|
|
|
|
const isAlreadyActive =
|
|
(await logsTab.getAttribute('aria-selected')) === 'true'
|
|
if (!isAlreadyActive) {
|
|
await logsTab.click()
|
|
}
|
|
|
|
const xtermScreen = bottomPanel.root.locator('.xterm, .xterm-screen')
|
|
await expect(xtermScreen.first()).toBeVisible()
|
|
})
|
|
})
|