feat(frontend): drop demo labels from the product screens
This commit is contained in:
1 parent
c836d02ea3
commit
90ff71735a
44 files changed
+165
-376
No files matched your search
@@ -63,7 +63,7 @@ Every block has loading, error with retry, forbidden (401 and 403 without retry)
|
||||
|
||||
## Candidate assessment
|
||||
|
||||
`/candidate/assessment` reads availability and creates attempts through the API; `/candidate/assessment/:attemptId` resumes an attempt, submits answers, and finalizes it through server commands. Real assessment requires current C3 consent. `demo_express` is labeled as a demonstration and does not award a qualification score or confirmed category. The attempt screen displays the server result with the same component as the result page and links to it (see [Candidate results](#candidate-results)). Only the server assigns a category; the client calculates neither scores nor grades.
|
||||
`/candidate/assessment` reads availability and creates attempts through the API; `/candidate/assessment/:attemptId` resumes an attempt, submits answers, and finalizes it through server commands. Real assessment requires current C3 consent. The express test (`demo_express`) is shown as "Экспресс-тест" (express test) and does not award a qualification score or confirmed category. The attempt screen displays the server result with the same component as the result page and links to it (see [Candidate results](#candidate-results)). Only the server assigns a category; the client calculates neither scores nor grades.
|
||||
|
||||
The attempt screen focuses on the item: a strip above it names the attempt and shows the progress of answered items, the time left until the server deadline `expires_at` in mono (a `timer` element that is not announced every second; color and a label mark the last minute), and the save state of the answer (a polite status message). Keys 1-9 choose an option, and Enter on an option sends the answer.
|
||||
|
||||
@@ -77,7 +77,7 @@ Clipboard contents and typed text are never read into a signal or sent. The past
|
||||
|
||||
## Candidate results
|
||||
|
||||
`/candidate/results` lists the completed real assessments of the current candidate (`GET /me/assessment-results`, 20 records per page; the cursor comes only from the server response and is never built on the client). `/candidate/results/:attemptId` opens one record by a direct URL. Both screens read data only for a confirmed candidate session: query keys include the account identifier and the session token, data does not outlive the screen (`gcTime: 0`) and is removed when the session changes or ends. A 401, 403, or 404 response shows an "unavailable" screen without data and does not reveal whether another candidate's result exists; the assessment cache is cleared only on 401, while a network or 5xx failure offers a retry and is not treated as lost access. A failed background refresh keeps the data that was already loaded and says so. Dates are shown in the browser time zone with its name. "Show more" moves the focus to the first new row and announces how many were loaded. Loading, empty history, and error states with retry exist. A failed attempt after a successful one, adaptive estimate values, retry dates, and missing-field cases are covered by unit contract fixtures because the stand cannot produce them; the e2e test checks the shape of the flow (a real result, the express run, ownership, sign-out; the interface has no sign-out control yet, so the session ends through the API). By contract, demonstration runs are not part of the history; their result opens from the attempt screen or by a direct URL and is always marked as a demonstration.
|
||||
`/candidate/results` lists the completed real assessments of the current candidate (`GET /me/assessment-results`, 20 records per page; the cursor comes only from the server response and is never built on the client). `/candidate/results/:attemptId` opens one record by a direct URL. Both screens read data only for a confirmed candidate session: query keys include the account identifier and the session token, data does not outlive the screen (`gcTime: 0`) and is removed when the session changes or ends. A 401, 403, or 404 response shows an "unavailable" screen without data and does not reveal whether another candidate's result exists; the assessment cache is cleared only on 401, while a network or 5xx failure offers a retry and is not treated as lost access. A failed background refresh keeps the data that was already loaded and says so. Dates are shown in the browser time zone with its name. "Show more" moves the focus to the first new row and announces how many were loaded. Loading, empty history, and error states with retry exist. A failed attempt after a successful one, adaptive estimate values, retry dates, and missing-field cases are covered by unit contract fixtures because the stand cannot produce them; the e2e test checks the shape of the flow (a real result, the express run, ownership, sign-out; the interface has no sign-out control yet, so the session ends through the API). By contract, express tests are not part of the history; their result opens from the attempt screen or by a direct URL and is captioned "Экспресс-тест без грейда" (express test without a grade).
|
||||
|
||||
On the attempt screen only the phrase "Result received" is a live message; the record is ordinary content, and the focus moves to its heading. The shared `AssessmentResultView` component (`entities/assessment`) only restates the fields of the server response:
|
||||
|
||||
@@ -85,7 +85,7 @@ On the attempt screen only the phrase "Result received" is a live message; the r
|
||||
- an adaptive result shows θ, SE, the 95% interval, P_G, and the strength with the values the server returned (decimal comma, two to three digits, no recalculation); when `uncertainty`, `strength`, or the score is `null`, the rows are omitted and no zeros are substituted, and an adaptive attempt without an estimate gets a note; for `demo_basic` the screen says that no percentile, ability estimate, or P_G is calculated;
|
||||
- a failed attempt shows the attempt result separately from the previous category, which stays in force; next steps come from `next_steps` in the server order under an "as of the decision" heading: the date comes from `available_at` ("Available from ..."), `null` means the step was available immediately at the decision, and the checks page shows the current availability;
|
||||
- an offer to accept a lower grade (`accept_lower_grade`) is plain text only: the category does not change without a separate candidate command, and the interface has no such command yet;
|
||||
- an express result is marked as a demonstration without a real grade, shows no category or estimate, and leads to the full assessment; a prepared full attempt appears as a separate history record, and the decision source is shown when the server reports one.
|
||||
- an express result is captioned "Экспресс-тест без грейда" (express test without a grade), shows no category or estimate, and leads to the full assessment; a prepared full attempt appears as a separate history record. A confirmed category looks the same for every decision basis: the interface prints no demo marks and no calibration status, and the values stay in the API response.
|
||||
|
||||
## Privacy settings
|
||||
|
||||
@@ -95,7 +95,7 @@ On the attempt screen only the phrase "Result received" is a live message; the r
|
||||
- Publication (`features/profile-visibility`): step 1 shows whether C2 is active from the complete active consent history; an unknown or partly loaded state is not treated as consent, and saving stays unavailable. The step button only moves focus to the C2 block and grants nothing. The card state and fields are chosen next, and the publication is saved by a separate action (`SetMyPublication`, `expected_version` in the body). A 412 conflict keeps the draft on screen and offers an explicit reload of the current settings; a failed save does not reset the draft. Revoking C2 closes the card, and a new C2 does not reopen it.
|
||||
- Closure explanation: from `closed_reason` the screen says that future reads are closed at once, that a new C2 does not reopen the card by itself, and that a former company needs a new invitation and a new C4 to read contacts. The same words appear after revoking C2, hiding an organization, unhiding it, and republishing: an earlier contact access is not restored. Hiding does not change the C4 record in the consent ledger, so next to the C4 of a hidden company a note says that the record does not bring contact access back.
|
||||
- Search status (`SetMySearchStatus`) is its own request and its own text. It does not change the publication and grants no consent.
|
||||
- Employer preview (`EmployerCardPreview` from `entities/candidate-view`) is built only from the `GET /me/privacy/preview` response. The preview alias is separate from organization aliases. Confirmed categories and self-assessment are shown apart; each specialization has its own "Grade confirmed" or "Grade not confirmed" status (the Russian labels are "Грейд подтвержден" and "Грейд не подтвержден"), told apart by the shape of the mark and by text, not by color. A candidate without a confirmed grade sees the declared level (or "Level not specified") and the not-confirmed status for each specialization separately; a confirmed Backend is not carried over to a network specialization. The evidence block shows the skill, grade, confirmation level, year, basis, and calibration as the server returned them (`synthetic_demo` and `uncalibrated` are shown as a synthetic demonstration, not a validated measurement, and as thresholds that are not calibrated). A closed card is shown as an empty state. The preview creates no access record and ignores organization filters.
|
||||
- Employer preview (`EmployerCardPreview` from `entities/candidate-view`) is built only from the `GET /me/privacy/preview` response. The preview alias is separate from organization aliases. Confirmed categories and self-assessment are shown apart; each specialization has its own "Grade confirmed" or "Grade not confirmed" status (the Russian labels are "Грейд подтвержден" and "Грейд не подтвержден"), told apart by the shape of the mark and by text, not by color. A candidate without a confirmed grade sees the declared level (or "Level not specified") and the not-confirmed status for each specialization separately; a confirmed Backend is not carried over to a network specialization. The evidence block shows the skill, grade, confirmation level, year, and basis (`synthetic_demo` is shown as "Результат теста", a test result; calibration is not shown in the interface). A closed card is shown as an empty state. The preview creates no access record and ignores organization filters.
|
||||
- Hiding organizations: the hide button is offered only for organizations in the candidate's own access history (the server answers 404 for the rest), and only after the list of hidden organizations is fully loaded. Unhiding does not restore contact access.
|
||||
- Histories: the settings history and the card access history are paginated; a partial page is never presented as complete. An access record shows the kind of access, the time, and the organization when the server names it (otherwise "Organization is not disclosed"); it carries no employees, queries, filters, or search position. An empty history and a load error are separate states.
|
||||
- A link to request a manual assessment stays below.
|
||||
|
||||
+4
-4
@@ -63,7 +63,7 @@ SPA на React и TypeScript со сборкой Vite и структурой FS
|
||||
|
||||
## Проверка кандидата
|
||||
|
||||
`/candidate/assessment` получает доступность и создает попытки через API; `/candidate/assessment/:attemptId` возобновляет попытку, отправляет ответы и завершает ее серверными командами. Реальный режим требует действующего C3. `demo_express` помечен как демонстрационный и не выдает квалификационный балл или подтвержденную категорию. Интерфейс показывает серверный итог в экране попытки тем же компонентом, что и страница результатов, со ссылкой на нее (см. [результаты кандидата](#результаты-кандидата)). Категорию присваивает только сервер; клиент не вычисляет баллы и грейды.
|
||||
`/candidate/assessment` получает доступность и создает попытки через API; `/candidate/assessment/:attemptId` возобновляет попытку, отправляет ответы и завершает ее серверными командами. Реальный режим требует действующего C3. Экспресс-тест (`demo_express`) показан как "Экспресс-тест" и не выдает квалификационный балл или подтвержденную категорию. Интерфейс показывает серверный итог в экране попытки тем же компонентом, что и страница результатов, со ссылкой на нее (см. [результаты кандидата](#результаты-кандидата)). Категорию присваивает только сервер; клиент не вычисляет баллы и грейды.
|
||||
|
||||
Экран попытки сосредоточен на задании: полоса над ним называет попытку, показывает прогресс отвеченных заданий, время до серверного срока `expires_at` моноширинным шрифтом (элемент `timer` без объявления каждой секунды; последнюю минуту отмечают цвет и подпись) и состояние сохранения ответа (вежливое сообщение о статусе). Вариант ответа выбирается клавишами 1-9, Enter на варианте отправляет ответ.
|
||||
|
||||
@@ -77,7 +77,7 @@ SPA на React и TypeScript со сборкой Vite и структурой FS
|
||||
|
||||
## Результаты кандидата
|
||||
|
||||
`/candidate/results` показывает историю завершенных реальных проверок текущего кандидата (`GET /me/assessment-results`, по 20 записей, курсор берется только из ответа сервера и не строится на клиенте). `/candidate/results/:attemptId` открывает одну запись по прямому URL. Оба экрана читают данные только при подтвержденной сессии кандидата: ключи запросов содержат идентификатор аккаунта и токен сессии, данные не живут после ухода с экрана (`gcTime: 0`) и удаляются при смене или потере сессии. Ответ 401, 403 или 404 дает экран "недоступно" без данных и не раскрывает, существует ли чужой результат; кеш ассессмента очищается только при 401, а сбой сети или 5xx предлагает повтор и не считается потерей доступа. Неудачное фоновое обновление оставляет уже загруженные данные и сообщает об этом. Даты показываются в часовом поясе браузера с его названием. "Показать еще" переносит фокус на первую новую запись и сообщает о числе загруженных. Есть состояния загрузки, пустой истории и ошибки с повтором. Неудачная попытка после успешной, значения адаптивной оценки, даты пересдачи и случаи без полей покрыты модульными фикстурами контракта: на стенде их получить нельзя, e2e проверяет форму потока (реальный результат, экспресс, владение, выход из аккаунта; в интерфейсе пока нет кнопки выхода, сессия завершается через API). Демонстрационные запуски по контракту в историю не входят; их результат открывается по ссылке из экрана попытки или по прямому URL и всегда помечен как демонстрация.
|
||||
`/candidate/results` показывает историю завершенных реальных проверок текущего кандидата (`GET /me/assessment-results`, по 20 записей, курсор берется только из ответа сервера и не строится на клиенте). `/candidate/results/:attemptId` открывает одну запись по прямому URL. Оба экрана читают данные только при подтвержденной сессии кандидата: ключи запросов содержат идентификатор аккаунта и токен сессии, данные не живут после ухода с экрана (`gcTime: 0`) и удаляются при смене или потере сессии. Ответ 401, 403 или 404 дает экран "недоступно" без данных и не раскрывает, существует ли чужой результат; кеш ассессмента очищается только при 401, а сбой сети или 5xx предлагает повтор и не считается потерей доступа. Неудачное фоновое обновление оставляет уже загруженные данные и сообщает об этом. Даты показываются в часовом поясе браузера с его названием. "Показать еще" переносит фокус на первую новую запись и сообщает о числе загруженных. Есть состояния загрузки, пустой истории и ошибки с повтором. Неудачная попытка после успешной, значения адаптивной оценки, даты пересдачи и случаи без полей покрыты модульными фикстурами контракта: на стенде их получить нельзя, e2e проверяет форму потока (реальный результат, экспресс, владение, выход из аккаунта; в интерфейсе пока нет кнопки выхода, сессия завершается через API). Экспресс-тесты по контракту в историю не входят; их результат открывается по ссылке из экрана попытки или по прямому URL и подписан "Экспресс-тест без грейда".
|
||||
|
||||
На экране попытки живым сообщением остается только фраза "Результат получен", запись результата - обычное содержимое, а фокус переходит на ее заголовок. Общий компонент `AssessmentResultView` (`entities/assessment`) только пересказывает поля серверного ответа:
|
||||
|
||||
@@ -85,7 +85,7 @@ SPA на React и TypeScript со сборкой Vite и структурой FS
|
||||
- для адаптивного результата показаны θ, SE, 95% интервал, P_G и сила подтверждения с теми значениями, что вернул сервер (запятая, два-три знака, без пересчета); если `uncertainty`, `strength` или баллы равны `null`, строки не выводятся и нули не подставляются, а для адаптивной попытки без оценки показана пометка; для `demo_basic` прямо сказано, что перцентиль, оценка способности и P_G не рассчитываются;
|
||||
- неудачная попытка показывает отдельный результат попытки и прежнюю категорию, которая сохраняется; следующие шаги выводятся из `next_steps` в порядке сервера под заголовком "на момент решения": дата берется из `available_at` ("Доступно с ..."), `null` значит, что шаг был доступен сразу при решении, а актуальную доступность показывает страница проверок;
|
||||
- предложение принять меньший грейд (`accept_lower_grade`) выводится только текстом: категория не меняется без отдельной команды кандидата, такой команды в интерфейсе пока нет;
|
||||
- экспресс-результат помечен как демонстрация без реального грейда, не показывает категорию и оценку и ведет к полной проверке; подготовленная полная попытка показывается отдельной записью истории, а источник решения выводится, если его вернул сервер.
|
||||
- экспресс-результат подписан "Экспресс-тест без грейда", не показывает категорию и оценку и ведет к полной проверке; подготовленная полная попытка показывается отдельной записью истории. Подтвержденная категория выглядит одинаково при любом основании решения: пометок "демо" и статуса калибровки интерфейс не выводит, значения остаются в ответе API.
|
||||
|
||||
## Настройки приватности
|
||||
|
||||
@@ -95,7 +95,7 @@ SPA на React и TypeScript со сборкой Vite и структурой FS
|
||||
- Публикация (`features/profile-visibility`): шаг 1 показывает, действует ли C2 по полной активной истории согласий; неизвестное или частично загруженное состояние не считается согласием, сохранение недоступно. Кнопка шага только переносит фокус к блоку C2 и ничего не выдает. Далее выбираются состояние карточки и поля, а публикация сохраняется отдельным действием (`SetMyPublication`, `expected_version` в теле). Конфликт 412 оставляет черновик на экране и предлагает явно загрузить актуальные настройки; ошибка сохранения не сбрасывает черновик. Отзыв C2 закрывает карточку, а новое C2 ее не открывает.
|
||||
- Объяснение закрытия: по `closed_reason` экран говорит, что будущие чтения закрыты сразу, что новое C2 не откроет карточку само, и что бывшей компании для контактов нужны новое приглашение и новое согласие C4. Те же слова выводятся после отзыва C2, скрытия организации, снятия скрытия и повторной публикации: прежний доступ к контактам не восстанавливается. Скрытие не меняет запись C4 в журнале согласий, поэтому рядом с C4 скрытой компании выведено пояснение, что запись не возвращает доступ к контактам.
|
||||
- Статус поиска (`SetMySearchStatus`) - отдельный запрос и отдельный текст. Он не меняет публикацию и не выдает согласие.
|
||||
- Предпросмотр для работодателя (`EmployerCardPreview` из `entities/candidate-view`) строится только из ответа `GET /me/privacy/preview`. Псевдоним предпросмотра отделен от псевдонимов организаций. Подтвержденные категории и самооценка выведены раздельно; у каждой специализации свой статус "Грейд подтвержден" или "Грейд не подтвержден", различимый по форме значка и тексту, а не по цвету. Кандидат без подтвержденного грейда видит заявленный уровень (или "Уровень не указан") и статус "Грейд не подтвержден" для каждой специализации отдельно; подтвержденный Backend не переносится на сетевую специализацию. Блок подтверждающих фактов показывает навык, грейд, уровень подтверждения, год, основу и калибровку так, как их вернул сервер (`synthetic_demo` и `uncalibrated` выведены как "Синтетическая демонстрация, не проверенное измерение" и "Пороги не откалиброваны"). Закрытая карточка показана пустым состоянием. Предпросмотр не создает записи доступа и не учитывает фильтры организаций.
|
||||
- Предпросмотр для работодателя (`EmployerCardPreview` из `entities/candidate-view`) строится только из ответа `GET /me/privacy/preview`. Псевдоним предпросмотра отделен от псевдонимов организаций. Подтвержденные категории и самооценка выведены раздельно; у каждой специализации свой статус "Грейд подтвержден" или "Грейд не подтвержден", различимый по форме значка и тексту, а не по цвету. Кандидат без подтвержденного грейда видит заявленный уровень (или "Уровень не указан") и статус "Грейд не подтвержден" для каждой специализации отдельно; подтвержденный Backend не переносится на сетевую специализацию. Блок подтверждающих фактов показывает навык, грейд, уровень подтверждения, год и основу (`synthetic_demo` выводится как "Результат теста"; калибровка в интерфейсе не показывается). Закрытая карточка показана пустым состоянием. Предпросмотр не создает записи доступа и не учитывает фильтры организаций.
|
||||
- Скрытие организаций: кнопка скрытия предлагается только организациям из собственной истории доступа (сервер отвечает 404 на остальные) и только после полной загрузки списка скрытых организаций. Снятие скрытия не восстанавливает контактный доступ.
|
||||
- Истории: история настроек и история доступа к карточке постраничные; частичная страница не выдается за полную. Запись доступа показывает вид обращения, время и организацию, если сервер ее назвал (иначе "Организация не раскрывается"); сотрудников, запросов, фильтров и места в выдаче в ней нет. Пустая история и ошибка загрузки показаны отдельными состояниями.
|
||||
- Ниже остается переход к запросу ручной оценки.
|
||||
|
||||
@@ -351,13 +351,13 @@ test("candidate can review, resume, and finish separate assessment modes", async
|
||||
await expect(page.getByRole("heading", { name: "Результат с сервера" })).toBeVisible();
|
||||
|
||||
await page.goto("/candidate/assessment");
|
||||
await expect(page.getByRole("button", { name: "Начать демонстрацию" })).toBeVisible();
|
||||
await expect(page.getByRole("button", { name: "Пройти экспресс-тест" })).toBeVisible();
|
||||
const createExpressResponsePromise = page.waitForResponse(
|
||||
(response) =>
|
||||
response.request().method() === "POST" &&
|
||||
new URL(response.url()).pathname === "/api/v1/me/assessment-attempts",
|
||||
);
|
||||
await page.getByRole("button", { name: "Начать демонстрацию" }).click();
|
||||
await page.getByRole("button", { name: "Пройти экспресс-тест" }).click();
|
||||
const createExpressResponse = await createExpressResponsePromise;
|
||||
expect(createExpressResponse.status()).toBe(201);
|
||||
const expressAttempt = (await createExpressResponse.json()) as AttemptSnapshot;
|
||||
@@ -380,7 +380,7 @@ test("candidate can review, resume, and finish separate assessment modes", async
|
||||
// assessment page, a new start answers 409, and the page replays the start
|
||||
// with the key stored in this tab, which returns the stored 201 of the run.
|
||||
await page.goto("/candidate/assessment");
|
||||
await expect(page.getByRole("button", { name: "Начать демонстрацию" })).toBeVisible();
|
||||
await expect(page.getByRole("button", { name: "Пройти экспресс-тест" })).toBeVisible();
|
||||
const expressStarts: { status: number; key: string | null }[] = [];
|
||||
const recordExpressStart = (response: Response) => {
|
||||
if (
|
||||
@@ -394,9 +394,9 @@ test("candidate can review, resume, and finish separate assessment modes", async
|
||||
}
|
||||
};
|
||||
page.on("response", recordExpressStart);
|
||||
await page.getByRole("button", { name: "Начать демонстрацию" }).click();
|
||||
await page.getByRole("button", { name: "Пройти экспресс-тест" }).click();
|
||||
await expect(page).toHaveURL(new RegExp(`/candidate/assessment/${expressAttempt.id}$`));
|
||||
await expect(page.getByText("Незавершенная демонстрация продолжена")).toBeVisible();
|
||||
await expect(page.getByText("Незавершенный экспресс-тест продолжен")).toBeVisible();
|
||||
page.off("response", recordExpressStart);
|
||||
expect(expressStarts.map((start) => start.status)).toEqual([409, 201]);
|
||||
expect(expressStarts[0]?.key).not.toBe(expressStarts[1]?.key);
|
||||
@@ -404,7 +404,7 @@ test("candidate can review, resume, and finish separate assessment modes", async
|
||||
await navigateInApp(page, `/candidate/assessment/${realAttempt.id}`);
|
||||
await expect(page.getByRole("heading", { name: "Результат с сервера" })).toBeVisible();
|
||||
await expect(page.getByRole("button", { name: "Начать или продолжить" })).toHaveCount(0);
|
||||
await expect(page.getByRole("heading", { name: "Демонстрационная проверка" })).toHaveCount(0);
|
||||
await expect(page.getByRole("heading", { name: "Экспресс-тест" })).toHaveCount(0);
|
||||
await navigateInApp(page, `/candidate/assessment/${expressAttempt.id}`);
|
||||
await expect(page.getByRole("button", { name: "Начать или продолжить" })).toBeVisible();
|
||||
const resumedExpressResponsePromise = page.waitForResponse(
|
||||
@@ -552,11 +552,7 @@ test("candidate can review, resume, and finish separate assessment modes", async
|
||||
);
|
||||
await page.keyboard.press("Enter");
|
||||
expect((await finalizeResponsePromise).status()).toBe(200);
|
||||
await expect(
|
||||
page.getByText(
|
||||
"Демонстрация завершена. Она не подтверждает квалификацию и не присваивает грейд.",
|
||||
),
|
||||
).toBeVisible();
|
||||
await expect(page.getByText("Экспресс-тест не присваивает грейд.")).toBeVisible();
|
||||
await expect(page.getByText(/Подтвержденный уровень/)).toHaveCount(0);
|
||||
page.off("request", captureAnswerCommand);
|
||||
});
|
||||
@@ -902,8 +898,7 @@ test("a failed signal batch is retried with the same key while the answer is sav
|
||||
});
|
||||
|
||||
const resultHeading = "Результат с сервера";
|
||||
const expressBanner =
|
||||
"Демонстрация завершена. Она не подтверждает квалификацию и не присваивает грейд.";
|
||||
const expressBanner = "Экспресс-тест не присваивает грейд.";
|
||||
|
||||
function isFinalizeResponse(response: Response, attemptId: string): boolean {
|
||||
return (
|
||||
@@ -1023,7 +1018,7 @@ test("results keep the express run apart and stay private to the signed-in candi
|
||||
await expect(inline.getByText("Метод и ограничения")).toBeVisible();
|
||||
await expect(inline.getByText("Категория после этого результата", { exact: true })).toBeVisible();
|
||||
await expect(inline.getByText("Дата решения", { exact: true })).toBeVisible();
|
||||
await expect(inline.getByText("Предварительный результат")).toBeVisible();
|
||||
await expect(inline.getByText(/Предварительный|Демо|калибр/)).toHaveCount(0);
|
||||
if (stored.mode === "demo_basic") {
|
||||
await expect(inline.getByText(/Перцентиль, оценка способности, интервал/)).toBeVisible();
|
||||
await expect(inline.getByText("Стандартная ошибка (SE)")).toHaveCount(0);
|
||||
@@ -1035,11 +1030,11 @@ test("results keep the express run apart and stay private to the signed-in candi
|
||||
await expectNoHorizontalOverflow(page, 360);
|
||||
await expectNoHorizontalOverflow(page, 1280);
|
||||
|
||||
// The express run is a demonstration: no category, and it offers the full test.
|
||||
// The express test assigns no category, and it offers the full test.
|
||||
await page.goto("/candidate/assessment");
|
||||
await expect(page.getByRole("button", { name: "Начать демонстрацию" })).toBeVisible();
|
||||
await expect(page.getByRole("button", { name: "Пройти экспресс-тест" })).toBeVisible();
|
||||
const { id: expressId } = await runAttemptToResult(page, {
|
||||
name: "Начать демонстрацию",
|
||||
name: "Пройти экспресс-тест",
|
||||
confirmNotice: false,
|
||||
});
|
||||
await expect(page.getByText(expressBanner)).toBeVisible();
|
||||
@@ -1056,7 +1051,7 @@ test("results keep the express run apart and stay private to the signed-in candi
|
||||
await expect(history.getByRole("listitem")).toHaveCount(1);
|
||||
await expect(history.getByRole("link")).toHaveAttribute("href", `/candidate/results/${realId}`);
|
||||
await expect(page.locator(`a[href$="${expressId}"]`)).toHaveCount(0);
|
||||
await expect(page.getByText(/Демонстрационные запуски сюда не попадают/)).toBeVisible();
|
||||
await expect(page.getByText(/Экспресс-тест сюда не попадает/)).toBeVisible();
|
||||
await expectNoHorizontalOverflow(page, 360);
|
||||
await page.screenshot({
|
||||
path: `${process.env.E2E_ARTIFACTS_DIR ?? "test-results/e2e"}/assessment-history-360.png`,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { expect, test, type Page } from "@playwright/test";
|
||||
|
||||
// The jury guide and the demonstration banner exist only in a build made with
|
||||
// The jury guide exists only in a build made with
|
||||
// VITE_DEMO_STAND=true. The browser suite builds that way (docker-compose.e2e.yml),
|
||||
// while release E2E runs release images built without the flag. The spec
|
||||
// reads the build from the landing page and checks the guide where it is
|
||||
@@ -18,16 +18,12 @@ async function isDemoBuild(page: Page): Promise<boolean> {
|
||||
return (await page.getByRole("link", { name: guideLink }).count()) > 0;
|
||||
}
|
||||
|
||||
test("the start page offers the jury guide and the banner only in a demonstration build", async ({
|
||||
page,
|
||||
}) => {
|
||||
test("the start page offers the jury guide only in a demonstration build", async ({ page }) => {
|
||||
const demo = await isDemoBuild(page);
|
||||
|
||||
if (demo) {
|
||||
await expect(page.getByRole("heading", { level: 2, name: "Для жюри" })).toBeVisible();
|
||||
await expect(page.getByText("Демонстрационный стенд.")).toBeVisible();
|
||||
} else {
|
||||
await expect(page.getByText("Демонстрационный стенд.")).toHaveCount(0);
|
||||
await expect(page.getByRole("heading", { name: "Для жюри" })).toHaveCount(0);
|
||||
}
|
||||
});
|
||||
@@ -44,11 +40,11 @@ test("the guide route serves the memo in a demonstration build and not-found els
|
||||
}
|
||||
|
||||
await expect(page.getByRole("heading", { level: 1, name: "Гид для жюри" })).toBeVisible();
|
||||
await expect(page.getByText("Демонстрационный стенд.")).toBeVisible();
|
||||
await expect(page.getByText("Маршрут для жюри")).toBeVisible();
|
||||
await expect(page.getByText(/Демонстрационн/)).toHaveCount(0);
|
||||
for (const heading of [
|
||||
"Что такое Lincodex",
|
||||
"Маршрут за восемь минут",
|
||||
"Что здесь демонстрационное",
|
||||
"Что работает без имитации",
|
||||
"Логины и пароль",
|
||||
"Ограничения стенда",
|
||||
|
||||
@@ -802,7 +802,7 @@ test.describe("employer candidate search with a stubbed API", () => {
|
||||
// The confirmed and the declared grade have separate lines.
|
||||
const confirmed = groupSection(page, "Подтвержденные").getByRole("article");
|
||||
await expect(confirmed).toContainText("Грейд подтвержден: Middle");
|
||||
await expect(confirmed).toContainText("Backend, Middle. Демонстрационное подтверждение");
|
||||
await expect(confirmed).toContainText("Backend, Middle. Сильное подтверждение");
|
||||
await expect(confirmed).toContainText("Заявленный кандидатом грейд");
|
||||
await expect(confirmed).toContainText("Senior");
|
||||
|
||||
@@ -963,13 +963,12 @@ test.describe("employer candidate search with a stubbed API", () => {
|
||||
const open = confirmed.getByRole("button", { name: /карточку/ });
|
||||
await open.click();
|
||||
const panel = confirmed.getByRole("region", { name: "Карточка кандидата" });
|
||||
await expect(panel.getByText("Backend: Middle. Демонстрационное подтверждение")).toBeVisible();
|
||||
await expect(panel.getByText("Backend: Middle. Сильное подтверждение")).toBeVisible();
|
||||
await expect(panel.getByText("Заявлено: Junior")).toBeVisible();
|
||||
await expect(panel.getByText("Backend: Middle").first()).toBeVisible();
|
||||
await expect(panel.getByText("Год оценки")).toBeVisible();
|
||||
await expect(
|
||||
panel.getByText("Синтетическая демонстрация, не проверенное измерение"),
|
||||
).toBeVisible();
|
||||
await expect(panel.getByText("Результат теста")).toBeVisible();
|
||||
await expect(panel.getByText(/демонстрац|откалиброван|Калибровка/)).toHaveCount(0);
|
||||
await expect(panel.getByText("Нет значения в карточке")).toBeVisible();
|
||||
expect(await panel.innerText()).not.toMatch(/@|\+\d{6}/);
|
||||
|
||||
|
||||
@@ -787,10 +787,8 @@ test.describe("candidate visibility states with a stubbed API", () => {
|
||||
await expect(
|
||||
preview.getByRole("heading", { name: "Подтверждающие факты оценки" }),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
preview.getByText("Синтетическая демонстрация, не проверенное измерение"),
|
||||
).toBeVisible();
|
||||
await expect(preview.getByText("Пороги не откалиброваны")).toBeVisible();
|
||||
await expect(preview.getByText("Результат теста")).toBeVisible();
|
||||
await expect(preview.getByText(/демонстрац|откалиброван|Калибровка/)).toHaveCount(0);
|
||||
await expect(preview.getByText("Онлайн-результат без подтверждения личности")).toBeVisible();
|
||||
await captureReview(page, "privacy-confirmed-and-unconfirmed");
|
||||
await expectNoHorizontalOverflow(page);
|
||||
|
||||
@@ -18,12 +18,12 @@ async function renderPath(path: string, demo: boolean): Promise<string> {
|
||||
}
|
||||
|
||||
describe("demonstration stand routes", () => {
|
||||
it("serves the jury guide and the banner only in a demo build", async () => {
|
||||
it("serves the jury guide only in a demo build", async () => {
|
||||
expect(await renderPath("/demo", true)).toMatch(/<h1[^>]*>Гид для жюри<\/h1>/);
|
||||
expect(await renderPath("/demo", false)).toMatch(/<h1[^>]*>Страница не найдена<\/h1>/);
|
||||
|
||||
expect(await renderPath("/", true)).toContain("Демонстрационный стенд.");
|
||||
expect(await renderPath("/", false)).not.toContain("Демонстрационный стенд.");
|
||||
expect(await renderPath("/", true)).not.toContain("Демонстрационный стенд");
|
||||
expect(await renderPath("/", false)).not.toContain("Демонстрационный стенд");
|
||||
});
|
||||
|
||||
it("links the jury guide from the landing page only in a demo build", async () => {
|
||||
|
||||
@@ -237,7 +237,7 @@ describe("product readiness", () => {
|
||||
const html = await renderHtml("/candidate/assessment");
|
||||
|
||||
expect(html).toContain("Сначала выберите специализацию");
|
||||
expect(html).toContain("Начать демонстрацию");
|
||||
expect(html).toContain("Пройти экспресс-тест");
|
||||
expect(html).not.toContain("Начать полную проверку");
|
||||
});
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ import { SupportRoute } from "./support-route";
|
||||
export function createRoutes(stand: StandMode = standMode): RouteObject[] {
|
||||
return [
|
||||
{
|
||||
element: <RootLayout demoStand={stand.demo} />,
|
||||
element: <RootLayout />,
|
||||
errorElement: <RouteErrorPage />,
|
||||
children: [
|
||||
{
|
||||
|
||||
@@ -1,17 +1,10 @@
|
||||
import { Outlet, ScrollRestoration } from "react-router-dom";
|
||||
import { DemoStandBanner } from "../../widgets/demo-stand-banner";
|
||||
|
||||
type RootLayoutProps = {
|
||||
/** True only in a demo build; the banner marks synthetic data on every page. */
|
||||
demoStand?: boolean;
|
||||
};
|
||||
|
||||
/** Top route element shared by every route group. */
|
||||
export function RootLayout({ demoStand = false }: RootLayoutProps) {
|
||||
export function RootLayout() {
|
||||
return (
|
||||
<>
|
||||
<ScrollRestoration />
|
||||
{demoStand ? <DemoStandBanner /> : null}
|
||||
<Outlet />
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -47,7 +47,7 @@ export function methodLabel(mode: AssessmentMode): string {
|
||||
case "demo_basic":
|
||||
return "Базовая проверка по фиксированному набору заданий";
|
||||
case "demo_express":
|
||||
return "Демонстрационный экспресс-запуск";
|
||||
return "Экспресс-тест";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,13 +37,11 @@ describe("result fixtures", () => {
|
||||
describe("describeAssessmentResult for a demo_basic result", () => {
|
||||
const view = describeAssessmentResult(demoBasicAssigned(), options);
|
||||
|
||||
it("shows the category, date, method, and the provisional status", () => {
|
||||
it("shows the category, date, and method", () => {
|
||||
expect(fact(view, categoryLabel)).toBe("Backend, Middle (присвоена этим результатом)");
|
||||
expect(fact(view, "Дата решения")).toBe("8 октября 2026 г. в 09:30 UTC");
|
||||
expect(fact(view, "Метод")).toBe("Базовая проверка по фиксированному набору заданий");
|
||||
expect(fact(view, "Статус")).toBe("предварительный, пороги не калибровались");
|
||||
expect(fact(view, "Происхождение решения")).toBe("синтетическая демонстрация стенда");
|
||||
expect(view.isProvisional).toBe(true);
|
||||
expect(view.facts.map((item) => item.label)).toEqual([categoryLabel, "Дата решения", "Метод"]);
|
||||
});
|
||||
|
||||
it("states the method limitation and invents no percentile or estimate", () => {
|
||||
@@ -53,9 +51,8 @@ describe("describeAssessmentResult for a demo_basic result", () => {
|
||||
expect(view.uncertaintyNote).toBeNull();
|
||||
expect(view.strength).toBeNull();
|
||||
expect(view.score).toBe("17 из 20, проходной балл 14");
|
||||
expect(view.limitations).toContain(
|
||||
"Результат получен на небольшом проверенном демонстрационном банке заданий.",
|
||||
);
|
||||
// The bank and calibration codes of the server are not listed as screen text.
|
||||
expect(view.limitations).toEqual(["Проверка пройдена онлайн без наблюдения."]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -113,7 +110,7 @@ describe("describeAssessmentResult for an adaptive result", () => {
|
||||
expect(view.uncertainty?.pGrade).toBe("0,50");
|
||||
});
|
||||
|
||||
it("calls calibrated thresholds calibrated only when the server says so", () => {
|
||||
it("lists no status row for calibrated thresholds", () => {
|
||||
const view = describeAssessmentResult(
|
||||
adaptiveConfirmed({
|
||||
calibration_status: "calibrated",
|
||||
@@ -124,8 +121,7 @@ describe("describeAssessmentResult for an adaptive result", () => {
|
||||
}),
|
||||
options,
|
||||
);
|
||||
expect(view.isProvisional).toBe(false);
|
||||
expect(fact(view, "Статус")).toBe("пороги откалиброваны");
|
||||
expect(view.facts.map((item) => item.label)).not.toContain("Статус");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -263,18 +259,15 @@ describe("describeAssessmentResult for old and unassigned results", () => {
|
||||
describe("describeAssessmentResult for an express result", () => {
|
||||
const view = describeAssessmentResult(expressFixture(), options);
|
||||
|
||||
it("is a demonstration without a category, estimate, or next steps", () => {
|
||||
it("is an express test without a category, estimate, or next steps", () => {
|
||||
expect(view.isExpress).toBe(true);
|
||||
expect(fact(view, "Категория")).toBe("не присваивается");
|
||||
expect(fact(view, "Статус")).toBe("демонстрация");
|
||||
expect(view.expressSummary).toBe("Вы ответили на три учебных задания.");
|
||||
expect(view.uncertainty).toBeNull();
|
||||
expect(view.score).toBeNull();
|
||||
expect(view.nextSteps).toEqual([]);
|
||||
expect(view.nextStepsNote).toBeNull();
|
||||
expect(view.limitations).toEqual([
|
||||
"Запуск служит демонстрацией механики и не является квалификационной оценкой.",
|
||||
]);
|
||||
expect(view.limitations).toEqual(["Экспресс-тест не является квалификационной оценкой."]);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -46,11 +46,10 @@ export type AssessmentResultPresentation = {
|
||||
readonly summary: AssessmentResultSummary;
|
||||
/** The server feedback text of an express run, otherwise null. */
|
||||
readonly expressSummary: string | null;
|
||||
/** Category, date, method, and the provisional status as label-value rows. */
|
||||
/** Category, date, and method as label-value rows. */
|
||||
readonly facts: readonly ResultFact[];
|
||||
/** Extra sentence about the category, or null when the summary says it all. */
|
||||
readonly categoryNote: string | null;
|
||||
readonly isProvisional: boolean;
|
||||
/** Plain statement about what the method does and does not measure. */
|
||||
readonly methodLimitation: string;
|
||||
readonly limitations: readonly string[];
|
||||
@@ -74,13 +73,15 @@ export type ResultPresentationOptions = {
|
||||
readonly timeZone?: string;
|
||||
};
|
||||
|
||||
const limitationLabels: Readonly<Record<AssessmentLimitation | "demonstration_only", string>> = {
|
||||
uncalibrated_thresholds: "Пороги пока не проверены на пилотной выборке.",
|
||||
demo_bank: "Результат получен на небольшом проверенном демонстрационном банке заданий.",
|
||||
// Codes without a label are not listed on the result screen.
|
||||
const limitationLabels: Readonly<
|
||||
Record<AssessmentLimitation | "demonstration_only", string | null>
|
||||
> = {
|
||||
uncalibrated_thresholds: null,
|
||||
demo_bank: null,
|
||||
practice_not_included: "В попытке не было кодовой практики: песочница не была включена.",
|
||||
unproctored: "Проверка пройдена онлайн без наблюдения.",
|
||||
demonstration_only:
|
||||
"Запуск служит демонстрацией механики и не является квалификационной оценкой.",
|
||||
demonstration_only: "Экспресс-тест не является квалификационной оценкой.",
|
||||
};
|
||||
|
||||
const strengthLabels = {
|
||||
@@ -179,7 +180,7 @@ function failedWithoutGradeNote(result: RealResult): string | null {
|
||||
|
||||
function methodLimitationText(result: AssessmentResult): string {
|
||||
if (result.kind === "demo_express") {
|
||||
return "Экспресс-запуск показывает механику проверки. Он не создает категорию, перцентиль, оценку неопределенности и квалификационные доказательства.";
|
||||
return "Экспресс-тест не создает категорию, перцентиль, оценку неопределенности и квалификационные доказательства.";
|
||||
}
|
||||
if (result.mode === "demo_basic") {
|
||||
return "Базовая проверка считает только баллы по фиксированному набору заданий и сравнивает их с проходным баллом. Перцентиль, оценка способности, интервал, вероятность P_G и сила подтверждения не рассчитываются.";
|
||||
@@ -187,14 +188,6 @@ function methodLimitationText(result: AssessmentResult): string {
|
||||
return "Адаптивная проверка оценивает способность на шкале специализации. Оценка способности, интервал и вероятность P_G не являются баллом или перцентилем.";
|
||||
}
|
||||
|
||||
function isProvisional(result: AssessmentResult): boolean {
|
||||
if (result.kind === "demo_express") return true;
|
||||
return (
|
||||
result.calibration_status === "uncalibrated" ||
|
||||
result.category_decision?.calibration_status === "uncalibrated"
|
||||
);
|
||||
}
|
||||
|
||||
function uncertaintyView(result: RealResult): ResultUncertaintyView | null {
|
||||
const value = result.uncertainty;
|
||||
if (!value) return null;
|
||||
@@ -251,7 +244,10 @@ function nextStepView(
|
||||
}
|
||||
|
||||
function limitationList(result: AssessmentResult): string[] {
|
||||
return result.limitations.map((code) => limitationLabels[code]);
|
||||
return result.limitations.flatMap((code) => {
|
||||
const label = limitationLabels[code];
|
||||
return label ? [label] : [];
|
||||
});
|
||||
}
|
||||
|
||||
function expressPresentation(
|
||||
@@ -262,7 +258,7 @@ function expressPresentation(
|
||||
isExpress: true,
|
||||
attemptId: result.attempt_id,
|
||||
title: methodLabel("demo_express"),
|
||||
kindLabel: "Демонстрация без реального грейда",
|
||||
kindLabel: "Экспресс-тест без грейда",
|
||||
decidedDay: formatResultDay(result.decided_at, options.timeZone),
|
||||
summary: assessmentResultSummary(result),
|
||||
expressSummary: result.summary,
|
||||
@@ -270,10 +266,8 @@ function expressPresentation(
|
||||
{ label: "Категория", value: "не присваивается" },
|
||||
{ label: "Дата", value: formatResultDate(result.decided_at, options.timeZone) },
|
||||
{ label: "Метод", value: methodLabel("demo_express") },
|
||||
{ label: "Статус", value: "демонстрация" },
|
||||
],
|
||||
categoryNote: null,
|
||||
isProvisional: true,
|
||||
methodLimitation: methodLimitationText(result),
|
||||
limitations: limitationList(result),
|
||||
score: null,
|
||||
@@ -308,21 +302,11 @@ export function describeAssessmentResult(
|
||||
): AssessmentResultPresentation {
|
||||
if (result.kind === "demo_express") return expressPresentation(result, options);
|
||||
|
||||
const decision = result.category_decision;
|
||||
const facts: ResultFact[] = [
|
||||
{ label: "Категория после этого результата", value: categoryFact(result) },
|
||||
{ label: "Дата решения", value: formatResultDate(result.decided_at, options.timeZone) },
|
||||
{ label: "Метод", value: methodLabel(result.mode) },
|
||||
{
|
||||
label: "Статус",
|
||||
value: isProvisional(result)
|
||||
? "предварительный, пороги не калибровались"
|
||||
: "пороги откалиброваны",
|
||||
},
|
||||
];
|
||||
if (decision?.source === "synthetic_demo") {
|
||||
facts.push({ label: "Происхождение решения", value: "синтетическая демонстрация стенда" });
|
||||
}
|
||||
const uncertainty = uncertaintyView(result);
|
||||
const basic = result.basic_score;
|
||||
|
||||
@@ -337,7 +321,6 @@ export function describeAssessmentResult(
|
||||
expressSummary: null,
|
||||
facts,
|
||||
categoryNote: failedWithoutGradeNote(result),
|
||||
isProvisional: isProvisional(result),
|
||||
methodLimitation: methodLimitationText(result),
|
||||
limitations: limitationList(result),
|
||||
score: basic
|
||||
|
||||
@@ -50,11 +50,11 @@ describe("assessmentResultSummary", () => {
|
||||
}),
|
||||
);
|
||||
expect(summary.text).toBe("Уровень подтвержден: Backend, Middle.");
|
||||
expect(summary.reason).toBe("Это демонстрационная категория: пороги не калибровались.");
|
||||
expect(summary.isDemonstration).toBe(false);
|
||||
expect(summary.reason).toBeNull();
|
||||
expect(summary.isExpress).toBe(false);
|
||||
});
|
||||
|
||||
it("names the demonstration bank only when the server lists it", () => {
|
||||
it("reads a confirmed grade the same way whatever bank the server lists", () => {
|
||||
const summary = assessmentResultSummary(
|
||||
result({
|
||||
outcome: "confirmed",
|
||||
@@ -63,9 +63,8 @@ describe("assessmentResultSummary", () => {
|
||||
category_decision: decision("assigned", { current_confirmed_grade: "middle" }),
|
||||
}),
|
||||
);
|
||||
expect(summary.reason).toBe(
|
||||
"Это демонстрационная категория: пороги не калибровались, банк заданий демонстрационный.",
|
||||
);
|
||||
expect(summary.text).toBe("Уровень подтвержден: Backend, Middle.");
|
||||
expect(summary.reason).toBeNull();
|
||||
});
|
||||
|
||||
it("keeps the higher grade when a reviewed result does not change the category", () => {
|
||||
@@ -81,12 +80,10 @@ describe("assessmentResultSummary", () => {
|
||||
}),
|
||||
);
|
||||
expect(summary.text).toBe("Уровень подтвержден: Backend, Middle.");
|
||||
expect(summary.reason).toBe(
|
||||
"Прежний подтвержденный уровень Senior сохраняется. Это демонстрационная категория: пороги не калибровались.",
|
||||
);
|
||||
expect(summary.reason).toBe("Прежний подтвержденный уровень Senior сохраняется.");
|
||||
});
|
||||
|
||||
it("adds no demonstration note when neither calibration nor the bank says so", () => {
|
||||
it("adds no note to a confirmed grade", () => {
|
||||
const summary = assessmentResultSummary(
|
||||
result({
|
||||
outcome: "confirmed",
|
||||
@@ -102,34 +99,18 @@ describe("assessmentResultSummary", () => {
|
||||
expect(summary.reason).toBeNull();
|
||||
});
|
||||
|
||||
it("describes an adaptive result only by the flags the server set", () => {
|
||||
const decision_ = decision("assigned", { current_confirmed_grade: "middle" });
|
||||
const uncalibratedOnly = assessmentResultSummary(
|
||||
result({
|
||||
mode: "adaptive",
|
||||
outcome: "confirmed",
|
||||
confirmed_grade: "middle",
|
||||
limitations: ["unproctored"],
|
||||
category_decision: decision_,
|
||||
}),
|
||||
);
|
||||
expect(uncalibratedOnly.reason).toBe("Результат предварительный: пороги не калибровались.");
|
||||
expect(uncalibratedOnly.reason).not.toContain("демонстрационн");
|
||||
|
||||
it("adds no note to an adaptive result with an uncalibrated or demo-bank flag", () => {
|
||||
const withBank = assessmentResultSummary(
|
||||
result({
|
||||
mode: "adaptive",
|
||||
outcome: "confirmed",
|
||||
confirmed_grade: "middle",
|
||||
calibration_status: "calibrated",
|
||||
limitations: ["demo_bank"],
|
||||
category_decision: decision("assigned", {
|
||||
current_confirmed_grade: "middle",
|
||||
calibration_status: "calibrated",
|
||||
}),
|
||||
limitations: ["unproctored", "demo_bank"],
|
||||
category_decision: decision("assigned", { current_confirmed_grade: "middle" }),
|
||||
}),
|
||||
);
|
||||
expect(withBank.reason).toBe("Результат предварительный: банк заданий демонстрационный.");
|
||||
expect(withBank.text).toBe("Уровень подтвержден: Backend, Middle.");
|
||||
expect(withBank.reason).toBeNull();
|
||||
});
|
||||
|
||||
it("says that the threshold was reached but no category was assigned", () => {
|
||||
@@ -146,7 +127,7 @@ describe("assessmentResultSummary", () => {
|
||||
);
|
||||
expect(summary.text).toBe("Порог пройден, категория не присвоена: Backend, Middle.");
|
||||
expect(summary.text).not.toContain("Уровень подтвержден");
|
||||
expect(summary.reason).toContain("отключены");
|
||||
expect(summary.reason).toContain("нет подтверждения оператора");
|
||||
});
|
||||
|
||||
it("does not claim a grade for a result stored before category decisions", () => {
|
||||
@@ -173,7 +154,7 @@ describe("assessmentResultSummary", () => {
|
||||
expect(summary.reason).toBe("Время попытки истекло до завершения заданий.");
|
||||
});
|
||||
|
||||
it("marks express training as a demonstration", () => {
|
||||
it("marks an express test as one that never confirms a grade", () => {
|
||||
const summary = assessmentResultSummary(
|
||||
result({
|
||||
kind: "demo_express",
|
||||
@@ -185,7 +166,8 @@ describe("assessmentResultSummary", () => {
|
||||
limitations: ["demonstration_only"],
|
||||
}),
|
||||
);
|
||||
expect(summary.isDemonstration).toBe(true);
|
||||
expect(summary.text).toBe("Экспресс-тест завершен.");
|
||||
expect(summary.isExpress).toBe(true);
|
||||
expect(summary.reason).toBeNull();
|
||||
});
|
||||
});
|
||||
@@ -6,8 +6,8 @@ export type AssessmentResultSummary = {
|
||||
readonly text: string;
|
||||
/** Why no decision was made, or what stays in force; null when nothing to add. */
|
||||
readonly reason: string | null;
|
||||
/** True for training results that never confirm a grade. */
|
||||
readonly isDemonstration: boolean;
|
||||
/** True for express results that never confirm a grade. */
|
||||
readonly isExpress: boolean;
|
||||
};
|
||||
|
||||
type NotDeterminedReason = NonNullable<
|
||||
@@ -24,7 +24,7 @@ const notDeterminedReasons: Readonly<Record<NotDeterminedReason, string>> = {
|
||||
/** Plain words for a passed threshold without an assigned category. */
|
||||
function noCategoryReason(status: string | undefined): string {
|
||||
if (status === "not_eligible") {
|
||||
return "Демонстрационные категории на этом стенде отключены или для этой проверки нет подтверждения оператора, поэтому уровень не присваивается.";
|
||||
return "Для этой проверки нет подтверждения оператора, поэтому уровень не присваивается.";
|
||||
}
|
||||
return "Результат сохранен без решения о категории, поэтому уровень не присваивается.";
|
||||
}
|
||||
@@ -36,12 +36,12 @@ function noCategoryReason(status: string | undefined): string {
|
||||
export function assessmentResultSummary(result: AssessmentResult): AssessmentResultSummary {
|
||||
if (result.kind === "demo_express") {
|
||||
return {
|
||||
text: "Демонстрационный экспресс-запуск завершен.",
|
||||
text: "Экспресс-тест завершен.",
|
||||
reason: null,
|
||||
isDemonstration: true,
|
||||
isExpress: true,
|
||||
};
|
||||
}
|
||||
const isDemonstration = false;
|
||||
const isExpress = false;
|
||||
|
||||
const specialization = specializationLabels[result.specialization];
|
||||
const keptGrade = result.previous_confirmed_grade
|
||||
@@ -61,36 +61,20 @@ export function assessmentResultSummary(result: AssessmentResult): AssessmentRes
|
||||
return {
|
||||
text: `Порог пройден, категория не присвоена: ${specialization}, ${gradeLabels[result.target_grade]}.`,
|
||||
reason: noCategoryReason(decisionStatus),
|
||||
isDemonstration,
|
||||
isExpress,
|
||||
};
|
||||
}
|
||||
const flags = [
|
||||
result.category_decision?.calibration_status === "uncalibrated" ||
|
||||
result.calibration_status === "uncalibrated"
|
||||
? "пороги не калибровались"
|
||||
: null,
|
||||
result.limitations.includes("demo_bank") ? "банк заданий демонстрационный" : null,
|
||||
].filter(Boolean);
|
||||
// Only the basic method yields a demonstration category; other methods
|
||||
// are described by the flags the server actually set.
|
||||
const caveat =
|
||||
flags.length === 0
|
||||
? null
|
||||
: `${result.mode === "demo_basic" ? "Это демонстрационная категория" : "Результат предварительный"}: ${flags.join(", ")}.`;
|
||||
const reason = [decisionStatus === "unchanged" ? keptGrade : null, caveat]
|
||||
.filter(Boolean)
|
||||
.join(" ");
|
||||
return {
|
||||
text: `${outcomeLabels.confirmed}: ${specialization}, ${gradeLabels[result.confirmed_grade]}.`,
|
||||
reason: reason === "" ? null : reason,
|
||||
isDemonstration,
|
||||
reason: decisionStatus === "unchanged" ? keptGrade : null,
|
||||
isExpress,
|
||||
};
|
||||
}
|
||||
case "not_confirmed":
|
||||
return {
|
||||
text: `${outcomeLabels.not_confirmed}: ${specialization}, ${gradeLabels[result.target_grade]}.`,
|
||||
reason: keptGrade,
|
||||
isDemonstration,
|
||||
isExpress,
|
||||
};
|
||||
case "not_determined": {
|
||||
const why = result.not_determined_reason
|
||||
@@ -99,7 +83,7 @@ export function assessmentResultSummary(result: AssessmentResult): AssessmentRes
|
||||
return {
|
||||
text: `${outcomeLabels.not_determined}: ${specialization}, ${gradeLabels[result.target_grade]}.`,
|
||||
reason: [why, keptGrade].filter(Boolean).join(" ") || null,
|
||||
isDemonstration,
|
||||
isExpress,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,16 +41,6 @@
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.badges {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--space-2);
|
||||
}
|
||||
|
||||
.badges:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.summary {
|
||||
color: var(--color-text-strong);
|
||||
font-family: var(--font-mono);
|
||||
|
||||
@@ -22,13 +22,14 @@ function render(result: AssessmentResult): string {
|
||||
describe("AssessmentResultView for demo_basic", () => {
|
||||
const html = render(demoBasicAssigned());
|
||||
|
||||
it("shows the category, date, method, and provisional status", () => {
|
||||
it("shows the category, date, and method without a demo or calibration marker", () => {
|
||||
expect(html).toContain("Уровень подтвержден: Backend, Middle.");
|
||||
expect(html).toContain("Backend, Middle (присвоена этим результатом)");
|
||||
expect(html).toContain("8 октября 2026 г. в 09:30 UTC");
|
||||
expect(html).toContain("Базовая проверка по фиксированному набору заданий");
|
||||
expect(html).toContain("Предварительный результат");
|
||||
expect(html).toContain("предварительный, пороги не калибровались");
|
||||
for (const text of ["Предварительный", "Демо", "демонстрацион", "калибр", "Синтетическ"]) {
|
||||
expect(html).not.toContain(text);
|
||||
}
|
||||
});
|
||||
|
||||
it("names the method limitation and shows no estimate rows", () => {
|
||||
@@ -52,7 +53,7 @@ describe("AssessmentResultView for an adaptive result", () => {
|
||||
expect(html).toContain("от −0,19 до 1,03");
|
||||
expect(html).toContain("Базы данных");
|
||||
expect(html).toContain("Доступно с 12 ноября 2026 г. в 10:00 UTC.");
|
||||
expect(html).toContain("остается предварительной оценкой");
|
||||
expect(html).not.toContain("предварительной оценкой");
|
||||
});
|
||||
|
||||
it("draws no estimate and no zeros once the fields are removed", () => {
|
||||
@@ -94,11 +95,10 @@ describe("AssessmentResultView for a failed attempt", () => {
|
||||
describe("AssessmentResultView for an express result", () => {
|
||||
const html = render(expressFixture());
|
||||
|
||||
it("is marked as a demonstration without a grade", () => {
|
||||
expect(html).toContain("Демонстрация без реального грейда");
|
||||
expect(html).toContain(
|
||||
"Демонстрация завершена. Она не подтверждает квалификацию и не присваивает грейд.",
|
||||
);
|
||||
it("is named an express test without a grade", () => {
|
||||
expect(html).toContain("Экспресс-тест без грейда");
|
||||
expect(html).toContain("Экспресс-тест не присваивает грейд.");
|
||||
expect(html).not.toContain("емонстрац");
|
||||
expect(html).toContain("Вы ответили на три учебных задания.");
|
||||
expect(html).toContain("не присваивается");
|
||||
expect(html).not.toContain("Подтвержденный уровень");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useId, type ReactNode } from "react";
|
||||
import type { AssessmentResult } from "../../../shared/api/schemas";
|
||||
import { paths } from "../../../shared/config/paths";
|
||||
import { ButtonLink, Mono, Tag } from "../../../shared/ui";
|
||||
import { ButtonLink, Mono } from "../../../shared/ui";
|
||||
import { describeAssessmentResult } from "../model/result-presentation";
|
||||
import styles from "./assessment-result-view.module.css";
|
||||
|
||||
@@ -33,7 +33,7 @@ function Block({ title, level, children }: BlockProps) {
|
||||
* Stored result of one attempt. Every value is a restatement of a server
|
||||
* field: an absent estimate is not drawn, a lower-grade offer is text and
|
||||
* never a control that changes the category, and an express run is marked as
|
||||
* a demonstration without a grade.
|
||||
* an express test without a grade.
|
||||
*/
|
||||
export function AssessmentResultView({
|
||||
result,
|
||||
@@ -53,23 +53,13 @@ export function AssessmentResultView({
|
||||
<Heading id={titleId} className={styles.title}>
|
||||
{view.title}
|
||||
</Heading>
|
||||
<p className={styles.badges}>
|
||||
{view.isExpress ? <Tag tone="accent">Демонстрация</Tag> : null}
|
||||
{!view.isExpress && view.isProvisional ? (
|
||||
<Tag tone="neutral" dot>
|
||||
Предварительный результат
|
||||
</Tag>
|
||||
) : null}
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<p className={styles.summary}>{view.summary.text}</p>
|
||||
{view.summary.reason ? <p>{view.summary.reason}</p> : null}
|
||||
{view.isExpress ? (
|
||||
<>
|
||||
<p className={styles.demo}>
|
||||
Демонстрация завершена. Она не подтверждает квалификацию и не присваивает грейд.
|
||||
</p>
|
||||
<p className={styles.demo}>Экспресс-тест не присваивает грейд.</p>
|
||||
{view.expressSummary ? <p>{view.expressSummary}</p> : null}
|
||||
</>
|
||||
) : null}
|
||||
@@ -134,12 +124,7 @@ export function AssessmentResultView({
|
||||
</div>
|
||||
) : null}
|
||||
</dl>
|
||||
<p className={styles.note}>
|
||||
Значения даны на шкале специализации.
|
||||
{view.isProvisional
|
||||
? " Пока пороги не откалиброваны, вероятность остается предварительной оценкой, а не измеренной долей."
|
||||
: ""}
|
||||
</p>
|
||||
<p className={styles.note}>Значения даны на шкале специализации.</p>
|
||||
</Block>
|
||||
) : null}
|
||||
{!view.uncertainty && view.strength ? (
|
||||
@@ -177,7 +162,7 @@ export function AssessmentResultView({
|
||||
|
||||
{view.isExpress ? (
|
||||
<Block title="Следующий шаг" level={blockLevel}>
|
||||
<p>Категорию дает только полная проверка. Демонстрация ее не заменяет.</p>
|
||||
<p>Категорию дает только полная проверка.</p>
|
||||
<ButtonLink to={paths.candidate.assessment}>Перейти к полной проверке</ButtonLink>
|
||||
</Block>
|
||||
) : (
|
||||
|
||||
@@ -5,7 +5,6 @@ export {
|
||||
describeAccessOrganization,
|
||||
describePublicationClosure,
|
||||
evidenceBasisLabels,
|
||||
evidenceCalibrationLabels,
|
||||
buildSearchStatusSubmission,
|
||||
buildPublicationSubmission,
|
||||
currentC2State,
|
||||
|
||||
@@ -50,7 +50,7 @@ describe("candidate card presentation", () => {
|
||||
{
|
||||
specialization: "Backend",
|
||||
grade: "Junior",
|
||||
strength: "Демонстрационное подтверждение",
|
||||
strength: "Стандартное подтверждение",
|
||||
},
|
||||
]);
|
||||
expect(result?.selfAssessments).toEqual([
|
||||
@@ -143,8 +143,7 @@ describe("candidate card presentation", () => {
|
||||
trust: "partial",
|
||||
trustLabel: "Онлайн-результат без подтверждения личности",
|
||||
observedYear: 2026,
|
||||
basisLabel: "Синтетическая демонстрация, не проверенное измерение",
|
||||
calibrationLabel: "Пороги не откалиброваны",
|
||||
basisLabel: "Результат теста",
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
@@ -6,7 +6,6 @@ import type {
|
||||
CardSelfAssessment,
|
||||
CandidateExperienceBand,
|
||||
EvidenceBasis,
|
||||
EvidenceCalibrationStatus,
|
||||
EvidenceSkillCode,
|
||||
CandidateSalaryCompatibility,
|
||||
CandidateWorkFormat,
|
||||
@@ -214,7 +213,6 @@ export type EvidencePresentation = {
|
||||
trustLabel: string;
|
||||
observedYear: number;
|
||||
basisLabel: string;
|
||||
calibrationLabel: string;
|
||||
};
|
||||
|
||||
export type CandidateViewPresentation = {
|
||||
@@ -232,9 +230,7 @@ export type CandidateViewPresentation = {
|
||||
evidence: readonly EvidencePresentation[] | null;
|
||||
};
|
||||
|
||||
// A demonstration basis is named as one, never as a standard confirmation.
|
||||
function confirmationLabelOf(category: CardCategory): string {
|
||||
if (category.basis === "synthetic_demo") return "Демонстрационное подтверждение";
|
||||
return category.strength === "strong" ? "Сильное подтверждение" : "Стандартное подтверждение";
|
||||
}
|
||||
|
||||
@@ -278,11 +274,7 @@ const evidenceTrust: Readonly<Record<number, EvidenceTrustView>> = {
|
||||
};
|
||||
|
||||
export const evidenceBasisLabels: Readonly<Record<EvidenceBasis, string>> = {
|
||||
synthetic_demo: "Синтетическая демонстрация, не проверенное измерение",
|
||||
};
|
||||
|
||||
export const evidenceCalibrationLabels: Readonly<Record<EvidenceCalibrationStatus, string>> = {
|
||||
uncalibrated: "Пороги не откалиброваны",
|
||||
synthetic_demo: "Результат теста",
|
||||
};
|
||||
|
||||
function evidencePresentation(fact: OrganizationEvidenceFact): EvidencePresentation {
|
||||
@@ -293,7 +285,6 @@ function evidencePresentation(fact: OrganizationEvidenceFact): EvidencePresentat
|
||||
trustLabel: trust.label,
|
||||
observedYear: fact.observed_year,
|
||||
basisLabel: evidenceBasisLabels[fact.basis],
|
||||
calibrationLabel: evidenceCalibrationLabels[fact.calibration_status],
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ describe("employer card preview", () => {
|
||||
it("states the confirmation of each specialization separately", () => {
|
||||
const markup = render(published());
|
||||
|
||||
expect(markup).toContain("Backend: Middle, демонстрационное подтверждение");
|
||||
expect(markup).toContain("Backend: Middle, стандартное подтверждение");
|
||||
expect(markup.match(/Грейд подтвержден/g)).toHaveLength(1);
|
||||
expect(markup.match(/Грейд не подтвержден/g)).toHaveLength(2);
|
||||
expect(markup).toContain("Заявлено: Junior");
|
||||
@@ -121,13 +121,15 @@ describe("employer card preview", () => {
|
||||
expect(markup).toContain("Для опубликованных категорий нет видимого подтверждающего факта.");
|
||||
});
|
||||
|
||||
it("labels the evidence basis and calibration the way the server states them", () => {
|
||||
it("labels the evidence basis and shows no demo or calibration wording", () => {
|
||||
const markup = render(published());
|
||||
|
||||
expect(markup).toContain("Подтверждающие факты оценки");
|
||||
expect(markup).toContain("Онлайн-результат без подтверждения личности");
|
||||
expect(markup).toContain("Синтетическая демонстрация, не проверенное измерение");
|
||||
expect(markup).toContain("Пороги не откалиброваны");
|
||||
expect(markup).toContain("Результат теста");
|
||||
expect(markup).not.toContain("демонстрац");
|
||||
expect(markup).not.toContain("откалиброван");
|
||||
expect(markup).not.toContain("Калибровка");
|
||||
expect(markup).toContain("2026");
|
||||
});
|
||||
|
||||
|
||||
@@ -37,8 +37,6 @@ function EvidenceItem({ item }: { item: EvidencePresentation }) {
|
||||
<dd>{item.observedYear}</dd>
|
||||
<dt>Основа</dt>
|
||||
<dd>{item.basisLabel}</dd>
|
||||
<dt>Калибровка</dt>
|
||||
<dd>{item.calibrationLabel}</dd>
|
||||
</dl>
|
||||
</li>
|
||||
);
|
||||
|
||||
@@ -40,7 +40,7 @@ export function presentCard(card: AnonymousCardContent): CardDetails {
|
||||
card.categories?.map((category) => ({
|
||||
specialization: specializationLabels[category.specialization],
|
||||
grade: gradeLabels[category.grade],
|
||||
strength: confirmationLabel(category.basis, category.strength),
|
||||
strength: confirmationLabel(category.strength),
|
||||
})) ?? null,
|
||||
selfAssessments:
|
||||
card.self_assessment?.map((item) => ({
|
||||
@@ -63,7 +63,6 @@ export type EvidenceFact = {
|
||||
trustLabel: string;
|
||||
observedYear: number;
|
||||
basisLabel: string;
|
||||
calibrationLabel: string;
|
||||
};
|
||||
|
||||
const skillLabels: Readonly<Record<EvidenceSkillCode, string>> = {
|
||||
@@ -78,7 +77,7 @@ const trustViews: Readonly<Record<number, { level: TrustLevelValue; label: strin
|
||||
3: { level: "confirmed", label: "Очная проверка" },
|
||||
};
|
||||
|
||||
/** Facts of the evidence section as the server lists them, with its basis and calibration. */
|
||||
/** Facts of the evidence section as the server lists them, with its basis. */
|
||||
export function presentEvidence(evidence: OrganizationEvidence): EvidenceFact[] {
|
||||
return evidence.items.map((fact) => {
|
||||
const trust = trustViews[fact.trust] ?? trustViews[0]!;
|
||||
@@ -87,8 +86,7 @@ export function presentEvidence(evidence: OrganizationEvidence): EvidenceFact[]
|
||||
trust: trust.level,
|
||||
trustLabel: trust.label,
|
||||
observedYear: fact.observed_year,
|
||||
basisLabel: "Синтетическая демонстрация, не проверенное измерение",
|
||||
calibrationLabel: "Пороги не откалиброваны",
|
||||
basisLabel: "Результат теста",
|
||||
};
|
||||
});
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
import type {
|
||||
CandidateExperienceBand,
|
||||
CandidateSalaryCompatibility,
|
||||
EvidenceBasis,
|
||||
GradeCode,
|
||||
MatchEvidenceCode,
|
||||
MatchEvidenceState,
|
||||
@@ -77,12 +76,10 @@ export const strengthLabels: Readonly<Record<MatchStrength, string>> = {
|
||||
};
|
||||
|
||||
/**
|
||||
* Words for how a confirmed category was established. A demonstration basis is
|
||||
* named as one, because it is not a measurement and never a standard
|
||||
* confirmation; only a category with another basis gets its strength label.
|
||||
* Words for how a confirmed category was established. Every test basis reads
|
||||
* as the strength label of the confirmation.
|
||||
*/
|
||||
export function confirmationLabel(basis: EvidenceBasis, strength: MatchStrength): string {
|
||||
if (basis === "synthetic_demo") return "Демонстрационное подтверждение";
|
||||
export function confirmationLabel(strength: MatchStrength): string {
|
||||
return strengthLabels[strength];
|
||||
}
|
||||
|
||||
|
||||
@@ -181,8 +181,6 @@ export function CandidateCardDetails({
|
||||
<dd>{fact.observedYear}</dd>
|
||||
<dt>Основа</dt>
|
||||
<dd>{fact.basisLabel}</dd>
|
||||
<dt>Калибровка</dt>
|
||||
<dd>{fact.calibrationLabel}</dd>
|
||||
</dl>
|
||||
</li>
|
||||
))}
|
||||
|
||||
@@ -132,7 +132,7 @@ export function MatchCardView({
|
||||
<dt>Подтвержденная категория</dt>
|
||||
<dd>
|
||||
{card.category && card.strength
|
||||
? `${specializationLabels[card.category.specialization]}, ${gradeLabels[card.category.grade]}. ${confirmationLabel(card.category.basis, card.strength)}`
|
||||
? `${specializationLabels[card.category.specialization]}, ${gradeLabels[card.category.grade]}. ${confirmationLabel(card.strength)}`
|
||||
: "Нет"}
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
@@ -49,8 +49,8 @@ export function SignalNoticeContent({ headingLevel }: ContentProps) {
|
||||
Адреса и токены сессий не хранятся: для них есть только односторонние отпечатки. Во время
|
||||
теста сбор ничего не показывает и не блокирует: ввод, вставка и отправка ответов работают
|
||||
как обычно. Браузерные сигналы легко исказить, а ложные срабатывания возможны, например при
|
||||
случайном переключении окна, поэтому это только подсказка. Демонстрационный запуск сигналы
|
||||
не собирает.
|
||||
случайном переключении окна, поэтому это только подсказка. Экспресс-тест сигналы не
|
||||
собирает.
|
||||
</p>
|
||||
<p>
|
||||
Подтверждение хранится на сервере. Оно не заменяет согласие C3, которое управляется отдельно
|
||||
|
||||
@@ -74,12 +74,12 @@ function isTerminal(attempt: AssessmentAttempt): boolean {
|
||||
}
|
||||
|
||||
function attemptName(attempt: AssessmentAttempt): string {
|
||||
if (attempt.kind === "demo_express") return "Демонстрационный экспресс-запуск";
|
||||
if (attempt.kind === "demo_express") return "Экспресс-тест";
|
||||
return `${attempt.specialization ? specializationLabels[attempt.specialization] : "Проверка"} - ${attempt.target_grade ? gradeLabels[attempt.target_grade] : ""}`;
|
||||
}
|
||||
|
||||
function attemptTag(attempt: AssessmentAttempt): string {
|
||||
if (attempt.kind === "demo_express") return "Демонстрация";
|
||||
if (attempt.kind === "demo_express") return "Экспресс-тест";
|
||||
const parts = [
|
||||
attempt.specialization ? specializationLabels[attempt.specialization] : "Проверка",
|
||||
attempt.target_grade ? gradeLabels[attempt.target_grade] : null,
|
||||
@@ -562,12 +562,8 @@ function AssessmentAttemptContent({ attemptId }: { attemptId: string }) {
|
||||
|
||||
return (
|
||||
<Page
|
||||
title={attempt.kind === "demo_express" ? "Демонстрационная проверка" : "Полная проверка"}
|
||||
lead={
|
||||
attempt.kind === "demo_express"
|
||||
? "Учебный режим на 3-5 минут. Он не подтверждает квалификацию и не присваивает грейд."
|
||||
: undefined
|
||||
}
|
||||
title={attempt.kind === "demo_express" ? "Экспресс-тест" : "Полная проверка"}
|
||||
lead={attempt.kind === "demo_express" ? "Учебный режим на 3-5 минут." : undefined}
|
||||
width="wide"
|
||||
>
|
||||
<div className={attemptStyles.layout}>
|
||||
@@ -603,7 +599,7 @@ function AssessmentAttemptContent({ attemptId }: { attemptId: string }) {
|
||||
) : null}
|
||||
|
||||
{resumedExpress && attempt.kind === "demo_express" && !terminal ? (
|
||||
<Notice tone="info" title="Незавершенная демонстрация продолжена">
|
||||
<Notice tone="info" title="Незавершенный экспресс-тест продолжен">
|
||||
<p>
|
||||
Это тот же запуск: время идет с момента его начала, ответы сохранены на сервере.
|
||||
</p>
|
||||
|
||||
@@ -433,18 +433,18 @@ export function AssessmentPage() {
|
||||
if (error instanceof ExpressRunElsewhereError) {
|
||||
setPendingCreate(null);
|
||||
setExpressNote(
|
||||
"Незавершенная демонстрация открыта в другой вкладке или браузере. Продолжите ее там или подождите: она закончится сама не позже чем через 5 минут после начала.",
|
||||
"Незавершенный экспресс-тест открыт в другой вкладке или браузере. Продолжите его там или подождите: он закончится сам не позже чем через 5 минут после начала.",
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (isOutcomeAmbiguous(error)) {
|
||||
setExpressNote(
|
||||
"Не удалось подтвердить начало демонстрации. Повторная отправка использует тот же ключ.",
|
||||
"Не удалось подтвердить начало экспресс-теста. Повторная отправка использует тот же ключ.",
|
||||
);
|
||||
return;
|
||||
}
|
||||
setPendingCreate(null);
|
||||
setExpressNote("Сервер не начал демонстрацию. Обновите страницу и повторите действие.");
|
||||
setExpressNote("Сервер не начал экспресс-тест. Обновите страницу и повторите действие.");
|
||||
} finally {
|
||||
requestInFlight.current = false;
|
||||
setCreateBusy(false);
|
||||
@@ -641,14 +641,13 @@ export function AssessmentPage() {
|
||||
<Card tone="raised" className={styles.express}>
|
||||
<p className={styles.kicker}>Учебный режим</p>
|
||||
<h2 id="assessment-express-title" className={styles["block-title"]}>
|
||||
Демонстрационный экспресс-запуск
|
||||
Экспресс-тест
|
||||
</h2>
|
||||
<p className={styles.duration}>
|
||||
<Mono strong>3-5</Mono> <span>минут</span>
|
||||
</p>
|
||||
<p className={styles["block-lead"]}>
|
||||
Это демонстрация на 3-5 минут. Она не подтверждает квалификацию, не присваивает грейд
|
||||
и не влияет на доступность полной проверки.
|
||||
Экспресс-тест не присваивает грейд и не влияет на доступность полной проверки.
|
||||
</p>
|
||||
<p className={styles["express-note"]}>
|
||||
Незавершенный запуск этой вкладки продолжается той же кнопкой.
|
||||
@@ -661,8 +660,8 @@ export function AssessmentPage() {
|
||||
{createBusy
|
||||
? "Создаем запуск..."
|
||||
: pendingCreate?.body.kind === "demo_express"
|
||||
? "Повторить начало демонстрации"
|
||||
: "Начать демонстрацию"}
|
||||
? "Повторить начало экспресс-теста"
|
||||
: "Пройти экспресс-тест"}
|
||||
</Button>
|
||||
{expressNote ? (
|
||||
<div role="status">
|
||||
|
||||
@@ -35,11 +35,11 @@ export const guideRoles: readonly GuideRole[] = [
|
||||
link: { label: "Открыть вход", to: paths.login },
|
||||
},
|
||||
{
|
||||
text: "На странице проверки нажмите «Начать демонстрацию». Экспресс-запуск занимает 3-5 минут и состоит из трех заданий. Итог не присваивает уровень: на экране есть пометка «Демонстрация без реального грейда», а результат не попадает в историю реальных проверок.",
|
||||
text: "На странице проверки нажмите «Пройти экспресс-тест». Он занимает 3-5 минут и состоит из трех заданий. Итог не присваивает уровень и не попадает в историю результатов.",
|
||||
link: { label: "Открыть проверку знаний", to: paths.candidate.assessment },
|
||||
},
|
||||
{
|
||||
text: "На той же странице посмотрите полную проверку Backend, Junior, Go: 25 заданий, срок 72 часа, без практики. Кнопка «Начать полную проверку» видна, но ее можно не нажимать: запуск создает попытку на стенде.",
|
||||
text: "На той же странице посмотрите полную проверку Backend, Junior, Go: 25 заданий, срок 72 часа, без практики. Кнопка «Начать полную проверку» видна, но ее можно не нажимать: запуск создает попытку.",
|
||||
link: { label: "Открыть полную проверку", to: paths.candidate.assessment },
|
||||
},
|
||||
],
|
||||
@@ -49,15 +49,15 @@ export const guideRoles: readonly GuideRole[] = [
|
||||
account: `prepared-1@${demoAccountDomain}`,
|
||||
steps: [
|
||||
{
|
||||
text: "Войдите как prepared-1. В профиле нет ФСП ID: профиль заполнен вручную, а строка опыта помечена как синтетический профиль.",
|
||||
text: "Войдите как prepared-1. В профиле нет ФСП ID: профиль заполнен вручную.",
|
||||
link: { label: "Открыть профиль", to: paths.candidate.profile },
|
||||
},
|
||||
{
|
||||
text: "В результатах полный тест Backend, Junior, Go уже пройден. Категория помечена как демонстрационная: происхождение решения - синтетическая демонстрация стенда, пороги не калиброваны.",
|
||||
text: "В результатах полный тест Backend, Junior, Go уже пройден: категория подтверждена тестом.",
|
||||
link: { label: "Открыть результаты", to: paths.candidate.results },
|
||||
},
|
||||
{
|
||||
text: "В настройках приватности карточка опубликована. Предпросмотр показывает доказательство навыка с пометкой «Демонстрационное подтверждение».",
|
||||
text: "В настройках приватности карточка опубликована. Предпросмотр показывает подтвержденную категорию и факт оценки.",
|
||||
link: { label: "Открыть настройки приватности", to: paths.candidate.privacy },
|
||||
},
|
||||
],
|
||||
@@ -113,7 +113,7 @@ export const guideAccounts: readonly GuideAccount[] = [
|
||||
{
|
||||
login: `candidate@${demoAccountDomain}`,
|
||||
role: "Кандидат без попыток",
|
||||
purpose: "Экспресс-запуск и полная проверка",
|
||||
purpose: "Экспресс-тест и полная проверка",
|
||||
},
|
||||
{
|
||||
login: `prepared-1@${demoAccountDomain} - prepared-6@${demoAccountDomain}`,
|
||||
@@ -132,16 +132,6 @@ export const guideAccounts: readonly GuideAccount[] = [
|
||||
},
|
||||
];
|
||||
|
||||
/** Items that only simulate the product; each one is named as a simulation. */
|
||||
export const demonstrationItems: readonly string[] = [
|
||||
"Все люди на стенде синтетические: кандидаты, компании и их описания вымышлены. Адреса на домене demo.lincodex.test никогда не получают почту.",
|
||||
"Подготовленные полные результаты созданы командой demo-seed обычными операциями попытки. Ответы выбраны заранее, а проходила их команда стенда, а не кандидат.",
|
||||
"Категория «Демонстрационное подтверждение» (источник synthetic_demo) не калибрована и не измеряет навык. Банк заданий синтетический и предметной проверки не проходил.",
|
||||
"Экспресс-запуск показывает механику проверки. Он не присваивает грейд, не создает категорию и не дает доказательства навыка.",
|
||||
"ML на стенде не вызывается: смысловая близость нейтральна (0,50), а карточки помечены «смысловой анализ недоступен». ФСП не подключен ни в каком режиме, профиль заполняется вручную.",
|
||||
"На стенде нет видеоматериалов: экран показывает работающий интерфейс на синтетических данных, а не запись.",
|
||||
];
|
||||
|
||||
/** Behaviour that is real code on the stand, not a simulation. */
|
||||
export const workingItems: readonly string[] = [
|
||||
"Регистрация, вход, согласия C1-C5, профиль, анкета, настройки приватности и обращения в поддержку работают как в рабочей сборке.",
|
||||
|
||||
@@ -17,12 +17,12 @@ function hrefs(html: string): string[] {
|
||||
}
|
||||
|
||||
describe("jury guide page", () => {
|
||||
it("renders one heading with the demonstration eyebrow and the memo title", () => {
|
||||
it("renders one heading with the jury eyebrow and the memo title", () => {
|
||||
const html = render();
|
||||
|
||||
expect(html.match(/<h1[\s>]/g)?.length).toBe(1);
|
||||
expect(html).toMatch(/<h1[^>]*>Гид для жюри<\/h1>/);
|
||||
expect(html).toContain("Демонстрационный стенд");
|
||||
expect(html).toContain("Маршрут для жюри");
|
||||
});
|
||||
|
||||
it("explains the product in the first section", () => {
|
||||
@@ -32,18 +32,13 @@ describe("jury guide page", () => {
|
||||
expect(html).toContain("Заявленный уровень в анкете остается самооценкой");
|
||||
});
|
||||
|
||||
it("separates the demonstration simulations from the working functionality", () => {
|
||||
it("lists what works without simulation and carries no demonstration wording", () => {
|
||||
const html = render();
|
||||
const simulations = html.indexOf("Что здесь демонстрационное");
|
||||
const working = html.indexOf("Что работает без имитации");
|
||||
|
||||
expect(simulations).toBeGreaterThan(0);
|
||||
expect(working).toBeGreaterThan(simulations);
|
||||
expect(html).toContain("синтетические");
|
||||
expect(html).toContain("не калибрована");
|
||||
expect(html).toContain("смысловой анализ недоступен");
|
||||
expect(html).toContain("ФСП не подключен");
|
||||
expect(html).toContain("Экспресс-запуск показывает механику проверки");
|
||||
expect(html).toContain("Что работает без имитации");
|
||||
expect(html).not.toContain("Что здесь демонстрационное");
|
||||
expect(html).not.toContain("Демонстрационн");
|
||||
expect(html).not.toContain("демонстрационн");
|
||||
});
|
||||
|
||||
it("numbers the route across the role blocks in one continuous sequence", () => {
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
import { Card, Page, Section, TextLink } from "../../../shared/ui";
|
||||
import {
|
||||
demonstrationItems,
|
||||
guideAccounts,
|
||||
guideLimits,
|
||||
guideRoles,
|
||||
workingItems,
|
||||
} from "../model/guide";
|
||||
import { guideAccounts, guideLimits, guideRoles, workingItems } from "../model/guide";
|
||||
import styles from "./jury-guide-page.module.css";
|
||||
|
||||
/** Step numbers run on across the role blocks, so the whole route reads as eight to thirteen steps. */
|
||||
@@ -20,10 +14,10 @@ function firstStepNumbers(): number[] {
|
||||
}
|
||||
|
||||
/**
|
||||
* Memo for a jury member who opens the isolated demonstration stand without a
|
||||
* briefing. It lists the route with the screens to open, the accounts, and the
|
||||
* parts of the stand that are simulations. The route is shown only in a demo
|
||||
* build (see routes), so nothing here reaches a production build.
|
||||
* Memo for a jury member who opens the isolated stand without a briefing. It
|
||||
* lists the route with the screens to open, the accounts, and what works on
|
||||
* the stand. The route is shown only in a demo build (see routes), so nothing
|
||||
* here reaches a production build.
|
||||
*/
|
||||
export function JuryGuidePage() {
|
||||
const starts = firstStepNumbers();
|
||||
@@ -31,8 +25,8 @@ export function JuryGuidePage() {
|
||||
return (
|
||||
<Page
|
||||
title="Гид для жюри"
|
||||
eyebrow="Демонстрационный стенд"
|
||||
lead="Короткий маршрут на синтетических данных: около восьми минут и две роли. Сначала прочитайте раздел «Что здесь демонстрационное»: он отделяет имитации от работающего функционала."
|
||||
eyebrow="Маршрут для жюри"
|
||||
lead="Короткий маршрут по продукту: около восьми минут и две роли."
|
||||
width="wide"
|
||||
>
|
||||
<Section title="Что такое Lincodex">
|
||||
@@ -69,17 +63,6 @@ export function JuryGuidePage() {
|
||||
</ol>
|
||||
</Section>
|
||||
|
||||
<Section
|
||||
title="Что здесь демонстрационное"
|
||||
description="Имитации и подготовленные данные. Они показывают механику, но не измеряют навык человека."
|
||||
>
|
||||
<ul className={styles.list}>
|
||||
{demonstrationItems.map((item) => (
|
||||
<li key={item}>{item}</li>
|
||||
))}
|
||||
</ul>
|
||||
</Section>
|
||||
|
||||
<Section title="Что работает без имитации">
|
||||
<ul className={styles.list}>
|
||||
{workingItems.map((item) => (
|
||||
|
||||
@@ -15,7 +15,7 @@ const cabinets = [
|
||||
summary: "Профиль и анкета, тест на подтверждение уровня, результаты и настройки видимости.",
|
||||
features: [
|
||||
"Заявленный уровень из анкеты показан отдельно от подтвержденной категории.",
|
||||
"Категория появляется только по результату теста. Демонстрационный результат помечен как демонстрационный.",
|
||||
"Категория появляется только по результату теста.",
|
||||
"Приглашения компаний: условия, принятие с выбором контактов и отказ.",
|
||||
"Согласия, публикация карточки, статус поиска, уведомления и обращения в поддержку.",
|
||||
],
|
||||
@@ -91,8 +91,7 @@ export function WelcomePage({ demoStand = false }: { demoStand?: boolean }) {
|
||||
Для жюри
|
||||
</h2>
|
||||
<p className={styles["jury-text"]}>
|
||||
Этот стенд показывает продукт на синтетических данных. Гид описывает маршрут на восемь
|
||||
минут двумя ролями и отделяет имитации от работающего функционала.
|
||||
Гид описывает маршрут по продукту на восемь минут двумя ролями.
|
||||
</p>
|
||||
<div>
|
||||
<ButtonLink to={paths.demoGuide} variant="secondary">
|
||||
|
||||
@@ -101,7 +101,7 @@ describe("AssessmentHistory", () => {
|
||||
expect(html).toContain("Backend, Middle");
|
||||
expect(html).toContain(`href="${paths.candidate.result(firstId)}"`);
|
||||
expect(html).toContain(`href="${paths.candidate.result(secondId)}"`);
|
||||
expect(html).toContain("Демонстрационные запуски сюда не попадают");
|
||||
expect(html).toContain("Экспресс-тест сюда не попадает и категорию не меняет");
|
||||
expect(html).not.toContain("Показать еще");
|
||||
});
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ export function AssessmentHistory({ actor, queryClient }: AssessmentHistoryProps
|
||||
return (
|
||||
<EmptyState
|
||||
title="Результатов пока нет"
|
||||
description="Здесь появятся завершенные реальные проверки. Демонстрационные запуски в историю не входят."
|
||||
description="Здесь появятся завершенные проверки."
|
||||
action={<ButtonLink to={paths.candidate.assessment}>К проверкам</ButtonLink>}
|
||||
/>
|
||||
);
|
||||
@@ -113,8 +113,7 @@ export function AssessmentHistory({ actor, queryClient }: AssessmentHistoryProps
|
||||
return (
|
||||
<div className={styles.root}>
|
||||
<p className={styles.note}>
|
||||
В истории только завершенные реальные проверки. Демонстрационные запуски сюда не попадают и
|
||||
категорию не меняют.
|
||||
В истории только завершенные проверки. Экспресс-тест сюда не попадает и категорию не меняет.
|
||||
</p>
|
||||
{history.isRefetchError && !history.isFetchNextPageError ? (
|
||||
<ErrorState
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
export { DemoStandBanner } from "./ui/demo-stand-banner";
|
||||
@@ -1,32 +0,0 @@
|
||||
/* A slim strip above the header: the red dot is the design system's "live"
|
||||
* marker; the bold label states the meaning in words. */
|
||||
.banner {
|
||||
padding: var(--space-2) var(--gutter);
|
||||
border-bottom: var(--line-thin) solid var(--color-divider);
|
||||
color: var(--color-text-secondary);
|
||||
font-size: var(--font-size-xs);
|
||||
line-height: var(--line-height-snug);
|
||||
background: var(--color-surface);
|
||||
}
|
||||
|
||||
.banner p {
|
||||
max-width: var(--content-width-wide);
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.label {
|
||||
color: var(--color-text-strong);
|
||||
font-family: var(--font-mono);
|
||||
font-weight: var(--font-weight-medium);
|
||||
}
|
||||
|
||||
.label::before {
|
||||
display: inline-block;
|
||||
width: 0.5rem;
|
||||
height: 0.5rem;
|
||||
margin-right: var(--space-2);
|
||||
border-radius: 50%;
|
||||
content: "";
|
||||
background: var(--color-attention);
|
||||
vertical-align: 0.05em;
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
import styles from "./demo-stand-banner.module.css";
|
||||
|
||||
/**
|
||||
* Marks every page of the demonstration stand: the data is synthetic and the
|
||||
* results are prepared for showing, not measured. It is rendered only by a
|
||||
* demo build (see app routes), and it has no link, so the first link of a
|
||||
* page stays the skip link.
|
||||
*/
|
||||
export function DemoStandBanner() {
|
||||
return (
|
||||
<aside className={styles.banner} aria-label="Статус стенда">
|
||||
<p>
|
||||
<strong className={styles.label}>Демонстрационный стенд.</strong> Все данные синтетические,
|
||||
подготовленные результаты не подтверждают квалификацию. Гид для жюри есть на главной
|
||||
странице.
|
||||
</p>
|
||||
</aside>
|
||||
);
|
||||
}
|
||||
@@ -52,7 +52,7 @@ describe("match list", () => {
|
||||
expect(html).toContain("Подтвержденная категория");
|
||||
expect(html).toContain("Заявленный кандидатом грейд");
|
||||
expect(html).toContain("Грейд подтвержден: Middle");
|
||||
expect(html).toContain("Backend, Middle. Демонстрационное подтверждение");
|
||||
expect(html).toContain("Backend, Middle. Сильное подтверждение");
|
||||
});
|
||||
|
||||
it("offers a specialization switch when the result holds several specializations", () => {
|
||||
|
||||
Reference in new issue
Block a user