Fix group node manage opening to wrong node type (#1754)

Remove dialog from DOM when closed
Add test
This commit is contained in:
pythongosssss
2024-12-02 00:52:08 +00:00
committed by GitHub
parent 9b07993e1a
commit 5c6eecd660
4 changed files with 41 additions and 3 deletions

View File

@@ -1,12 +1,14 @@
import { Locator, Page } from '@playwright/test'
export class ManageGroupNode {
footer: Locator
header: Locator
constructor(
readonly page: Page,
readonly root: Locator
) {
this.footer = root.locator('footer')
this.header = root.locator('header')
}
async setLabel(name: string, label: string) {
@@ -23,6 +25,11 @@ export class ManageGroupNode {
await this.footer.getByText('Close').click()
}
async getSelectedNodeType() {
const select = this.header.locator('select').first()
return await select.inputValue()
}
async selectNode(name: string) {
const list = this.root.locator('.comfy-group-manage-list-items')
const item = list.getByText(name)