From fc6fe8bf46bf9e76ef9beac205930e3b5fb67c74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kr=C3=A6n=20Hansen?= Date: Fri, 4 Oct 2024 17:11:04 +0200 Subject: [PATCH] Add failing test --- packages/e2e-tests/test/e2e.spec.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/packages/e2e-tests/test/e2e.spec.ts b/packages/e2e-tests/test/e2e.spec.ts index dc58693b9..ecd26f0cb 100644 --- a/packages/e2e-tests/test/e2e.spec.ts +++ b/packages/e2e-tests/test/e2e.spec.ts @@ -571,6 +571,30 @@ describe('e2e', function () { shell.assertNoErrors(); }); + it('prints only multiline dots between prompts', async function () { + await shell.waitForPrompt(); + const outputOffsetBefore = shell.output.length; + shell.writeInputLine(` + const foo = { + bar: "baz" + }; + `); + + // Wait for some multiline dots + await shell.eventually(() => { + shell.assertContainsOutput('... ...'); + }); + const outputOffsetAfterDots = shell.output.length; + const outputBetween = shell.output + .substring(outputOffsetBefore, outputOffsetAfterDots) + .trim(); + // Expect just the multiline dots + expect(outputBetween).equals('... ...'); + + // Waiting for a new prompt + await shell.waitForPrompt(outputOffsetAfterDots); + }); + it('runs help command', async function () { expect(await shell.executeLine('help')).to.include('Shell Help'); shell.assertNoErrors();