feat(frontend): complete candidate flow and public pages

This commit is contained in:
TakuyaYagam1 committed 2026-10-11 22:37:07 +03:00
1 parent a69b1a79bb
commit e4be4a3956
63 files changed
+1903 -746

No files matched your search

@@ -35,6 +35,18 @@ describe("demonstration stand routes", () => {
expect(production).not.toContain('href="/demo"');
});
it("shows synthetic-data notes on legal pages only on a demo stand", async () => {
const demoTerms = await renderPath("/terms", true);
const productionTerms = await renderPath("/terms", false);
const demoPrivacy = await renderPath("/privacy", true);
const productionPrivacy = await renderPath("/privacy", false);
expect(demoTerms).toContain("синтетические данные");
expect(productionTerms).not.toContain("синтетические данные");
expect(demoPrivacy).toContain("синтетические данные");
expect(productionPrivacy).not.toContain("синтетические данные");
});
it("keeps the skip link as the first link of a demo page", async () => {
const html = await renderPath("/", true);
const firstLink = html.match(/<a[^>]*>(.*?)<\/a>/);
+10 -1
View File
@@ -150,6 +150,8 @@ describe("route groups", () => {
["/register", "Регистрация", "Публичные разделы"],
["/verify-email", "Подтверждение почты", "Публичные разделы"],
["/support", "Поддержка", "Публичные разделы"],
["/terms", "Условия использования", "Публичные разделы"],
["/privacy", "Конфиденциальность", "Публичные разделы"],
["/candidate", "Главная", "Разделы кабинета кандидата"],
["/candidate/profile", "Профиль", "Разделы кабинета кандидата"],
["/candidate/questionnaire", "Анкета", "Разделы кабинета кандидата"],
@@ -196,6 +198,13 @@ describe("route groups", () => {
}
});
it("links to the public terms and privacy pages from the footer", async () => {
const html = await renderHtml("/");
expect(html).toMatch(/<a[^>]*href="\/terms"[^>]*>Условия использования<\/a>/);
expect(html).toMatch(/<a[^>]*href="\/privacy"[^>]*>Конфиденциальность<\/a>/);
});
it("marks the active cabinet section with aria-current", async () => {
expect(currentLinkText(await renderHtml("/candidate"))).toEqual(["Главная"]);
// The results are a sub-section of the test: the switch segment is the
@@ -256,7 +265,7 @@ describe("product readiness", () => {
expect(html).toContain("Регистрация, вход и основные сценарии кабинетов уже работают");
expect(html).not.toContain("каркас");
expect(html).not.toContain("Пустой каркас");
expect(html).toContain("Пока не готово");
expect(html).toContain("Список доступен в кабинете работодателя");
expect(html).toMatch(/<a[^>]*href="\/login"[^>]*>Войти<\/a>/);
expect(html).toMatch(/<a[^>]*href="\/register"[^>]*>Зарегистрироваться<\/a>/);
// The API liveness check lives on the technical page, not on the landing.
+4 -1
View File
@@ -9,7 +9,8 @@ import {
import { CandidateOnboardingPage } from "../../pages/candidate-onboarding";
import { CompanyPage } from "../../pages/company";
import { EmployerInvitationsPage } from "../../pages/employer-invitations";
import { PrivacyPage } from "../../pages/privacy";
import { PrivacyPage, PublicPrivacyPage } from "../../pages/privacy";
import { TermsPage } from "../../pages/terms";
import { SessionGate } from "../../entities/session";
import { MatchesPage } from "../../pages/matches";
import { InvitationComposePage } from "../../pages/invitation-compose";
@@ -58,6 +59,8 @@ export function createRoutes(stand: StandMode = standMode): RouteObject[] {
{ path: paths.verifyEmail, element: <VerifyEmailPage /> },
{ path: paths.support, element: <SupportRoute /> },
{ path: paths.status, element: <StatusPage /> },
{ path: paths.terms, element: <TermsPage demoStand={stand.demo} /> },
{ path: paths.privacy, element: <PublicPrivacyPage demoStand={stand.demo} /> },
...(stand.demo ? [{ path: paths.demoGuide, element: <JuryGuidePage /> }] : []),
{ path: "*", element: <NotFoundPage /> },
],