mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
- confirmDialogTextWrap: use comfyPage.confirmDialog.root - resultGallery: add MediaLightbox page object to ComfyPage - templates: add dialog accessor to ComfyTemplates helper - appModeDropdownClipping: add imagePickerPopover to AppModeHelper - ComfyNodeSearchBox: extract root locator on filter selection panel Fixes #10723
33 lines
1.0 KiB
TypeScript
33 lines
1.0 KiB
TypeScript
import { expect } from '@playwright/test'
|
|
|
|
import { comfyPageFixture as test } from '../fixtures/ComfyPage'
|
|
|
|
test.describe('Confirm dialog text wrapping', { tag: ['@mobile'] }, () => {
|
|
test('@mobile confirm dialog buttons are visible with long unbreakable text', async ({
|
|
comfyPage
|
|
}) => {
|
|
const longFilename = 'workflow_checkpoint_' + 'a'.repeat(200) + '.json'
|
|
|
|
await comfyPage.page.evaluate((msg) => {
|
|
window
|
|
.app!.extensionManager.dialog.confirm({
|
|
title: 'Confirm',
|
|
type: 'default',
|
|
message: msg
|
|
})
|
|
.catch(() => {})
|
|
}, longFilename)
|
|
|
|
const dialog = comfyPage.confirmDialog.root
|
|
await expect(dialog).toBeVisible()
|
|
|
|
const confirmButton = dialog.getByRole('button', { name: 'Confirm' })
|
|
await expect(confirmButton).toBeVisible()
|
|
await expect(confirmButton).toBeInViewport()
|
|
|
|
const cancelButton = dialog.getByRole('button', { name: 'Cancel' })
|
|
await expect(cancelButton).toBeVisible()
|
|
await expect(cancelButton).toBeInViewport()
|
|
})
|
|
})
|