FRTVL-28: тексты блока Телеграма без повторов #35

Open
peppa-bot wants to merge 3 commits from task/frtvl-28 into main
3 changed files with 3 additions and 6 deletions
Showing only changes of commit d50befde3d - Show all commits

View File

@ -230,7 +230,7 @@ async function loadSettings() {
$("bot-unavailable").hidden = !tg.unavailable;
$("telegram-detail").textContent = tg.detail;
$("telegram-details").hidden = !tg.detail;
$("telegram-code-hint").textContent = telegramCodeHint(tg.step);
$("telegram-code-hint").textContent = telegramCodeHint();
$("link-button").hidden = tg.step !== "unlinked";
$("mock-confirm").hidden = tg.step !== "pending";
$("unlink-button").hidden = tg.step !== "linked";

View File

@ -298,10 +298,9 @@ export function runningMessage(startedAt) {
* Подсказка блока Телеграма про код привязки. Что с ним делать, сказано один раз:
* до нажатия — в telegramState.note, после — в #link-info рядом с кодом (FRTVL-28),
* поэтому отдельной подсказки нет ни на одном шаге.
* @param {"unlinked" | "pending" | "linked"} _step
* @returns {string}
*/
export function telegramCodeHint(_step) {
export function telegramCodeHint() {
return "";
}

View File

@ -156,9 +156,7 @@ describe("Requirement: Вход владельца (FRTVL-47)", async () => {
});
it("Scenario: Подсказка Телеграма по шагам — без повторов и кода доступа", () => {
expect(telegramCodeHint("linked")).toBe("");
expect(telegramCodeHint("pending")).toBe("");
expect(telegramCodeHint("unlinked")).toBe("");
expect(telegramCodeHint()).toBe("");
});
});