FRTVL-6: галочка и подпись в одну строку, одна короткая подсказка
All checks were successful
peppa/lint lint: success за 1с
peppa/typecheck typecheck: success за 4с
peppa/test test: success за 2с
peppa/build build: success за 2с
ci / checks (pull_request) Successful in 34s
deploy / deploy (pull_request) Successful in 18s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Peppa 2026-11-16 23:10:34 +05:00
parent 22c770efc2
commit 610fef7ecb
5 changed files with 8 additions and 8 deletions

View File

@ -55,7 +55,7 @@
#### Scenario: Телеграм не привязан
- **GIVEN** Телеграм не привязан
- **WHEN** пользователь открывает страницу
- **THEN** у галочки регулярного поиска подпись просит сначала привязать Телеграм
- **THEN** у галочки регулярного поиска рядом с галочкой в одной строке одна короткая подсказка «Сначала привяжите Телеграм», без дубля ниже
#### Scenario: Поиск ещё не запускался
- **GIVEN** поиск не запускался и нужен код доступа

View File

@ -92,9 +92,7 @@ export function settingsSummary(s) {
* @returns {string}
*/
export function enabledHint(linked) {
return linked
? "Раз в сутки сервис сам ищет стажировки и присылает в Телеграм только новые."
: "Галочка станет доступна после привязки Телеграма: сначала нажмите «Привязать Телеграм».";
return linked ? "" : "Сначала привяжите Телеграм";
}
/**

View File

@ -59,10 +59,10 @@
<button id="unlink-button" type="button" hidden>Отвязать</button>
<label class="inline">
<input id="enabled" type="checkbox" />
Искать раз в сутки и присылать новое
<span>Искать раз в сутки и присылать новое</span>
</label>
<span id="enabled-hint" class="muted"></span>
</div>
<p id="enabled-hint" class="muted"></p>
<p id="settings-error" class="muted" role="alert"></p>
</section>

View File

@ -48,5 +48,6 @@ a { color: var(--accent); }
.settings { margin: 24px 0; padding: 16px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; }
.settings h2 { margin: 0 0 8px; font-size: 1.1rem; }
.settings .row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.settings .inline { display: inline-flex; gap: 6px; align-items: center; }
.settings .inline { display: inline-flex; flex-direction: row; gap: 6px; align-items: center; cursor: pointer; font-size: 1rem; color: var(--text); }
.settings .inline input { padding: 0; margin: 0; }
.muted-badge { background: transparent; color: var(--muted); border: 1px solid var(--border); }

View File

@ -141,7 +141,8 @@ describe("Requirement: Запуск поиска со страницы", () => {
describe("Requirement: Подписи и пустые состояния", () => {
it("Scenario: Телеграм не привязан", async () => {
await loadPage();
await vi.waitFor(() => expect($("enabled-hint").textContent).toContain("после привязки Телеграма"));
await vi.waitFor(() => expect($("enabled-hint").textContent).toBe("Сначала привяжите Телеграм"));
expect($("enabled").closest("label")?.textContent).toContain("Искать раз в сутки");
});
it("Scenario: Поиск ещё не запускался", async () => {