mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-01 11:10:00 +00:00
fix: sync node.imgs in Vue nodes for Copy Image compatibility
- Add syncNodeImgs() to ImagePreview.vue to sync node.imgs on image load - Simplify setupNodeForMaskEditor() to reuse sync logic - Add aria-label to MaskEditorButton for accessibility - Add browser test for mask editor button functionality - Add unit test for node.imgs sync behavior Fixes copy image and other legacy features that rely on node.imgs
This commit is contained in:
@@ -25,7 +25,9 @@ test.describe('Vue Nodes Mask Editor', () => {
|
||||
waitForUpload: true
|
||||
})
|
||||
|
||||
await comfyPage.page.waitForTimeout(500)
|
||||
// Wait for image preview to appear
|
||||
const imagePreview = comfyPage.page.locator('.image-preview img')
|
||||
await expect(imagePreview).toBeVisible()
|
||||
|
||||
const maskEditorDialog = comfyPage.page.locator('.maskEditor-dialog-root')
|
||||
|
||||
@@ -33,9 +35,9 @@ test.describe('Vue Nodes Mask Editor', () => {
|
||||
await comfyPage.selectNodes(['Load Image'])
|
||||
await expect(comfyPage.selectionToolbox).toBeVisible()
|
||||
|
||||
const toolboxMaskButton = comfyPage.page.locator(
|
||||
'.selection-toolbox button:has(.i-comfy\\:mask)'
|
||||
)
|
||||
const toolboxMaskButton = comfyPage.selectionToolbox.getByRole('button', {
|
||||
name: /mask editor/i
|
||||
})
|
||||
await expect(toolboxMaskButton).toBeVisible()
|
||||
await toolboxMaskButton.click()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user