diff --git a/browser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.ts b/browser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.ts index 61b9c9131e9..1379b2b2809 100644 --- a/browser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.ts +++ b/browser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.ts @@ -32,6 +32,30 @@ test.describe('Vue Multiline String Widget', { tag: '@vue-nodes' }, () => { await expect(textarea).toHaveValue(multilineValue) }) + test('keeps paragraph breaks across a serialize and reload round-trip', async ({ + comfyPage + }) => { + const textarea = getFirstMultilineStringWidget(comfyPage) + + const paragraphs = [ + 'First paragraph, ending in a space ', + '', + 'Second paragraph', + 'still the second paragraph' + ].join('\n') + + await textarea.fill(paragraphs) + await expect(textarea).toHaveValue(paragraphs) + + const serialized = await comfyPage.workflow.getExportedWorkflow() + await comfyPage.workflow.loadGraphData(serialized) + await comfyPage.vueNodes.waitForNodes() + + await expect(getFirstMultilineStringWidget(comfyPage)).toHaveValue( + paragraphs + ) + }) + test('should retain value after focus changes', async ({ comfyPage }) => { const textarea = getFirstMultilineStringWidget(comfyPage)