mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-23 07:50:15 +00:00
The default workflow has 2 CLIP Text Encode (Prompt) nodes. Using selectNodes(['KSampler', 'CLIP Text Encode (Prompt)']) selected all 3 nodes (1 KSampler + 2 CLIP) instead of just 2. Added selectFirstNodeByTitles helper that only selects the first matching node for each title, avoiding strict mode violations. Amp-Thread-ID: https://ampcode.com/threads/T-019c177d-06bf-779a-9c72-51a3626e4659
37 lines
1.2 KiB
TypeScript
37 lines
1.2 KiB
TypeScript
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
|
|
|
|
await expect(propertiesPanel.panelTitle).toContainText('Workflow Overview')
|
|
|
|
await comfyPage.selectFirstNodeByTitles([
|
|
'KSampler',
|
|
'CLIP Text Encode (Prompt)'
|
|
])
|
|
|
|
await expect(propertiesPanel.panelTitle).toContainText('items selected')
|
|
await expect(propertiesPanel.root.getByText('KSampler')).toHaveCount(1)
|
|
await expect(
|
|
propertiesPanel.root.getByText('CLIP Text Encode (Prompt)').first()
|
|
).toBeVisible()
|
|
|
|
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)').first()
|
|
).toBeVisible()
|
|
})
|
|
})
|