fix(assessment): return confirmed categories with their basis and label demonstration categories
This commit is contained in:
1 parent
623d41b969
commit
d4903a3796
77 files changed
+1441
-288
No files matched your search
@@ -327,7 +327,10 @@ function scenarioAnswer(scenario: Scenario, pathname: string): Stub {
|
||||
};
|
||||
case "/api/v1/me/profile":
|
||||
// The home reads only the version; the profile form is not opened here.
|
||||
return { status: 200, body: { version: scenario.profileVersion ?? 0 } };
|
||||
return {
|
||||
status: 200,
|
||||
body: { version: scenario.profileVersion ?? 0, confirmed_categories: [] },
|
||||
};
|
||||
case "/api/v1/me/questionnaire":
|
||||
return {
|
||||
status: 200,
|
||||
@@ -357,6 +360,7 @@ function scenarioAnswer(scenario: Scenario, pathname: string): Stub {
|
||||
{
|
||||
specialization: declared.specialization,
|
||||
confirmed_grade: scenario.confirmed ?? null,
|
||||
confirmed_basis: scenario.confirmed ? "synthetic_demo" : null,
|
||||
active_attempt_id: null,
|
||||
grades: [
|
||||
{
|
||||
@@ -438,13 +442,14 @@ test.describe("candidate home states with a stubbed API", () => {
|
||||
await captureReviewScreenshots(page, "candidate-home-category");
|
||||
});
|
||||
|
||||
test("states one confirmed category in every block when the availability read has none", async ({
|
||||
test("states one confirmed category in every block when the availability confirms it", async ({
|
||||
page,
|
||||
}) => {
|
||||
await mockCandidateApi(page, {
|
||||
step: "candidate_consents",
|
||||
profileVersion: 1,
|
||||
declared: { specialization: "backend", grade: "junior" },
|
||||
confirmed: "junior",
|
||||
results: [realResult("confirmed")],
|
||||
});
|
||||
await page.goto("/candidate");
|
||||
|
||||
Reference in new issue
Block a user