test: remove unused select2Nodes and fix flaky timeout

- Remove select2Nodes helper method from NodeOperationsHelper
- Replace usages with selectNodes(['CLIP Text Encode (Prompt)'])
- Increase flaky timeout in mobileBaseline test from 256ms to 5000ms

Amp-Thread-ID: https://ampcode.com/threads/T-019c15b9-efed-72eb-b092-1e92a11f44e3
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Alexander Brown
2026-01-31 12:24:32 -08:00
parent dd2c25c635
commit 98c90d16a0
4 changed files with 6 additions and 14 deletions

View File

@@ -100,14 +100,6 @@ export class NodeOperationsHelper {
await this.comfyPage.nextFrame()
}
async select2Nodes(): Promise<void> {
await this.page.keyboard.down('Control')
await this.comfyPage.clickTextEncodeNode1()
await this.comfyPage.clickTextEncodeNode2()
await this.page.keyboard.up('Control')
await this.comfyPage.nextFrame()
}
async resizeNode(
nodePos: Position,
nodeSize: Size,

View File

@@ -402,7 +402,7 @@ test.describe('Node Interaction', () => {
{ tag: '@screenshot' },
async ({ comfyPage }) => {
await comfyPage.setSetting('Comfy.GroupSelectedNodes.Padding', 10)
await comfyPage.nodeOps.select2Nodes()
await comfyPage.nodeOps.selectNodes(['CLIP Text Encode (Prompt)'])
await comfyPage.page.keyboard.down('Control')
await comfyPage.page.keyboard.press('KeyG')
await comfyPage.page.keyboard.up('Control')
@@ -432,7 +432,7 @@ test.describe('Node Interaction', () => {
)
test('Can pin/unpin nodes', { tag: '@screenshot' }, async ({ comfyPage }) => {
await comfyPage.nodeOps.select2Nodes()
await comfyPage.nodeOps.selectNodes(['CLIP Text Encode (Prompt)'])
await comfyPage.executeCommand('Comfy.Canvas.ToggleSelectedNodes.Pin')
await comfyPage.nextFrame()
await expect(comfyPage.canvas).toHaveScreenshot('nodes-pinned.png')
@@ -445,7 +445,7 @@ test.describe('Node Interaction', () => {
'Can bypass/unbypass nodes with keyboard shortcut',
{ tag: '@screenshot' },
async ({ comfyPage }) => {
await comfyPage.nodeOps.select2Nodes()
await comfyPage.nodeOps.selectNodes(['CLIP Text Encode (Prompt)'])
await comfyPage.canvas.press('Control+b')
await comfyPage.nextFrame()
await expect(comfyPage.canvas).toHaveScreenshot('nodes-bypassed.png')

View File

@@ -10,7 +10,7 @@ test.describe(
await comfyPage.executeCommand('Comfy.ClearWorkflow')
await expect(async () => {
expect(await comfyPage.nodeOps.getGraphNodesCount()).toBe(0)
}).toPass({ timeout: 256 })
}).toPass({ timeout: 5000 })
await comfyPage.nextFrame()
await expect(comfyPage.canvas).toHaveScreenshot('mobile-empty-canvas.png')
})

View File

@@ -34,7 +34,7 @@ test.describe(
})
test('Can convert to group node', async ({ comfyPage }) => {
await comfyPage.nodeOps.select2Nodes()
await comfyPage.nodeOps.selectNodes(['CLIP Text Encode (Prompt)'])
await expect(comfyPage.canvas).toHaveScreenshot('selected-2-nodes.png')
await comfyPage.canvasOps.rightClick()
await comfyPage.clickContextMenuItem('Convert to Group Node (Deprecated)')
@@ -139,7 +139,7 @@ test.describe('Node Right Click Menu', { tag: ['@screenshot', '@ui'] }, () => {
})
test('Can pin/unpin selected nodes', async ({ comfyPage }) => {
await comfyPage.nodeOps.select2Nodes()
await comfyPage.nodeOps.selectNodes(['CLIP Text Encode (Prompt)'])
await comfyPage.page.keyboard.down('Control')
await comfyPage.rightClickEmptyLatentNode()
await comfyPage.page.click('.litemenu-entry:has-text("Pin")')