mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-24 22:58:08 +00:00
Address review feedback: move saveCloseAndReopenInBuilder to builderTestUtils, reuse it in builderReorder.spec.ts, and add unit tests for enterBuilder/exitBuilder pruning, removeSelectedInput, updateInputConfig merge, loadSelections edge cases, and pruneLinearData branches. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
45 lines
1.2 KiB
TypeScript
45 lines
1.2 KiB
TypeScript
import {
|
|
comfyPageFixture as test,
|
|
comfyExpect as expect
|
|
} from '@e2e/fixtures/ComfyPage'
|
|
import {
|
|
saveCloseAndReopenInBuilder,
|
|
setupBuilder
|
|
} from '@e2e/helpers/builderTestUtils'
|
|
|
|
const WIDGETS = ['seed', 'steps', 'cfg']
|
|
|
|
test.describe(
|
|
'App builder input persistence after reload',
|
|
{ tag: '@ui' },
|
|
() => {
|
|
test.beforeEach(async ({ comfyPage }) => {
|
|
await comfyPage.appMode.enableLinearMode()
|
|
await comfyPage.settings.setSetting(
|
|
'Comfy.AppBuilder.VueNodeSwitchDismissed',
|
|
true
|
|
)
|
|
})
|
|
|
|
test('persists selected inputs after save and reopen without visibility errors', async ({
|
|
comfyPage
|
|
}) => {
|
|
const { appMode } = comfyPage
|
|
await setupBuilder(comfyPage, undefined, WIDGETS)
|
|
|
|
await appMode.steps.goToInputs()
|
|
await expect(appMode.select.inputItemTitles).toHaveText(WIDGETS)
|
|
|
|
const workflowName = `${Date.now()} input-persistence`
|
|
await saveCloseAndReopenInBuilder(comfyPage, appMode, workflowName)
|
|
|
|
await expect(appMode.select.inputItemTitles).toHaveText(WIDGETS)
|
|
for (const widget of WIDGETS) {
|
|
await expect(
|
|
appMode.select.getInputItemSubtitle(widget)
|
|
).not.toContainText('Widget not visible')
|
|
}
|
|
})
|
|
}
|
|
)
|