mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 11:11:53 +00:00
fix: use combo widget instead of drag-drop in mask editor test
This commit is contained in:
@@ -15,17 +15,14 @@ test.describe('Vue Nodes Mask Editor', () => {
|
|||||||
await comfyPage.loadWorkflow('widgets/load_image_widget')
|
await comfyPage.loadWorkflow('widgets/load_image_widget')
|
||||||
await comfyPage.vueNodes.waitForNodes()
|
await comfyPage.vueNodes.waitForNodes()
|
||||||
|
|
||||||
// Get the LoadImage node and drop an image onto it
|
|
||||||
const nodes = await comfyPage.getNodeRefsByType('LoadImage')
|
const nodes = await comfyPage.getNodeRefsByType('LoadImage')
|
||||||
const loadImageNode = nodes[0]
|
const loadImageNode = nodes[0]
|
||||||
const { x, y } = await loadImageNode.getPosition()
|
const fileComboWidget = await loadImageNode.getWidget(0)
|
||||||
|
await fileComboWidget.click()
|
||||||
|
await comfyPage.page
|
||||||
|
.getByRole('menuitem', { name: 'image32x32.webp' })
|
||||||
|
.click({ noWaitAfter: true })
|
||||||
|
|
||||||
await comfyPage.dragAndDropFile('image32x32.webp', {
|
|
||||||
dropPosition: { x: x + 100, y: y + 100 },
|
|
||||||
waitForUpload: true
|
|
||||||
})
|
|
||||||
|
|
||||||
// Wait for image preview to appear
|
|
||||||
const imagePreview = comfyPage.page.locator('.image-preview img')
|
const imagePreview = comfyPage.page.locator('.image-preview img')
|
||||||
await expect(imagePreview).toBeVisible()
|
await expect(imagePreview).toBeVisible()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user