fix: move menu settings after execution to avoid interference

This commit is contained in:
bymyself
2026-03-07 22:51:48 -08:00
parent 201ad6e63a
commit edc5c5995e

View File

@@ -3,14 +3,6 @@ import { expect } from '@playwright/test'
import { comfyPageFixture as test } from '../../../../fixtures/ComfyPage'
test.describe('Node Output Preservation', { tag: ['@widget', '@node'] }, () => {
test.beforeEach(async ({ comfyPage }) => {
await comfyPage.settings.setSetting('Comfy.UseNewMenu', 'Top')
await comfyPage.settings.setSetting(
'Comfy.Workflow.WorkflowTabsPosition',
'Topbar'
)
})
test('Execution output widget value survives tab switch', async ({
comfyPage
}) => {
@@ -25,6 +17,13 @@ test.describe('Node Output Preservation', { tag: ['@widget', '@node'] }, () => {
expect(await (await outputNode.getWidget(0)).getValue()).toBe('foo')
}).toPass({ timeout: 5_000 })
// Enable topbar tabs after execution so we can switch workflows
await comfyPage.settings.setSetting('Comfy.UseNewMenu', 'Top')
await comfyPage.settings.setSetting(
'Comfy.Workflow.WorkflowTabsPosition',
'Topbar'
)
await comfyPage.menu.topbar.triggerTopbarCommand(['New'])
await comfyPage.nextFrame()
@@ -47,6 +46,13 @@ test.describe('Node Output Preservation', { tag: ['@widget', '@node'] }, () => {
expect(await (await outputNode1.getWidget(0)).getValue()).toBe('foo')
}).toPass({ timeout: 5_000 })
// Enable topbar tabs after execution so we can switch workflows
await comfyPage.settings.setSetting('Comfy.UseNewMenu', 'Top')
await comfyPage.settings.setSetting(
'Comfy.Workflow.WorkflowTabsPosition',
'Topbar'
)
await comfyPage.menu.topbar.triggerTopbarCommand(['New'])
await comfyPage.nextFrame()