fix: use setupSettings + setup() for clean page state

This commit is contained in:
bymyself
2026-03-07 23:20:05 -08:00
parent 2130bbf1c6
commit f82e9c505b

View File

@@ -4,8 +4,12 @@ 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', 'Disabled')
await comfyPage.settings.setSetting('Comfy.VueNodes.Enabled', false)
await comfyPage.setupSettings({
'Comfy.UseNewMenu': 'Top',
'Comfy.Workflow.WorkflowTabsPosition': 'Topbar',
'Comfy.VueNodes.Enabled': false
})
await comfyPage.setup()
})
test('Execution output widget value survives tab switch', async ({
@@ -22,13 +26,6 @@ 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()
@@ -51,13 +48,6 @@ 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()