mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-28 10:12:11 +00:00
fix: use selectFirstNodeByTitles to avoid strict mode violations
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
This commit is contained in:
@@ -120,7 +120,7 @@ test.describe('Properties panel basic functionality', { tag: ['@ui'] }, () => {
|
||||
}) => {
|
||||
const { propertiesPanel } = comfyPage
|
||||
|
||||
await comfyPage.selectNodes(['KSampler', 'CLIP Text Encode (Prompt)'])
|
||||
await comfyPage.select2Nodes()
|
||||
|
||||
await expect(propertiesPanel.panelTitle).toContainText('items selected')
|
||||
})
|
||||
@@ -130,7 +130,7 @@ test.describe('Properties panel basic functionality', { tag: ['@ui'] }, () => {
|
||||
}) => {
|
||||
const { propertiesPanel } = comfyPage
|
||||
|
||||
await comfyPage.selectNodes(['KSampler', 'CLIP Text Encode (Prompt)'])
|
||||
await comfyPage.select2Nodes()
|
||||
|
||||
await expect(propertiesPanel.getTab('Parameters')).toBeVisible()
|
||||
await expect(propertiesPanel.getTab('Settings')).toBeVisible()
|
||||
@@ -142,11 +142,10 @@ test.describe('Properties panel basic functionality', { tag: ['@ui'] }, () => {
|
||||
}) => {
|
||||
const { propertiesPanel } = comfyPage
|
||||
|
||||
await comfyPage.selectNodes(['KSampler', 'CLIP Text Encode (Prompt)'])
|
||||
await comfyPage.select2Nodes()
|
||||
|
||||
await expect(propertiesPanel.root.getByText('KSampler')).toBeVisible()
|
||||
await expect(
|
||||
propertiesPanel.root.getByText('CLIP Text Encode (Prompt)')
|
||||
propertiesPanel.root.getByText('CLIP Text Encode (Prompt)').first()
|
||||
).toBeVisible()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user