feat(candidate): add the candidate home, results and result history screens
This commit is contained in:
1 parent
8277133712
commit
4761508f13
52 files changed
+5334
-81
No files matched your search
@@ -50,10 +50,22 @@ describe("assessmentResultSummary", () => {
|
||||
}),
|
||||
);
|
||||
expect(summary.text).toBe("Уровень подтвержден: Backend, Middle.");
|
||||
expect(summary.reason).toBe("Это демонстрационная категория: пороги не калибровались.");
|
||||
expect(summary.isDemonstration).toBe(false);
|
||||
});
|
||||
|
||||
it("names the demonstration bank only when the server lists it", () => {
|
||||
const summary = assessmentResultSummary(
|
||||
result({
|
||||
outcome: "confirmed",
|
||||
confirmed_grade: "middle",
|
||||
limitations: ["demo_bank"],
|
||||
category_decision: decision("assigned", { current_confirmed_grade: "middle" }),
|
||||
}),
|
||||
);
|
||||
expect(summary.reason).toBe(
|
||||
"Это демонстрационная категория: пороги не калибровались, банк заданий демонстрационный.",
|
||||
);
|
||||
expect(summary.isDemonstration).toBe(false);
|
||||
});
|
||||
|
||||
it("keeps the higher grade when a reviewed result does not change the category", () => {
|
||||
@@ -70,7 +82,7 @@ describe("assessmentResultSummary", () => {
|
||||
);
|
||||
expect(summary.text).toBe("Уровень подтвержден: Backend, Middle.");
|
||||
expect(summary.reason).toBe(
|
||||
"Прежний подтвержденный уровень Senior сохраняется. Это демонстрационная категория: пороги не калибровались, банк заданий демонстрационный.",
|
||||
"Прежний подтвержденный уровень Senior сохраняется. Это демонстрационная категория: пороги не калибровались.",
|
||||
);
|
||||
});
|
||||
|
||||
@@ -90,6 +102,36 @@ 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("демонстрационн");
|
||||
|
||||
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",
|
||||
}),
|
||||
}),
|
||||
);
|
||||
expect(withBank.reason).toBe("Результат предварительный: банк заданий демонстрационный.");
|
||||
});
|
||||
|
||||
it("says that the threshold was reached but no category was assigned", () => {
|
||||
const summary = assessmentResultSummary(
|
||||
result({
|
||||
|
||||
Reference in new issue
Block a user