Show confirm dialog on workflow path conflict (Save As) (#1590)

* Show confirm dialog on workflow path conflict (Save As)

* Fix closeworkflow

* nit

* Add playwright tests

* nit

* nit

* Move workflows dir cleanup
This commit is contained in:
Chenlei Hu
2024-11-18 23:07:24 -05:00
committed by GitHub
parent 0058691579
commit 6352cd86ee
5 changed files with 95 additions and 9 deletions

View File

@@ -737,6 +737,19 @@ export class ComfyPage {
)
}
async confirmDialog(prompt: string, text: string = 'Yes') {
const modal = this.page.locator(
`.comfy-modal-content:has-text("${prompt}")`
)
await expect(modal).toBeVisible()
await modal
.locator('.comfyui-button', {
hasText: text
})
.click()
await expect(modal).toBeHidden()
}
async convertAllNodesToGroupNode(groupNodeName: string) {
this.page.on('dialog', async (dialog) => {
await dialog.accept(groupNodeName)