fix: use combo widget instead of drag-drop in mask editor test

This commit is contained in:
bymyself
2025-12-12 20:20:49 -08:00
parent aa47ed33c4
commit 7049946721

View File

@@ -15,17 +15,14 @@ test.describe('Vue Nodes Mask Editor', () => {
await comfyPage.loadWorkflow('widgets/load_image_widget')
await comfyPage.vueNodes.waitForNodes()
// Get the LoadImage node and drop an image onto it
const nodes = await comfyPage.getNodeRefsByType('LoadImage')
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')
await expect(imagePreview).toBeVisible()