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
@@ -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();
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user