From 0d92f2fbba7a80e6dc6a0c26dafb836daee637e7 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Sun, 5 Apr 2026 17:57:23 -0500 Subject: [PATCH] test(ui): add regression test for full-width separator lines Verifies separator lines extend to the full terminal width when the terminal is wider than 200 columns. --- src/tests/welcome-screen.test.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/tests/welcome-screen.test.ts b/src/tests/welcome-screen.test.ts index a78f1ea36..dcc7f8105 100644 --- a/src/tests/welcome-screen.test.ts +++ b/src/tests/welcome-screen.test.ts @@ -83,3 +83,18 @@ test('omits remote channel when not provided', () => { assert.ok(!out.includes('Slack'), 'should not show Slack when no remote') assert.ok(!out.includes('Telegram'), 'should not show Telegram when no remote') }) + +test('separator lines extend to full terminal width on wide terminals', (t) => { + const origColumns = process.stderr.columns + ;(process.stderr as any).columns = 250 + t.after(() => { ;(process.stderr as any).columns = origColumns }) + + const out = strip(capture({ version: '1.0.0' })) + const lines = out.split('\n') + // Top and bottom separator bars should be 249 chars (columns - 1) + const separatorLines = lines.filter(l => /^─+$/.test(l.trim())) + assert.ok(separatorLines.length >= 2, 'expected at least 2 full-width separator lines') + for (const sep of separatorLines) { + assert.equal(sep.trim().length, 249, `separator should be 249 chars wide, got ${sep.trim().length}`) + } +})