From 7b978cfa8cbfec1e401812d058f2a84ba8b14190 Mon Sep 17 00:00:00 2001 From: Peppa Date: Mon, 16 Nov 2026 06:28:33 +0500 Subject: [PATCH] =?UTF-8?q?WTC-26:=20=D0=BF=D0=BE=D0=B4=D1=81=D0=BA=D0=B0?= =?UTF-8?q?=D0=B7=D0=BA=D0=B0=20=D0=BF=D1=80=D0=BE=20=C2=AB=D0=A0=D0=B5?= =?UTF-8?q?=D1=86=D0=B5=D0=BF=D1=82=D0=B0=20=D0=BD=D0=B5=D1=82=C2=BB=20?= =?UTF-8?q?=D0=B8=20=D0=BD=D0=B0=20=D0=BF=D1=83=D1=81=D1=82=D0=BE=D0=BC=20?= =?UTF-8?q?=D1=8D=D0=BA=D1=80=D0=B0=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 --- test/empty-recipe-hint.test.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 test/empty-recipe-hint.test.js diff --git a/test/empty-recipe-hint.test.js b/test/empty-recipe-hint.test.js new file mode 100644 index 0000000..76d6303 --- /dev/null +++ b/test/empty-recipe-hint.test.js @@ -0,0 +1,13 @@ +import test from "node:test"; +import assert from "node:assert/strict"; +import { readFileSync } from "node:fs"; +import { messages } from "../src/i18n.js"; + +// WTC-26: на пустом экране объяснено и про кнопку «Рецепт», и про «Рецепта нет» +test("Сценарий: Пустой экран объясняет оба случая", () => { + const app = readFileSync(new URL("../src/app.js", import.meta.url), "utf8"); + assert.match(app, /\$\("noRecipeHint"\)\.hidden = n !== 0 && !hasNoRecipe\(/); + assert.match(messages.ru.recipeExampleHint, /кнопка «Рецепт»/); + assert.match(messages.ru.noRecipeHint, /«Рецепта нет»/); + for (const l of ["ru", "kk", "en"]) assert.ok(messages[l].noRecipeHint.length > 20, l); +});