From d7243e8522a82f7a62924c1115ccd35dd6150446 Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Fri, 11 Sep 2026 22:03:37 -0700 Subject: [PATCH 1/2] test(widgets): multiline text keeps paragraph breaks across a round-trip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ECS 1.53 plan asks for multiple paragraphs in a multiline widget to survive save and reload without flattening. This spec file covers entering multiline content and retaining it across focus changes, but nothing here crosses serialization. The fixture value includes a blank line between paragraphs and a trailing space — the two things a normalising or trimming serializer eats silently. Compared with exact equality rather than a substring, since a value flattened to one line still contains every word. Uses the getExportedWorkflow + loadGraphData round-trip that comboWidget.spec.ts and floatWidget.spec.ts already use for this question. --- .../text/multilineStringWidget.spec.ts | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/browser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.ts b/browser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.ts index 61b9c9131e9..90f3deb3dfb 100644 --- a/browser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.ts +++ b/browser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.ts @@ -32,6 +32,34 @@ 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) + + // A blank line between paragraphs, plus trailing whitespace on one line. + // Both are what a serializer that normalises or trims would silently eat, + // and neither is visible in a value that has merely been flattened to one + // line, so the round-tripped value is compared exactly, not by substring. + 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) From 30551d75abd86afa14cda455642687f5ffeffade Mon Sep 17 00:00:00 2001 From: Alexander Brown Date: Fri, 11 Sep 2026 22:58:41 -0700 Subject: [PATCH 2/2] Apply suggestion from @DrJKL --- .../tests/vueNodes/widgets/text/multilineStringWidget.spec.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/browser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.ts b/browser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.ts index 90f3deb3dfb..1379b2b2809 100644 --- a/browser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.ts +++ b/browser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.ts @@ -37,10 +37,6 @@ test.describe('Vue Multiline String Widget', { tag: '@vue-nodes' }, () => { }) => { const textarea = getFirstMultilineStringWidget(comfyPage) - // A blank line between paragraphs, plus trailing whitespace on one line. - // Both are what a serializer that normalises or trims would silently eat, - // and neither is visible in a value that has merely been flattened to one - // line, so the round-tripped value is compared exactly, not by substring. const paragraphs = [ 'First paragraph, ending in a space ', '',