mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-19 22:09:37 +00:00
## Summary Add 30 E2E tests across 5 spec files covering medium-impact UI interactions: node search V2, bottom panel logs, focus mode, job history actions, and right side panel tabs. ## Tests | Spec file | Tests | Coverage | |---|---|---| | `nodeSearchBoxV2Extended.spec.ts` | 6 | V2 search filtering, keyboard navigation, category display | | `bottomPanelLogs.spec.ts` | 6 | Bottom panel toggle, logs tab, xterm terminal rendering | | `focusMode.spec.ts` | 6 | Focus mode hide/show UI chrome, sidebar/menu visibility | | `jobHistoryActions.spec.ts` | 6 | More options popover, docked history panel, queue interactions | | `rightSidePanelTabs.spec.ts` | 6 | Properties panel, node details, search from side panel | ## Review Focus - Bottom panel logs tests interact with xterm.js — the approach uses terminal container visibility rather than text content assertions. Is this the right level of testing? - Focus mode tests verify UI element hiding — they check element count/visibility rather than visual regression. Appropriate? ## Stack Depends on #9554 for FeatureFlagHelper/QueueHelper infrastructure. - #9554: Test infrastructure helpers - #9555: Toasts, error overlay, selection toolbox, linear mode, selection rectangle - **→ This PR**: Node search, bottom panel, focus mode, job history, side panel - #9557: Errors tab, node headers, queue notifications, settings sidebar - #9558: Minimap, widget copy, floating menus, node library essentials
120 lines
4.0 KiB
TypeScript
120 lines
4.0 KiB
TypeScript
import {
|
|
comfyPageFixture as test,
|
|
comfyExpect as expect
|
|
} from '../fixtures/ComfyPage'
|
|
import { TestIds } from '../fixtures/selectors'
|
|
|
|
test.describe('Right Side Panel Tabs', { tag: '@ui' }, () => {
|
|
test.beforeEach(async ({ comfyPage }) => {
|
|
await comfyPage.settings.setSetting('Comfy.UseNewMenu', 'Top')
|
|
})
|
|
|
|
test('Properties panel opens with workflow overview', async ({
|
|
comfyPage
|
|
}) => {
|
|
await comfyPage.actionbar.propertiesButton.click()
|
|
const { propertiesPanel } = comfyPage.menu
|
|
|
|
await expect(propertiesPanel.root).toBeVisible()
|
|
await expect(propertiesPanel.panelTitle).toContainText('Workflow Overview')
|
|
})
|
|
|
|
test('Properties panel shows node details on selection', async ({
|
|
comfyPage
|
|
}) => {
|
|
await comfyPage.actionbar.propertiesButton.click()
|
|
const { propertiesPanel } = comfyPage.menu
|
|
|
|
await comfyPage.nodeOps.selectNodes(['KSampler'])
|
|
|
|
await expect(propertiesPanel.panelTitle).toContainText('KSampler')
|
|
})
|
|
|
|
test('Node title input is editable', async ({ comfyPage }) => {
|
|
await comfyPage.actionbar.propertiesButton.click()
|
|
const { propertiesPanel } = comfyPage.menu
|
|
|
|
await comfyPage.nodeOps.selectNodes(['KSampler'])
|
|
await expect(propertiesPanel.panelTitle).toContainText('KSampler')
|
|
|
|
// Click on the title to enter edit mode
|
|
await propertiesPanel.panelTitle.click()
|
|
const titleInput = propertiesPanel.root.getByTestId(TestIds.node.titleInput)
|
|
await expect(titleInput).toBeVisible()
|
|
|
|
await titleInput.fill('My Custom Sampler')
|
|
await titleInput.press('Enter')
|
|
|
|
await expect(propertiesPanel.panelTitle).toContainText('My Custom Sampler')
|
|
})
|
|
|
|
test('Search box filters properties', async ({ comfyPage }) => {
|
|
await comfyPage.actionbar.propertiesButton.click()
|
|
const { propertiesPanel } = comfyPage.menu
|
|
|
|
await comfyPage.nodeOps.selectNodes([
|
|
'KSampler',
|
|
'CLIP Text Encode (Prompt)'
|
|
])
|
|
|
|
await expect(propertiesPanel.panelTitle).toContainText('3 items selected')
|
|
await expect(propertiesPanel.root.getByText('KSampler')).toHaveCount(1)
|
|
await expect(
|
|
propertiesPanel.root.getByText('CLIP Text Encode (Prompt)')
|
|
).toHaveCount(2)
|
|
|
|
await propertiesPanel.searchBox.fill('seed')
|
|
await expect(propertiesPanel.root.getByText('KSampler')).toHaveCount(1)
|
|
await expect(
|
|
propertiesPanel.root.getByText('CLIP Text Encode (Prompt)')
|
|
).toHaveCount(0)
|
|
|
|
await propertiesPanel.searchBox.fill('')
|
|
await expect(propertiesPanel.root.getByText('KSampler')).toHaveCount(1)
|
|
await expect(
|
|
propertiesPanel.root.getByText('CLIP Text Encode (Prompt)')
|
|
).toHaveCount(2)
|
|
})
|
|
|
|
test('Expand all / Collapse all toggles sections', async ({ comfyPage }) => {
|
|
await comfyPage.actionbar.propertiesButton.click()
|
|
const { propertiesPanel } = comfyPage.menu
|
|
|
|
// Select multiple nodes so collapse toggle button appears
|
|
await comfyPage.nodeOps.selectNodes([
|
|
'KSampler',
|
|
'CLIP Text Encode (Prompt)'
|
|
])
|
|
|
|
// Sections default to collapsed when multiple nodes are selected,
|
|
// so the button initially shows "Expand all"
|
|
const expandButton = propertiesPanel.root.getByRole('button', {
|
|
name: 'Expand all'
|
|
})
|
|
await expect(expandButton).toBeVisible()
|
|
await expandButton.click()
|
|
|
|
const collapseButton = propertiesPanel.root.getByRole('button', {
|
|
name: 'Collapse all'
|
|
})
|
|
await expect(collapseButton).toBeVisible()
|
|
await collapseButton.click()
|
|
|
|
// After collapsing, the button label switches back to "Expand all"
|
|
await expect(expandButton).toBeVisible()
|
|
})
|
|
|
|
test('Properties panel can be closed', async ({ comfyPage }) => {
|
|
await comfyPage.actionbar.propertiesButton.click()
|
|
const { propertiesPanel } = comfyPage.menu
|
|
|
|
await expect(propertiesPanel.root).toBeVisible()
|
|
|
|
// The actionbar toggle button hides when the panel is open,
|
|
// so use the close button inside the panel itself
|
|
const closeButton = comfyPage.page.getByLabel('Toggle properties panel')
|
|
await closeButton.click()
|
|
await expect(propertiesPanel.root).toBeHidden()
|
|
})
|
|
})
|