Skip to content

Commit

Permalink
Fix group node copy paste
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-byrne authored and huchenlei committed Oct 2, 2024
1 parent aca2194 commit 60c14d6
Show file tree
Hide file tree
Showing 4 changed files with 532 additions and 14 deletions.
11 changes: 10 additions & 1 deletion browser_tests/ComfyPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ class Topbar {

const tabName = path[0]
const topLevelMenu = this.page.locator(
`.top-menubar .p-menubar-item:has-text("${tabName}")`
`.top-menubar .p-menubar-item-label:text-is("${tabName}")`
)
await topLevelMenu.waitFor({ state: 'visible' })
await topLevelMenu.click()
Expand Down Expand Up @@ -1107,10 +1107,14 @@ export class NodeReference {
let clickPos: Position
switch (position) {
case 'title':
<<<<<<< HEAD
clickPos = { x: nodePos.x + nodeSize.width / 2, y: nodePos.y - 15 }
break
case 'collapse':
clickPos = { x: nodePos.x + 5, y: nodePos.y - 10 }
=======
clickPos = { x: nodePos.x + nodeSize.width / 2, y: nodePos.y + 1 }
>>>>>>> 263f05b (Fix group node copy paste)
break
default:
throw new Error(`Invalid click position ${position}`)
Expand All @@ -1130,6 +1134,11 @@ export class NodeReference {
await this.comfyPage.moveMouseToEmptyArea()
}
}
async copy() {
await this.click('title')
await this.comfyPage.ctrlC()
await this.comfyPage.nextFrame()
}
async connectWidget(
originSlotIndex: number,
targetNode: NodeReference,
Expand Down
Loading

0 comments on commit 60c14d6

Please sign in to comment.