Files
ComfyUI_frontend/browser_tests/tests/confirmDialogTextWrap.spec.ts
bymyself 1cc6f8c1ce refactor: replace inline getByRole('dialog') with page objects in E2E tests
- 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
2026-03-29 16:25:59 -07:00

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()
})
})