-
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
Changes from all commits
1061b34
dbbc91b
e339201
ef8ee69
46b9820
35fd781
9f3a270
684f81a
f074e87
ad91453
8bb1ca5
fa385b7
568cef2
ea2e948
65ffbfd
09bf43f
82b2ab1
06a5e60
c7ed24c
969c357
1d4e4a9
d85cf45
3a59cf5
d1dc3d5
b5ada2e
ad03429
6c36d1f
0f37003
73e523d
f34d988
7971ce6
7602911
7ee085b
97acd83
744a29f
c3fc13c
6d1018a
d418b29
e978707
4e8f383
c222784
a0ed98b
96e1c04
e4acaeb
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.