mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-07 16:40:05 +00:00
fix: revert selectNodes changes and fix test assertions
Amp-Thread-ID: https://ampcode.com/threads/T-019c17a0-1d8c-746f-8ee0-0145b7f56561
This commit is contained in:
@@ -1373,18 +1373,14 @@ export class ComfyPage {
|
||||
}
|
||||
|
||||
async selectNodes(nodeTitles: string[]) {
|
||||
let isFirst = true
|
||||
await this.page.keyboard.down('Control')
|
||||
for (const nodeTitle of nodeTitles) {
|
||||
const nodes = await this.getNodeRefsByTitle(nodeTitle)
|
||||
for (const node of nodes) {
|
||||
if (isFirst) {
|
||||
await node.click('title')
|
||||
isFirst = false
|
||||
} else {
|
||||
await node.click('title', { modifiers: ['Control'] })
|
||||
}
|
||||
await node.click('title')
|
||||
}
|
||||
}
|
||||
await this.page.keyboard.up('Control')
|
||||
await this.nextFrame()
|
||||
}
|
||||
|
||||
@@ -1609,7 +1605,7 @@ export class ComfyPage {
|
||||
(
|
||||
await this.page.evaluate((title) => {
|
||||
return window['app'].graph.nodes
|
||||
.filter((n: LGraphNode) => n.getTitle() === title)
|
||||
.filter((n: LGraphNode) => n.title === title)
|
||||
.map((n: LGraphNode) => n.id)
|
||||
}, title)
|
||||
).map((id: NodeId) => this.getNodeRefById(id))
|
||||
|
||||
@@ -12,16 +12,16 @@ test.describe('Properties panel', () => {
|
||||
|
||||
await comfyPage.selectNodes(['KSampler', 'VAE Decode'])
|
||||
|
||||
await expect(propertiesPanel.panelTitle).toContainText('3 items selected')
|
||||
await expect(propertiesPanel.root.getByText('KSampler')).toHaveCount(1)
|
||||
await expect(propertiesPanel.root.getByText('VAE Decode')).toHaveCount(2)
|
||||
await expect(propertiesPanel.panelTitle).toContainText('2 items selected')
|
||||
await expect(propertiesPanel.root.getByText('KSampler')).toBeVisible()
|
||||
await expect(propertiesPanel.root.getByText('VAE Decode')).toBeVisible()
|
||||
|
||||
await propertiesPanel.searchBox.fill('seed')
|
||||
await expect(propertiesPanel.root.getByText('KSampler')).toHaveCount(1)
|
||||
await expect(propertiesPanel.root.getByText('VAE Decode')).toHaveCount(0)
|
||||
await expect(propertiesPanel.root.getByText('KSampler')).toBeVisible()
|
||||
await expect(propertiesPanel.root.getByText('VAE Decode')).not.toBeVisible()
|
||||
|
||||
await propertiesPanel.searchBox.fill('')
|
||||
await expect(propertiesPanel.root.getByText('KSampler')).toHaveCount(1)
|
||||
await expect(propertiesPanel.root.getByText('VAE Decode')).toHaveCount(2)
|
||||
await expect(propertiesPanel.root.getByText('KSampler')).toBeVisible()
|
||||
await expect(propertiesPanel.root.getByText('VAE Decode')).toBeVisible()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user