diff --git a/browser_tests/fixtures/ComfyPage.ts b/browser_tests/fixtures/ComfyPage.ts index 9c1ebeb7a5..aed8a40728 100644 --- a/browser_tests/fixtures/ComfyPage.ts +++ b/browser_tests/fixtures/ComfyPage.ts @@ -27,18 +27,32 @@ dotenv.config() type WorkspaceStore = ReturnType +class ComfyPropertiesPanel { + readonly root: Locator + readonly panelTitle: Locator + readonly searchBox: Locator + + constructor(readonly page: Page) { + this.root = page.getByTestId('properties-panel') + this.panelTitle = this.root.locator('h3') + this.searchBox = this.root.getByPlaceholder('Search...') + } +} + class ComfyMenu { private _nodeLibraryTab: NodeLibrarySidebarTab | null = null private _workflowsTab: WorkflowsSidebarTab | null = null private _topbar: Topbar | null = null public readonly sideToolbar: Locator + public readonly propertiesPanel: ComfyPropertiesPanel public readonly themeToggleButton: Locator public readonly saveButton: Locator constructor(public readonly page: Page) { this.sideToolbar = page.locator('.side-tool-bar-container') this.themeToggleButton = page.locator('.comfy-vue-theme-toggle') + this.propertiesPanel = new ComfyPropertiesPanel(page) this.saveButton = page .locator('button[title="Save the current workflow"]') .nth(0) diff --git a/browser_tests/helpers/actionbar.ts b/browser_tests/helpers/actionbar.ts index 89d5e73ad1..6c368c4d65 100644 --- a/browser_tests/helpers/actionbar.ts +++ b/browser_tests/helpers/actionbar.ts @@ -5,14 +5,18 @@ import type { AutoQueueMode } from '../../src/stores/queueStore' export class ComfyActionbar { public readonly root: Locator public readonly queueButton: ComfyQueueButton + public readonly propertiesButton: Locator constructor(public readonly page: Page) { - this.root = page.locator('.actionbar') + this.root = page.locator('.actionbar-container') this.queueButton = new ComfyQueueButton(this) + this.propertiesButton = this.root.getByLabel('Toggle properties panel') } async isDocked() { - const className = await this.root.getAttribute('class') + const className = await this.root + .locator('.actionbar') + .getAttribute('class') return className?.includes('static') ?? false } } diff --git a/browser_tests/tests/domWidget.spec.ts-snapshots/focus-mode-on-chromium-linux.png b/browser_tests/tests/domWidget.spec.ts-snapshots/focus-mode-on-chromium-linux.png index 765aa1126c..10d964055f 100644 Binary files a/browser_tests/tests/domWidget.spec.ts-snapshots/focus-mode-on-chromium-linux.png and b/browser_tests/tests/domWidget.spec.ts-snapshots/focus-mode-on-chromium-linux.png differ diff --git a/browser_tests/tests/nodeHelp.spec.ts b/browser_tests/tests/nodeHelp.spec.ts index 393f675418..93da58310d 100644 --- a/browser_tests/tests/nodeHelp.spec.ts +++ b/browser_tests/tests/nodeHelp.spec.ts @@ -52,13 +52,10 @@ test.describe('Node Help', () => { await expect(helpButton).toBeVisible() await helpButton.click() - // Verify that the node library sidebar is opened - await expect( - comfyPage.menu.nodeLibraryTab.selectedTabButton - ).toBeVisible() - // Verify that the help page is shown for the correct node - const helpPage = comfyPage.page.locator('.sidebar-content-container') + const helpPage = comfyPage.page.locator( + '[data-testid="properties-panel"]' + ) await expect(helpPage).toContainText('KSampler') await expect(helpPage.locator('.node-help-content')).toBeVisible() }) @@ -170,7 +167,9 @@ test.describe('Node Help', () => { await helpButton.click() // Verify loading spinner is shown - const helpPage = comfyPage.page.locator('.sidebar-content-container') + const helpPage = comfyPage.page.locator( + '[data-testid="properties-panel"]' + ) await expect(helpPage.locator('.p-progressspinner')).toBeVisible() // Wait for content to load @@ -200,7 +199,9 @@ test.describe('Node Help', () => { await helpButton.click() // Verify fallback content is shown (description, inputs, outputs) - const helpPage = comfyPage.page.locator('.sidebar-content-container') + const helpPage = comfyPage.page.locator( + '[data-testid="properties-panel"]' + ) await expect(helpPage).toContainText('Description') await expect(helpPage).toContainText('Inputs') await expect(helpPage).toContainText('Outputs') @@ -233,7 +234,9 @@ test.describe('Node Help', () => { ) await helpButton.click() - const helpPage = comfyPage.page.locator('.sidebar-content-container') + const helpPage = comfyPage.page.locator( + '[data-testid="properties-panel"]' + ) await expect(helpPage).toContainText('KSampler Documentation') // Check that relative image paths are prefixed correctly @@ -281,7 +284,9 @@ test.describe('Node Help', () => { ) await helpButton.click() - const helpPage = comfyPage.page.locator('.sidebar-content-container') + const helpPage = comfyPage.page.locator( + '[data-testid="properties-panel"]' + ) // Check relative video paths are prefixed const relativeVideo = helpPage.locator('video[src*="demo.mp4"]') @@ -354,7 +359,9 @@ This is documentation for a custom node. if (await helpButton.isVisible()) { await helpButton.click() - const helpPage = comfyPage.page.locator('.sidebar-content-container') + const helpPage = comfyPage.page.locator( + '[data-testid="properties-panel"]' + ) await expect(helpPage).toContainText('Custom Node Documentation') // Check image path for custom nodes @@ -394,7 +401,9 @@ This is documentation for a custom node. ) await helpButton.click() - const helpPage = comfyPage.page.locator('.sidebar-content-container') + const helpPage = comfyPage.page.locator( + '[data-testid="properties-panel"]' + ) // Dangerous elements should be removed await expect(helpPage.locator('script')).toHaveCount(0) @@ -461,7 +470,9 @@ This is English documentation. ) await helpButton.click() - const helpPage = comfyPage.page.locator('.sidebar-content-container') + const helpPage = comfyPage.page.locator( + '[data-testid="properties-panel"]' + ) await expect(helpPage).toContainText('KSamplerノード') await expect(helpPage).toContainText('これは日本語のドキュメントです') @@ -484,7 +495,9 @@ This is English documentation. ) await helpButton.click() - const helpPage = comfyPage.page.locator('.sidebar-content-container') + const helpPage = comfyPage.page.locator( + '[data-testid="properties-panel"]' + ) // Should show fallback content (node description) await expect(helpPage).toBeVisible() @@ -528,7 +541,9 @@ This is English documentation. ) await helpButton.click() - const helpPage = comfyPage.page.locator('.sidebar-content-container') + const helpPage = comfyPage.page.locator( + '[data-testid="properties-panel"]' + ) await expect(helpPage).toContainText('KSampler Help') await expect(helpPage).toContainText('This is KSampler documentation') diff --git a/browser_tests/tests/propertiesPanel/propertiesPanel.spec.ts b/browser_tests/tests/propertiesPanel/propertiesPanel.spec.ts new file mode 100644 index 0000000000..9ff32c8a48 --- /dev/null +++ b/browser_tests/tests/propertiesPanel/propertiesPanel.spec.ts @@ -0,0 +1,35 @@ +import { expect } from '@playwright/test' + +import { comfyPageFixture as test } from '../../fixtures/ComfyPage' + +test.describe('Properties panel', () => { + test('opens and updates title based on selection', async ({ comfyPage }) => { + await comfyPage.actionbar.propertiesButton.click() + + const { propertiesPanel } = comfyPage.menu + + await expect(propertiesPanel.panelTitle).toContainText( + 'No node(s) selected' + ) + + await comfyPage.selectNodes(['KSampler', 'CLIP Text Encode (Prompt)']) + + await expect(propertiesPanel.panelTitle).toContainText('3 nodes 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) + }) +}) diff --git a/browser_tests/tests/rerouteNode.spec.ts-snapshots/reroute-inserted-chromium-linux.png b/browser_tests/tests/rerouteNode.spec.ts-snapshots/reroute-inserted-chromium-linux.png index 5d503a0e79..040347b79f 100644 Binary files a/browser_tests/tests/rerouteNode.spec.ts-snapshots/reroute-inserted-chromium-linux.png and b/browser_tests/tests/rerouteNode.spec.ts-snapshots/reroute-inserted-chromium-linux.png differ diff --git a/browser_tests/tests/vueNodes/groups/groups.spec.ts-snapshots/vue-groups-create-group-chromium-linux.png b/browser_tests/tests/vueNodes/groups/groups.spec.ts-snapshots/vue-groups-create-group-chromium-linux.png index 333cfbf73a..aa60c90eb0 100644 Binary files a/browser_tests/tests/vueNodes/groups/groups.spec.ts-snapshots/vue-groups-create-group-chromium-linux.png and b/browser_tests/tests/vueNodes/groups/groups.spec.ts-snapshots/vue-groups-create-group-chromium-linux.png differ diff --git a/browser_tests/tests/vueNodes/groups/groups.spec.ts-snapshots/vue-groups-fit-to-contents-chromium-linux.png b/browser_tests/tests/vueNodes/groups/groups.spec.ts-snapshots/vue-groups-fit-to-contents-chromium-linux.png index 2388f6e80e..7874e1fb4d 100644 Binary files a/browser_tests/tests/vueNodes/groups/groups.spec.ts-snapshots/vue-groups-fit-to-contents-chromium-linux.png and b/browser_tests/tests/vueNodes/groups/groups.spec.ts-snapshots/vue-groups-fit-to-contents-chromium-linux.png differ diff --git a/browser_tests/tests/vueNodes/interactions/canvas/pan.spec.ts-snapshots/vue-nodes-paned-with-touch-mobile-chrome-linux.png b/browser_tests/tests/vueNodes/interactions/canvas/pan.spec.ts-snapshots/vue-nodes-paned-with-touch-mobile-chrome-linux.png index 26b69d8d6f..c473af74e0 100644 Binary files a/browser_tests/tests/vueNodes/interactions/canvas/pan.spec.ts-snapshots/vue-nodes-paned-with-touch-mobile-chrome-linux.png and b/browser_tests/tests/vueNodes/interactions/canvas/pan.spec.ts-snapshots/vue-nodes-paned-with-touch-mobile-chrome-linux.png differ diff --git a/browser_tests/tests/vueNodes/interactions/canvas/zoom.spec.ts-snapshots/zoomed-in-ctrl-shift-chromium-linux.png b/browser_tests/tests/vueNodes/interactions/canvas/zoom.spec.ts-snapshots/zoomed-in-ctrl-shift-chromium-linux.png index 9a1418b682..1c87757c5d 100644 Binary files a/browser_tests/tests/vueNodes/interactions/canvas/zoom.spec.ts-snapshots/zoomed-in-ctrl-shift-chromium-linux.png and b/browser_tests/tests/vueNodes/interactions/canvas/zoom.spec.ts-snapshots/zoomed-in-ctrl-shift-chromium-linux.png differ diff --git a/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-dragging-link-chromium-linux.png b/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-dragging-link-chromium-linux.png index 659a1c778a..c454a29773 100644 Binary files a/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-dragging-link-chromium-linux.png and b/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-dragging-link-chromium-linux.png differ diff --git a/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-input-drag-ctrl-alt-chromium-linux.png b/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-input-drag-ctrl-alt-chromium-linux.png index 7818c65ae3..8bbbade09a 100644 Binary files a/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-input-drag-ctrl-alt-chromium-linux.png and b/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-input-drag-ctrl-alt-chromium-linux.png differ diff --git a/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-input-drag-reuses-origin-chromium-linux.png b/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-input-drag-reuses-origin-chromium-linux.png index 0052e744d8..ddeed325af 100644 Binary files a/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-input-drag-reuses-origin-chromium-linux.png and b/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-input-drag-reuses-origin-chromium-linux.png differ diff --git a/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-reroute-input-drag-chromium-linux.png b/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-reroute-input-drag-chromium-linux.png index 4877aa8e23..c1b84f2cd3 100644 Binary files a/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-reroute-input-drag-chromium-linux.png and b/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-reroute-input-drag-chromium-linux.png differ diff --git a/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-reroute-output-shift-drag-chromium-linux.png b/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-reroute-output-shift-drag-chromium-linux.png index ff3fa60d0e..bc40dbb141 100644 Binary files a/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-reroute-output-shift-drag-chromium-linux.png and b/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-reroute-output-shift-drag-chromium-linux.png differ diff --git a/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-shift-output-multi-link-chromium-linux.png b/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-shift-output-multi-link-chromium-linux.png index c0d1539dcd..6ac61c8b0c 100644 Binary files a/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-shift-output-multi-link-chromium-linux.png and b/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-shift-output-multi-link-chromium-linux.png differ diff --git a/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-snap-to-node-chromium-linux.png b/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-snap-to-node-chromium-linux.png index eba007e68e..be53102c58 100644 Binary files a/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-snap-to-node-chromium-linux.png and b/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-snap-to-node-chromium-linux.png differ diff --git a/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-snap-to-slot-chromium-linux.png b/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-snap-to-slot-chromium-linux.png index dd741692a0..33dbd25598 100644 Binary files a/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-snap-to-slot-chromium-linux.png and b/browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts-snapshots/vue-node-snap-to-slot-chromium-linux.png differ diff --git a/browser_tests/tests/vueNodes/interactions/node/move.spec.ts-snapshots/vue-node-moved-node-chromium-linux.png b/browser_tests/tests/vueNodes/interactions/node/move.spec.ts-snapshots/vue-node-moved-node-chromium-linux.png index cc409f0af5..a025ece449 100644 Binary files a/browser_tests/tests/vueNodes/interactions/node/move.spec.ts-snapshots/vue-node-moved-node-chromium-linux.png and b/browser_tests/tests/vueNodes/interactions/node/move.spec.ts-snapshots/vue-node-moved-node-chromium-linux.png differ diff --git a/browser_tests/tests/vueNodes/interactions/node/move.spec.ts-snapshots/vue-node-moved-node-touch-mobile-chrome-linux.png b/browser_tests/tests/vueNodes/interactions/node/move.spec.ts-snapshots/vue-node-moved-node-touch-mobile-chrome-linux.png index 07ae48d8d9..44387515dd 100644 Binary files a/browser_tests/tests/vueNodes/interactions/node/move.spec.ts-snapshots/vue-node-moved-node-touch-mobile-chrome-linux.png and b/browser_tests/tests/vueNodes/interactions/node/move.spec.ts-snapshots/vue-node-moved-node-touch-mobile-chrome-linux.png differ diff --git a/browser_tests/tests/vueNodes/nodeStates/bypass.spec.ts-snapshots/vue-node-bypassed-state-chromium-linux.png b/browser_tests/tests/vueNodes/nodeStates/bypass.spec.ts-snapshots/vue-node-bypassed-state-chromium-linux.png index 5d2483ded9..dc585c6d81 100644 Binary files a/browser_tests/tests/vueNodes/nodeStates/bypass.spec.ts-snapshots/vue-node-bypassed-state-chromium-linux.png and b/browser_tests/tests/vueNodes/nodeStates/bypass.spec.ts-snapshots/vue-node-bypassed-state-chromium-linux.png differ diff --git a/browser_tests/tests/vueNodes/nodeStates/colors.spec.ts-snapshots/vue-node-custom-color-blue-chromium-linux.png b/browser_tests/tests/vueNodes/nodeStates/colors.spec.ts-snapshots/vue-node-custom-color-blue-chromium-linux.png index ff3a603d9a..f5ba72c46c 100644 Binary files a/browser_tests/tests/vueNodes/nodeStates/colors.spec.ts-snapshots/vue-node-custom-color-blue-chromium-linux.png and b/browser_tests/tests/vueNodes/nodeStates/colors.spec.ts-snapshots/vue-node-custom-color-blue-chromium-linux.png differ diff --git a/browser_tests/tests/vueNodes/nodeStates/colors.spec.ts-snapshots/vue-node-custom-colors-dark-all-colors-chromium-linux.png b/browser_tests/tests/vueNodes/nodeStates/colors.spec.ts-snapshots/vue-node-custom-colors-dark-all-colors-chromium-linux.png index 48319f6874..3759efb2d4 100644 Binary files a/browser_tests/tests/vueNodes/nodeStates/colors.spec.ts-snapshots/vue-node-custom-colors-dark-all-colors-chromium-linux.png and b/browser_tests/tests/vueNodes/nodeStates/colors.spec.ts-snapshots/vue-node-custom-colors-dark-all-colors-chromium-linux.png differ diff --git a/browser_tests/tests/vueNodes/nodeStates/mute.spec.ts-snapshots/vue-node-muted-state-chromium-linux.png b/browser_tests/tests/vueNodes/nodeStates/mute.spec.ts-snapshots/vue-node-muted-state-chromium-linux.png index b54311466e..b71272bace 100644 Binary files a/browser_tests/tests/vueNodes/nodeStates/mute.spec.ts-snapshots/vue-node-muted-state-chromium-linux.png and b/browser_tests/tests/vueNodes/nodeStates/mute.spec.ts-snapshots/vue-node-muted-state-chromium-linux.png differ diff --git a/browser_tests/tests/vueNodes/widgets/load/uploadWidgets.spec.ts-snapshots/vue-nodes-upload-widgets-chromium-linux.png b/browser_tests/tests/vueNodes/widgets/load/uploadWidgets.spec.ts-snapshots/vue-nodes-upload-widgets-chromium-linux.png index 6bfb5d0cfe..1325f6ddc1 100644 Binary files a/browser_tests/tests/vueNodes/widgets/load/uploadWidgets.spec.ts-snapshots/vue-nodes-upload-widgets-chromium-linux.png and b/browser_tests/tests/vueNodes/widgets/load/uploadWidgets.spec.ts-snapshots/vue-nodes-upload-widgets-chromium-linux.png differ diff --git a/src/components/LiteGraphCanvasSplitterOverlay.vue b/src/components/LiteGraphCanvasSplitterOverlay.vue index 3cde0a0909..830fdf1fc8 100644 --- a/src/components/LiteGraphCanvasSplitterOverlay.vue +++ b/src/components/LiteGraphCanvasSplitterOverlay.vue @@ -1,5 +1,7 @@ diff --git a/src/components/MenuHamburger.vue b/src/components/MenuHamburger.vue index 467561b54b..ab914f6678 100644 --- a/src/components/MenuHamburger.vue +++ b/src/components/MenuHamburger.vue @@ -1,7 +1,7 @@