From 4aa77aff99414a71d930fc4bf8c60a46ad5eb1dc Mon Sep 17 00:00:00 2001 From: Peppa Date: Tue, 17 Nov 2026 11:43:24 +0500 Subject: [PATCH] =?UTF-8?q?TPTIP-18:=20=D1=82=D0=B5=D0=BA=D1=81=D1=82=20?= =?UTF-8?q?=D0=BA=D0=B0=D1=80=D1=82=D0=BE=D1=87=D0=BA=D0=B8=20=D0=B1=D0=BB?= =?UTF-8?q?=D1=8E=D0=B4=D0=B0=20=D0=BF=D0=B5=D1=80=D0=B5=D0=BD=D0=BE=D1=81?= =?UTF-8?q?=D0=B8=D1=82=D1=81=D1=8F=20=D0=BD=D0=B0=20=D1=82=D0=B5=D0=BB?= =?UTF-8?q?=D0=B5=D1=84=D0=BE=D0=BD=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- index.html | 2 +- tests/dish-card.test.js | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 1312e04..e07657d 100644 --- a/index.html +++ b/index.html @@ -81,7 +81,7 @@ input:focus,select:focus,textarea:focus,button:focus-visible{outline:2px solid v /* списки */ .item{display:flex;align-items:center;gap:8px;padding:10px 0;border-top:1px solid var(--line)} .item:first-child{border-top:0} -.item .main{flex:1;min-width:0;cursor:pointer} +.item .main{flex:1;min-width:0;cursor:pointer;overflow-wrap:anywhere} .item .main b{display:block;overflow-wrap:anywhere} .badge{display:inline-block;border-radius:999px;padding:1px 8px;font-size:.75rem;background:var(--bg);border:1px solid var(--line);color:var(--muted)} .ok{color:var(--ok)}.bad{color:var(--bad)} diff --git a/tests/dish-card.test.js b/tests/dish-card.test.js index 618e654..dbac636 100644 --- a/tests/dish-card.test.js +++ b/tests/dish-card.test.js @@ -75,3 +75,10 @@ test('Сценарий: после «Выбрать» видны вес и КБ assert.match(row.textContent, new RegExp('\\(' + n[1] + ' г\\)')); assert.match(row.textContent, new RegExp(n[2] + ' ккал · Б ' + n[3] + ' · Ж ' + n[4] + ' · У ' + n[5])); }); + +test('Сценарий: рецепт читается на телефоне — текст переносится, а не обрезается', () => { + const css = source.match(/\.item \.main\{[^}]*\}/)[0]; + assert.match(css, /min-width:0/); + assert.match(css, /overflow-wrap:anywhere/); + assert.doesNotMatch(source, /text-overflow:\s*ellipsis/); +}); -- 2.45.2