WTC-26: подсказка про «Рецепта нет» и на пустом экране
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
49afcb5a32
commit
7b978cfa8c
13
test/empty-recipe-hint.test.js
Normal file
13
test/empty-recipe-hint.test.js
Normal file
@ -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);
|
||||
});
|
||||
Loading…
Reference in New Issue
Block a user