Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
aeb1048
refactor: replace PrimeVue Dialog and remaining simple components
ampagent Sep 25, 2026
cbde988
test: observe migrated text-preview skeleton directly
ampagent Oct 5, 2026
12c0db0
fix: forward InputKnob disabled state to KnobControl
DrJKL Oct 5, 2026
745e96d
test: stack node search over a real directive-registered dialog
DrJKL Oct 5, 2026
0f512dc
fix: settle confirm dialogs once and prove their focus and dismissal
DrJKL Oct 5, 2026
4d6ab08
refactor: drop the dialog renderer option and close dialog props
DrJKL Oct 5, 2026
dc331ed
refactor: drop PrimeVue overlay selectors from dialog dismissal guards
DrJKL Oct 5, 2026
289fceb
refactor: rename leftover primeVueOverlay locals
DrJKL Oct 5, 2026
ea79808
test: map knob pointer presses across the 270 degree arc
DrJKL Oct 5, 2026
5384f9a
fix: keep node search boxes at their intended size and inside the vie…
DrJKL Oct 5, 2026
bee1ca2
test: cover nested confirm dialog focus trap and dismissal in e2e
DrJKL Oct 5, 2026
154d4db
fix: let the canvas toolbar keep the shared floating panel radius
DrJKL Oct 5, 2026
1345140
fix: mark design-system skeletons with data-slot
DrJKL Oct 5, 2026
626d09a
refactor: sort keys in touched dialog, knob, and skeleton types
DrJKL Oct 7, 2026
b0cc837
refactor: derive Escape dismissal from the active dialog
DrJKL Oct 9, 2026
e6cbf32
refactor: name outside-pointer dismissal after the Reka event
DrJKL Oct 9, 2026
5f1a7ee
refactor: drop the dialog-child z-index helper the selects already cover
DrJKL Oct 9, 2026
0550c52
refactor: size skeletons with classes instead of PrimeVue props
DrJKL Oct 9, 2026
512c8e8
refactor: move the knob into the design system as ui/knob
DrJKL Oct 9, 2026
e12dde9
test: prove dialog maximize by behavior instead of Tailwind classes
DrJKL Oct 9, 2026
26b4241
refactor: open Settings, Manager and legacy pricing as modal dialogs
DrJKL Oct 9, 2026
c2a81df
fix: let searchable select take focus inside modal dialogs
DrJKL Oct 9, 2026
9ac5fc5
fix: default design-system dialogs to modal
DrJKL Oct 9, 2026
27b825e
refactor: make GlobalDialog always modal
DrJKL Oct 9, 2026
ab46036
docs: drop PrimeVue history from dialog comments
DrJKL Oct 9, 2026
c5ae0df
refactor: open the folder customization dialog as modal and drop the …
DrJKL Oct 9, 2026
694f22d
fix: color the subscription dialog's cloud badge with the dialog surf…
DrJKL Oct 9, 2026
1fee0c3
fix: keep toasts above dialogs and clear of the dialog header
DrJKL Oct 9, 2026
982e689
refactor: replace caller dialog classes with design-system sizes
DrJKL Oct 10, 2026
bf9204d
fix: keep node search keyboard focus inside its modal dialog
DrJKL Oct 10, 2026
ccba411
fix: close keybinding confirmations when saving fails
DrJKL Oct 10, 2026
d2d0da3
fix: let clicks pass through a closing dialog overlay
DrJKL Oct 10, 2026
59fa4c0
[automated] Update test expectations
invalid-email-address Oct 10, 2026
8c61365
fix: let the top dialog take Escape and outside pointers
DrJKL Oct 10, 2026
2da3c44
fix: clear node search filters on every close
DrJKL Oct 10, 2026
424b0a2
fix: keep node search open when a toast is clicked
DrJKL Oct 10, 2026
1952b0d
fix: split the knob's dead zone at its midpoint
DrJKL Oct 10, 2026
987cb90
fix: follow only drags that start on the knob
DrJKL Oct 10, 2026
b85c4d6
fix: keep Reka's open focus when the autofocus target cannot take it
DrJKL Oct 10, 2026
2fd6b47
fix: name the node search dialog for assistive tech
DrJKL Oct 10, 2026
413f664
fix: close the legacy node search on one Escape
DrJKL Oct 11, 2026
103be21
test: blur the auto-focused step before publish layout screenshots
DrJKL Oct 11, 2026
300c7bd
fix: restore Home, End, PageUp and PageDown on the knob
DrJKL Oct 11, 2026
d82df35
refactor: type the knob's class prop like other ui components
DrJKL Oct 11, 2026
f4f8306
refactor: drop the unused alignment class from the node search overlay
DrJKL Oct 11, 2026
7c157b2
[automated] Update test expectations
invalid-email-address Oct 11, 2026
ea6e654
test: start each publish dialog test from an empty workflows folder
DrJKL Oct 11, 2026
d490d2c
fix: let native modal dialogs take clicks over an open dialog
DrJKL Oct 12, 2026
e54ca19
fix: keep knob inputs numeric when the step is 0
DrJKL Oct 12, 2026
f050843
Merge remote-tracking branch 'origin/main' into primevue-removal/phas…
DrJKL Oct 12, 2026
5766895
fix: open the SSO outside-organization dialog as a headless dialog
DrJKL Oct 12, 2026
61bf236
Merge remote-tracking branch 'origin/main' into primevue-removal/phas…
DrJKL Oct 12, 2026
c5c3330
Merge branch 'main' into primevue-removal/phase-6-dialog
DrJKL Oct 13, 2026
9af02bf
fix: keep toasts below a maximized dialog's header
DrJKL Oct 13, 2026
c0fb15d
test: keep a toast raised before a dialog above it
DrJKL Oct 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions browser_tests/fixtures/components/ComfyNodeSearchBox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import { expect } from '@playwright/test'
import type { Locator, Page } from '@playwright/test'

