Fix result display

This commit is contained in:
Christian Cueni 2023-10-09 11:10:07 +02:00
parent 56bfb71b35
commit bb50cc60e9
3 changed files with 9 additions and 10 deletions

View File

@ -176,19 +176,19 @@ async function startTest() {
$t("assignment.von x Punkten", { $t("assignment.von x Punkten", {
x: assignmentCompletion.evaluation_max_points, x: assignmentCompletion.evaluation_max_points,
}) })
}}, }}
{{ ({{
( (
((assignmentCompletion.evaluation_points ?? 0) / ((assignmentCompletion.evaluation_points ?? 0) /
(assignmentCompletion.evaluation_max_points ?? 1)) * (assignmentCompletion.evaluation_max_points ?? 1)) *
100 100
).toFixed(0) ).toFixed(0)
}}%, }}%)
<span v-if="assignmentCompletion.evaluation_passed"> <span
({{ $t("a.Bestanden") }}) v-if="!assignmentCompletion.evaluation_passed"
</span> class="rounded bg-error-red-200 px-2 py-1 text-sm"
<span v-else class="text-error-red-500"> >
({{ $t("a.Nicht Bestanden") }}) {{ $t("a.Nicht Bestanden") }}
</span> </span>
</div> </div>

View File

@ -99,8 +99,7 @@ describe("competenceCertificate.cy.js", () => {
).click(); ).click();
cy.get('[data-cy="test-result"]') cy.get('[data-cy="test-result"]')
.should("contain", "19 von 24 Punkten") .should("contain", "19 von 24 Punkten")
.and("contain", "79%") .and("contain", "79%");
.and("contain", "Bestanden");
}); });
it("check with finished failed edoniq test", () => { it("check with finished failed edoniq test", () => {

Binary file not shown.