mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-20 06:44:32 +00:00
Mark the two browser tests added in #8143 as `test.fixme` — they are failing on main. - `opens mask editor from image preview button` - `shows image context menu options` - Fixes #8143 (browser test failures) --------- Co-authored-by: GitHub Action <action@github.com>
58 lines
2.0 KiB
TypeScript
58 lines
2.0 KiB
TypeScript
import { expect } from '@playwright/test'
|
|
|
|
import { comfyPageFixture as test } from '../../../../fixtures/ComfyPage'
|
|
|
|
test.describe('Vue Nodes Image Preview', () => {
|
|
test.beforeEach(async ({ comfyPage }) => {
|
|
await comfyPage.setSetting('Comfy.VueNodes.Enabled', true)
|
|
await comfyPage.loadWorkflow('widgets/load_image_widget')
|
|
await comfyPage.vueNodes.waitForNodes()
|
|
})
|
|
|
|
async function loadImageOnNode(
|
|
comfyPage: Awaited<
|
|
ReturnType<(typeof test)['info']>
|
|
>['fixtures']['comfyPage']
|
|
) {
|
|
const loadImageNode = (await comfyPage.getNodeRefsByType('LoadImage'))[0]
|
|
const { x, y } = await loadImageNode.getPosition()
|
|
|
|
await comfyPage.dragAndDropFile('image64x64.webp', {
|
|
dropPosition: { x, y }
|
|
})
|
|
|
|
const imagePreview = comfyPage.page.locator('.image-preview')
|
|
await expect(imagePreview).toBeVisible()
|
|
await expect(imagePreview.locator('img')).toBeVisible()
|
|
await expect(imagePreview).toContainText('x')
|
|
|
|
return imagePreview
|
|
}
|
|
|
|
test.fixme('opens mask editor from image preview button', async ({
|
|
comfyPage
|
|
}) => {
|
|
const imagePreview = await loadImageOnNode(comfyPage)
|
|
|
|
await imagePreview.locator('[role="img"]').hover()
|
|
await comfyPage.page.getByLabel('Edit or mask image').click()
|
|
|
|
await expect(comfyPage.page.locator('.mask-editor-dialog')).toBeVisible()
|
|
})
|
|
|
|
test.fixme('shows image context menu options', async ({ comfyPage }) => {
|
|
await loadImageOnNode(comfyPage)
|
|
|
|
const nodeHeader = comfyPage.vueNodes.getNodeByTitle('Load Image')
|
|
await nodeHeader.click()
|
|
await nodeHeader.click({ button: 'right' })
|
|
|
|
const contextMenu = comfyPage.page.locator('.p-contextmenu')
|
|
await expect(contextMenu).toBeVisible()
|
|
await expect(contextMenu.getByText('Open Image')).toBeVisible()
|
|
await expect(contextMenu.getByText('Copy Image')).toBeVisible()
|
|
await expect(contextMenu.getByText('Save Image')).toBeVisible()
|
|
await expect(contextMenu.getByText('Open in Mask Editor')).toBeVisible()
|
|
})
|
|
})
|