class ComfyNodeSearchFilterSelectionPanel {
readonly root: Locator
readonly header: Locator
readonly root: Locator

constructor(public readonly page: Page) {
this.root = page.getByRole('dialog')
this.header = this.root
.locator('div')
.filter({ hasText: 'Add node filter condition' })
this.root = page.getByRole('dialog', { name: 'Add node filter condition' })
this.header = this.root.getByRole('heading', {
name: 'Add node filter condition'
})
}

async selectFilterType(filterType: string) {
Expand Down
8 changes: 6 additions & 2 deletions browser_tests/fixtures/helpers/MaskEditorHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ const RGB_CANVAS_INDEX = 1
type BrushSliderLabel = 'thickness'

class MaskEditorHelper {
public readonly dialog: Locator
public readonly previewImage: Locator

constructor(private comfyPage: ComfyPage) {
this.dialog = comfyPage.page.locator(
'[data-dialog-key="global-mask-editor"]'
)
this.previewImage = comfyPage.page.locator('.image-preview img').first()
}

Expand Down Expand Up @@ -46,7 +50,7 @@ class MaskEditorHelper {
await imagePreview.getByRole('region').hover()
await this.page.getByLabel('Edit or mask image').click()

const dialog = this.page.locator('.mask-editor-dialog')
const dialog = this.dialog
await expect(dialog).toBeVisible()
await expect(
dialog.getByRole('heading', { name: 'Mask Editor' })
Expand All @@ -65,7 +69,7 @@ class MaskEditorHelper {
await imagePreview.getByRole('region').hover()
await this.page.getByLabel('Edit or mask image').click()

const dialog = this.page.locator('.mask-editor-dialog')
const dialog = this.dialog
await expect(dialog).toBeVisible()
await expect(dialog.getByTestId('pointer-zone')).toBeVisible()

Expand Down
2 changes: 1 addition & 1 deletion browser_tests/tests/dialogs/billingSessionSdkRail.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ async function recordTotalCreditStates(page: Page) {
}
const tile = label?.parentElement
if (!tile) return
const state = tile.querySelector('[data-pc-name="skeleton"]')
const state = tile.querySelector('[data-slot="skeleton"]')
? 'loading'
: tile.textContent
.replace('Total credits', '')
Expand Down
17 changes: 5 additions & 12 deletions browser_tests/tests/dialogs/publishDialog.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,8 @@ async function saveAndOpenPublishDialog(
dialog: PublishDialog,
workflowName: string
): Promise<void> {
await comfyPage.workflow.setupWorkflowsDirectory({})
await comfyPage.menu.topbar.saveWorkflow(workflowName)
const overwriteDialog = comfyPage.page
.getByRole('dialog')
.filter({ hasText: 'Overwrite' })
// Bounded wait: point-in-time isVisible() can miss dialogs that open
// slightly after saveWorkflow() resolves.
try {
await overwriteDialog.waitFor({ state: 'visible', timeout: 500 })
await comfyPage.confirmDialog.click('overwrite')
} catch {
// No overwrite dialog — workflow name was unique.
}

await dialog.open()
}

Expand Down Expand Up @@ -398,6 +387,10 @@ test.describe('Publish dialog - layout', () => {
await comfyPage.page.setViewportSize({ width, height: VIEWPORT_HEIGHT })
await expect(publishDialog.describeStep).toBeVisible()
await expect(publishDialog.nameInput).toHaveValue(/test-layout-wf/)
await comfyPage.page.evaluate(() => {
if (document.activeElement instanceof HTMLElement)
document.activeElement.blur()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: This blur workaround isn't deterministic, and the golden it was re-baselined against is red in CI at this head.

playwright-video-new-tests (chromium, 1, 3) → failure (head 92499849)
  Error: expect(page).toHaveScreenshot(expected) failed
  - 82 pixels (ratio 0.01 of all image pixels) are different.
  at browser_tests/tests/dialogs/publishDialog.spec.ts:410:38
  Expected: publishDialog.spec.ts-snapshots/publish-dialog-lg-chromium-linux.png
  1 failed, 41 passed

The causal chain is clear enough from the diff: DialogContent now focuses an [autofocus] descendant on open the way the native <dialog> does, so the publish dialog paints a focus ring where it previously painted none, which perturbed all seven layout goldens. This blur() is the compensation, and the seven PNGs were recaptured with it in place.

82 pixels at ratio 0.01 is about the size of a focus ring or a caret — so the compensation is landing most of the time but not reliably. Two things could produce that, and they want different fixes: Reka's focus scope restoring focus after this blur() resolves (a race, fixable by waiting on the real readiness boundary instead of blurring once), or the baseline having been captured somewhere other than the CI container, which is precisely the drift the owner-triggered refresh label exists to prevent.

Worth distinguishing before re-baselining again — recapturing through the label would fix the symptom either way, but if it's the race, the other six publish-dialog-* goldens and the two mask-editor-dialog-* ones are sitting on the same coin flip and will start flaking later instead of now.

Separately, blurring the focused element right before the capture means these screenshots no longer witness the focus behaviour this PR introduces. Given DialogContent autofocus is one of the riskier changes here — and focusAutofocusTarget already has an open thread about disabled/hidden targets — it'd be worth one assertion somewhere that the intended element is focused on open, rather than only evidence that nothing is focused at capture time.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not changed: the blur is deterministic, and the red lg golden predates it. Four facts from this head's CI and history:

  • The golden wasn't recaptured with the blur in place. All seven publish-dialog-* PNGs come from the label run in 3db38ca (2026-10-10 19:36 UTC). The blur landed later, in 5e46a64 (2026-10-11 01:56 UTC). That label run used --grep @screenshot, so lg was the first layout test in its worker and saved through the keyboard prompt. The ring in that golden is a keyboard-modality focus ring on step 1.
  • The failure isn't a coin flip. Both red jobs at 9249984 (playwright-tests-chromium-sharded (3, 16) and playwright-video-new-tests (chromium, 1, 3)) fail only lg, with exactly 82 pixels different on every attempt. That is the same count as the run before the blur, when the actual image also had no ring. In the video job the other six breakpoints pass: xl, 2xl and wide have step 1 focused and blurred exactly as lg does, and match goldens captured without the ring. If Reka's focus scope restored focus after the blur, those three would fail too. Locally, after a keyboard save, :focus-visible matched step 1 before the blur and nothing after it.
  • No new [autofocus] is involved. The publish dialog has no [autofocus] descendant. Step 1 is focused by Reka's default open focus (first tabbable), which main already used through its own onRekaOpenAutoFocus. Main's golden had no ring only because its run reached lg through the mouse-click Overwrite path.
  • Open focus has its own assertions. confirmDialog.test.ts asserts that Cancel (autofocus) is focused on open and that a disabled autofocus target falls back to the dialog's Close button. GlobalDialog.test.ts asserts the Filename field is focused on open. The layout screenshots stay focus-neutral so they test layout only.

The fix for lg is one more owner-triggered "New Browser Test Expectations" run. With the blur in place, that run no longer depends on test order.

})
await comfyPage.toast.closeToasts()
await comfyPage.canvas.evaluate((el) => {
el.style.visibility = 'hidden'
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions browser_tests/tests/extensionAPI.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,28 @@ test.describe('Topbar commands', () => {
.toBe(true)
})

test('Should let a native modal dialog opened over Settings take clicks', async ({
comfyPage
}) => {
await comfyPage.settingDialog.open()
await comfyPage.page.evaluate(() => {
const dialog = document.createElement('dialog')
const option = document.createElement('input')
option.type = 'checkbox'
option.setAttribute('aria-label', 'Extension option')
dialog.append(option)
document.body.append(dialog)
dialog.showModal()
})
const option = comfyPage.page.getByRole('checkbox', {
name: 'Extension option'
})

await option.click()

await expect(option).toBeChecked()
})

test('Should allow dismissing a dialog', async ({ comfyPage }) => {
await comfyPage.page.evaluate(() => {
;(window as unknown as Record<string, unknown>)['value'] = 'foo'
Expand Down
37 changes: 37 additions & 0 deletions browser_tests/tests/keybindingPanel.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,43 @@ test.describe('Keybinding Panel', { tag: '@keyboard' }, () => {

await expect(confirmDialog).toBeHidden()
})

test('Reset All confirmation traps focus and dismisses alone over Settings', async ({
comfyPage
}) => {
const panel = comfyPage.settingDialog.keybindingPanel
const confirmDialog = panel.resetAllDialog
const cancel = confirmDialog.getByRole('button', { name: /Cancel/i })
const confirm = confirmDialog.getByRole('button', { name: /Reset All/i })
const close = confirmDialog.getByRole('button', { name: 'Close' })

await test.step('Tab cycles inside the confirmation', async () => {
await panel.resetAllButton.click()
await expect(cancel).toBeFocused()
await panel.page.keyboard.press('Tab')
await expect(confirm).toBeFocused()
await panel.page.keyboard.press('Tab')
await expect(close).toBeFocused()
await panel.page.keyboard.press('Shift+Tab')
await expect(confirm).toBeFocused()
})

await test.step('Escape closes only the confirmation', async () => {
await panel.page.keyboard.press('Escape')
await expect(confirmDialog).toBeHidden()
await expect(comfyPage.settingDialog.root).toBeVisible()
await expect(panel.resetAllButton).toBeFocused()
})

await test.step('An outside click closes only the confirmation', async () => {
await panel.resetAllButton.click()
await expect(confirmDialog).toBeVisible()
await panel.page.mouse.click(5, 5)
await expect(confirmDialog).toBeHidden()
await expect(comfyPage.settingDialog.root).toBeVisible()
await expect(comfyPage.toast.visibleToasts).toHaveCount(0)
})
})
})

test.describe('Search Filter', () => {
Expand Down
26 changes: 22 additions & 4 deletions browser_tests/tests/maskEditor.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ test.describe('Mask Editor', { tag: '@vue-nodes' }, () => {
await imagePreview.getByRole('region').hover()
await comfyPage.page.getByLabel('Edit or mask image').click()

const dialog = comfyPage.page.locator('.mask-editor-dialog')
const dialog = maskEditor.dialog
await expect(dialog).toBeVisible()

await expect(
Expand Down Expand Up @@ -160,7 +160,7 @@ test.describe('Mask Editor', { tag: '@vue-nodes' }, () => {

await contextMenu.getByText('Open in Mask Editor').click()

const dialog = comfyPage.page.locator('.mask-editor-dialog')
const dialog = maskEditor.dialog
await expect(dialog).toBeVisible()
await expect(
dialog.getByRole('heading', { name: 'Mask Editor' })
Expand Down Expand Up @@ -264,6 +264,24 @@ test.describe('Mask Editor', { tag: '@vue-nodes' }, () => {
await expect(dialog).toBeHidden()
})

test('maximize fills the viewport and restore returns to the framed size', async ({
comfyPage,
maskEditor
}) => {
const dialog = await maskEditor.openDialog()
const viewportWidth = await comfyPage.page.evaluate(() => window.innerWidth)
const width = async () => (await dialog.boundingBox())?.width ?? 0

const framedWidth = viewportWidth * 0.9
await expect.poll(width).toBeCloseTo(framedWidth, 0)

await dialog.getByRole('button', { name: 'Maximize dialog' }).click()
await expect.poll(width).toBeGreaterThan(viewportWidth - 24)

await dialog.getByRole('button', { name: 'Restore dialog' }).click()
await expect.poll(width).toBeCloseTo(framedWidth, 0)
})

test('invert button inverts the mask', async ({ maskEditor }) => {
const dialog = await maskEditor.openDialog()

Expand Down Expand Up @@ -460,7 +478,7 @@ test.describe('Mask Editor', { tag: '@vue-nodes' }, () => {
wstest(
'Will not use stale litegraph previews',
{ tag: '@vue-nodes' },
async ({ comfyPage, getWebSocket }) => {
async ({ comfyPage, getWebSocket, maskEditor }) => {
const executionHelper = new ExecutionHelper(comfyPage, await getWebSocket())
await comfyPage.menu.topbar.setVueNodesEnabled(false)
await comfyPage.menu.topbar.newWorkflowButton.click()
Expand Down Expand Up @@ -492,6 +510,6 @@ wstest(
// On previous versions, attempting to open the mask editor here would
// incorrectly reference the non-existant test1.png
// This causes the mask editor to throw in setup and not display
await expect(comfyPage.page.locator('.mask-editor-dialog')).toBeVisible()
await expect(maskEditor.dialog).toBeVisible()
}
)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 26 additions & 2 deletions browser_tests/tests/nodeSearchBox.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,18 @@ test.describe('Node search box', { tag: '@node' }, () => {
.toHaveLength(initialSamplers.length + 1)
})

test('One Escape closes the search while results are listed', async ({
comfyPage
}) => {
await comfyPage.command.executeCommand('Workspace.SearchBox.Toggle')
await comfyPage.searchBox.typeQuery('KSampler')
await expect(comfyPage.searchBox.resultsListbox).toBeVisible()

await comfyPage.page.keyboard.press('Escape')

await expect(comfyPage.searchBox.input).toBeHidden()
})

test('Can auto link node', { tag: '@screenshot' }, async ({ comfyPage }) => {
const initialNodeCount = await comfyPage.nodeOps.getGraphNodesCount()
await comfyPage.canvasOps.disconnectEdge()
Expand Down Expand Up @@ -243,8 +255,7 @@ test.describe('Node search box', { tag: '@node' }, () => {
const panel = comfyPage.searchBox.filterSelectionPanel
await panel.header.waitFor({ state: 'visible' })
await comfyPage.page
.locator('.p-dialog-mask')
.filter({ has: panel.header })
.getByTestId('node-search-filter-overlay')
.click({ position: { x: 10, y: 10 } })

// Verify the filter selection panel is hidden
Expand All @@ -264,6 +275,19 @@ test.describe('Node search box', { tag: '@node' }, () => {
).toBeFocused()
})

test('ignores Escape during IME composition', async ({ comfyPage }) => {
const panel = comfyPage.searchBox.filterSelectionPanel
await panel.root.dispatchEvent('keydown', {
key: 'Escape',
isComposing: true
})
await expect(panel.header).toBeVisible()
await expect(comfyPage.searchBox.input).toBeVisible()
await comfyPage.page.keyboard.press('Escape')
await expect(panel.header).toBeHidden()
await expect(comfyPage.searchBox.input).toBeFocused()
})

test('keeps search open when the filter has keyboard focus', async ({
comfyPage
}) => {
Expand Down
8 changes: 8 additions & 0 deletions browser_tests/tests/nodeSearchBoxV2.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ test.describe('Node search box V2', { tag: '@node' }, () => {
.toBe(initialCount + 1)
})

test('Opens fully inside the viewport', async ({ comfyPage }) => {
const { searchBoxV2 } = comfyPage

await searchBoxV2.open()

await expect(searchBoxV2.dialog).toBeInViewport({ ratio: 1 })
})

test('Can add first default result with Enter', async ({ comfyPage }) => {
const { searchBoxV2 } = comfyPage
const initialCount = await comfyPage.nodeOps.getGraphNodesCount()
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 66 additions & 0 deletions browser_tests/tests/toastNotifications.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@ import {
comfyExpect as expect
} from '@e2e/fixtures/ComfyPage'
import type { ComfyPage } from '@e2e/fixtures/ComfyPage'
import type { Locator } from '@playwright/test'

type Box = NonNullable<Awaited<ReturnType<Locator['boundingBox']>>>

function overlaps(a: Box, b: Box): boolean {
return (
a.x < b.x + b.width &&
b.x < a.x + a.width &&
a.y < b.y + b.height &&
b.y < a.y + a.height
)
}

test.describe('Toast Notifications', { tag: '@ui' }, () => {
async function triggerErrorToast(comfyPage: ComfyPage) {
Expand Down Expand Up @@ -67,6 +79,60 @@ test.describe('Toast Notifications', { tag: '@ui' }, () => {
)
})

test('A toast raised before a dialog opens stays above it', async ({
comfyPage
}) => {
await triggerErrorToast(comfyPage)
await comfyPage.settingDialog.open()
const errorToast = comfyPage.toast.withText('Test execution error')

await comfyPage.toast.dismiss(errorToast)

await expect(comfyPage.toast.visibleToasts).toHaveCount(0)
await expect(comfyPage.settingDialog.root).toBeVisible()
})

for (const { dialog, open, closeButton } of [
{
dialog: 'Settings',
open: (comfyPage: ComfyPage) => comfyPage.settingDialog.open(),
closeButton: (comfyPage: ComfyPage) =>
comfyPage.settingDialog.root.getByRole('button', { name: 'Close' })
},
{
dialog: 'a maximized dialog',
open: (comfyPage: ComfyPage) =>
comfyPage.page.evaluate(() => {
window.app!.extensionManager.dialog.showExtensionDialog({
key: 'maximized-toast-test',
title: 'Maximized',
component: { render: () => null },
dialogComponentProps: { maximizable: true, maximized: true }
})
}),
closeButton: (comfyPage: ComfyPage) =>
comfyPage.page
.getByRole('dialog', { name: 'Maximized' })
.getByRole('button', { name: 'Close' })
}
]) {
test(`Toasts stay clear of the close button of ${dialog}`, async ({
comfyPage
}) => {
await open(comfyPage)
await triggerErrorToast(comfyPage)
const errorToast = comfyPage.toast.withText('Test execution error')
await expect(errorToast).toBeVisible()

const toastBounds = await errorToast.boundingBox()
const closeBounds = await closeButton(comfyPage).boundingBox()

expect(toastBounds).not.toBeNull()
expect(closeBounds).not.toBeNull()
expect(overlaps(toastBounds!, closeBounds!)).toBe(false)
})
}

test('Toast can be dismissed via close button', async ({ comfyPage }) => {
await triggerErrorToast(comfyPage)
const errorToast = comfyPage.toast.toastErrors.filter({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ test.describe('Vue Nodes Image Preview', { tag: '@vue-nodes' }, () => {
await imagePreview.getByRole('region').hover()
await comfyPage.page.getByLabel('Edit or mask image').click()

await expect(comfyPage.page.locator('.mask-editor-dialog')).toBeVisible()
await expect(
comfyPage.page.getByRole('heading', { name: 'Mask Editor' })
).toBeVisible()
})

test('hides mask and download buttons when image is missing', async ({
Expand Down
4 changes: 2 additions & 2 deletions browser_tests/tests/vueNodes/widgets/emptyNameWidget.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ test.describe(
x: 400,
y: 200
})
await comfyPage.page.evaluate(() =>
await comfyPage.page.evaluate(() => {
graph!.nodes[0].addWidget('text', '', '', () => {})
)
})
})

test('renders schema widgets despite an un-keyable sibling', async ({
Expand Down
Loading
Loading