feat(invitations): add the candidate invitation inbox with C4 acceptance and decline

This commit is contained in:
shira committed 2026-10-09 20:30:35 +03:00
1 parent 12a7213d4a
commit a856066316
54 files changed
+3897 -136

No files matched your search

+15 -3
View File
@@ -289,8 +289,20 @@ describe("product readiness", () => {
});
it("labels the remaining cabinet scaffolds as placeholders", async () => {
for (const path of ["/candidate/invitations", "/employer/invitations"]) {
expect(await renderHtml(path)).toContain("Экран будет реализован в одной из следующих задач");
}
expect(await renderHtml("/employer/invitations")).toContain(
"Экран будет реализован в одной из следующих задач",
);
});
it("routes the candidate inbox and one invitation to their own screens, not placeholders", async () => {
const inbox = await renderHtml("/candidate/invitations");
expect(inbox).toMatch(/<h1[^>]*>Приглашения<\/h1>/);
expect(inbox).not.toContain("Экран будет реализован в одной из следующих задач");
const detail = await renderHtml(
`/candidate/invitations/${"0".repeat(8)}-0000-4000-8000-000000000000`,
);
expect(detail).toContain("Открываем приглашение...");
expect(detail).not.toContain("Экран будет реализован в одной из следующих задач");
});
});
+7 -2
View File
@@ -2,6 +2,10 @@ import { redirect, type RouteObject } from "react-router-dom";
import { AssessmentAttemptPage, AssessmentPage } from "../../pages/assessment";
import { AssessmentResultPage, AssessmentResultsPage } from "../../pages/assessment-result";
import { LoginPage, RegisterPage, VerifyEmailPage } from "../../pages/auth";
import {
CandidateInvitationPage,
CandidateInvitationsPage,
} from "../../pages/candidate-invitations";
import { CandidateOnboardingPage } from "../../pages/candidate-onboarding";
import { CompanyPage } from "../../pages/company";
import { PrivacyPage } from "../../pages/privacy";
@@ -80,9 +84,10 @@ export const routes: RouteObject[] = [
},
{ path: paths.candidate.results, element: <AssessmentResultsPage /> },
{ path: `${paths.candidate.results}/:attemptId`, element: <AssessmentResultPage /> },
{ path: paths.candidate.invitations, element: <CandidateInvitationsPage /> },
{
path: paths.candidate.invitations,
element: <PlaceholderPage screen="candidateInvitations" />,
path: `${paths.candidate.invitations}/:invitationId`,
element: <CandidateInvitationPage />,
},
{ path: paths.candidate.notifications, element: <CandidateNotificationsPage /> },
{