From 5084df3914dc16e088afb3e249449d4693484ea3 Mon Sep 17 00:00:00 2001 From: Ilia Mashkov Date: Wed, 3 Jun 2026 16:10:31 +0300 Subject: [PATCH] test(e2e): document single-line ASCII constraint on preview sample --- e2e/preview-text.test.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/e2e/preview-text.test.ts b/e2e/preview-text.test.ts index ada9313..c2565b5 100644 --- a/e2e/preview-text.test.ts +++ b/e2e/preview-text.test.ts @@ -6,6 +6,13 @@ import { test.describe('preview text', () => { test('drives the slider character rendering', async ({ comparison }) => { + /** + * Must stay a single unwrapped line of ASCII: the assertion feeds + * `text.length` (UTF-16 code units) to `windowSizeForLine`, but the + * renderer feeds it the line's grapheme count. They match only for + * plain ASCII — emoji/combining marks (length > graphemes) or wrapping + * (one input string splitting into several lines) silently desync them. + */ const text = 'Sphinx'; await comparison.pickPair('Inter', 'Roboto'); await comparison.setPreviewText(text);