-
Notifications
You must be signed in to change notification settings - Fork 433
Cleanup: Properties Panel #7137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
85aafed
fe165fe
712bc86
7645320
941f22e
8214a92
0a84c40
885dfe9
eaca69b
de2f78c
f9b56b3
21daf28
47749c5
c19c29d
515ade8
95e39fd
97864d8
9fae437
1c167d1
51cbaaf
5708aea
d95359f
a0b6ce2
f62d17a
cfcf67d
b3bdfff
5ccd48b
55ae304
c666df2
add7b98
ce4f6ba
10db9f5
8825d15
cd6b2fc
20525a2
d7857bf
c7c1b16
199abdd
23c5512
6dfb1f0
fbab8a9
91fe4b6
5b4aad6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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"]' | ||
| ) | ||
|
Comment on lines
+56
to
+58
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial Unify help panel selectors and consider a shared fixture helper The switch to
I recommend (1) confirming whether node-library help is also rendered via the properties panel and aligning those tests accordingly, and (2) extracting a shared locator on Also applies to: 170-172, 202-204, 237-239, 287-289, 362-364, 404-406, 473-475, 498-500, 544-546 |
||
| 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') | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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' | ||
| ) | ||
DrJKL marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| 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) | ||
DrJKL marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| 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) | ||
| }) | ||
| }) | ||
Uh oh!
There was an error while loading. Please reload this page.