mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-10 23:50:00 +00:00
Ignore missing dialog (#743)
* Do not report missing nodes/models warning repeatedly * Add playwright tests * cast finalOptions, add comments to interface * Use old menu in tests to not break top left click methods * Assert no dialog on undo and on redo separately * nit * nit --------- Co-authored-by: christian-byrne <abolkonsky.rem@gmail.com>
This commit is contained in:
@@ -424,6 +424,13 @@ export class ComfyPage {
|
||||
await this.nextFrame()
|
||||
}
|
||||
|
||||
async ctrlY() {
|
||||
await this.page.keyboard.down('Control')
|
||||
await this.page.keyboard.press('KeyY')
|
||||
await this.page.keyboard.up('Control')
|
||||
await this.nextFrame()
|
||||
}
|
||||
|
||||
async ctrlArrowUp() {
|
||||
await this.page.keyboard.down('Control')
|
||||
await this.page.keyboard.press('ArrowUp')
|
||||
|
||||
@@ -13,6 +13,48 @@ test.describe('Load workflow warning', () => {
|
||||
})
|
||||
})
|
||||
|
||||
test('Does not report warning when switching between opened workflows', async ({
|
||||
comfyPage
|
||||
}) => {
|
||||
await comfyPage.setSetting('Comfy.UseNewMenu', 'Top')
|
||||
await comfyPage.loadWorkflow('missing_nodes')
|
||||
await comfyPage.page.locator('.p-dialog-close-button').click()
|
||||
|
||||
// Load default workflow
|
||||
const workflowSelector = comfyPage.page.locator(
|
||||
'button.comfyui-workflows-button'
|
||||
)
|
||||
await workflowSelector.hover()
|
||||
await workflowSelector.click()
|
||||
await comfyPage.page.locator('button[title="Load default workflow"]').click()
|
||||
|
||||
// Switch back to the missing_nodes workflow
|
||||
await workflowSelector.click()
|
||||
await comfyPage.page.locator('span:has-text("missing_nodes")').first().click()
|
||||
await comfyPage.nextFrame()
|
||||
|
||||
await expect(comfyPage.page.locator('.comfy-missing-nodes')).not.toBeVisible()
|
||||
await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled')
|
||||
})
|
||||
|
||||
test('Does not report warning on undo/redo', async ({ comfyPage }) => {
|
||||
await comfyPage.loadWorkflow('missing_nodes')
|
||||
await comfyPage.page.locator('.p-dialog-close-button').click()
|
||||
await comfyPage.nextFrame()
|
||||
|
||||
// Make a change to the graph
|
||||
await comfyPage.setSetting('Comfy.NodeSearchBoxImpl', 'default')
|
||||
await comfyPage.page.waitForTimeout(256)
|
||||
await comfyPage.doubleClickCanvas()
|
||||
await comfyPage.searchBox.fillAndSelectFirstNode('KSampler')
|
||||
|
||||
// Undo and redo the change
|
||||
await comfyPage.ctrlZ()
|
||||
await expect(comfyPage.page.locator('.comfy-missing-nodes')).not.toBeVisible()
|
||||
await comfyPage.ctrlY()
|
||||
await expect(comfyPage.page.locator('.comfy-missing-nodes')).not.toBeVisible()
|
||||
})
|
||||
|
||||
test.describe('Execution error', () => {
|
||||
test('Should display an error message when an execution error occurs', async ({
|
||||
comfyPage
|
||||
|
||||
Reference in New Issue
Block a user