Add default confirm dialog (#2114)

This commit is contained in:
Chenlei Hu
2024-12-31 18:18:48 -05:00
committed by GitHub
parent 174a9a114a
commit 3189e310a8
5 changed files with 66 additions and 9 deletions

View File

@@ -177,5 +177,23 @@ test.describe('Topbar commands', () => {
'Hello, world!'
)
})
test('Should allow showing a confirmation dialog', async ({
comfyPage
}) => {
await comfyPage.page.evaluate(() => {
window['app'].extensionManager.dialog
.confirm({
title: 'Test Confirm',
message: 'Test Confirm Message'
})
.then((value: boolean) => {
window['value'] = value
})
})
await comfyPage.confirmDialog.click('confirm')
expect(await comfyPage.page.evaluate(() => window['value'])).toBe(true)
})
})
})