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", {
x: assignmentCompletion.evaluation_max_points,
})
}},
{{
}}
({{
(
((assignmentCompletion.evaluation_points ?? 0) /
(assignmentCompletion.evaluation_max_points ?? 1)) *
100
).toFixed(0)
}}%,
<span v-if="assignmentCompletion.evaluation_passed">
({{ $t("a.Bestanden") }})
</span>
<span v-else class="text-error-red-500">
({{ $t("a.Nicht Bestanden") }})
}}%)
<span
v-if="!assignmentCompletion.evaluation_passed"
class="rounded bg-error-red-200 px-2 py-1 text-sm"
>
{{ $t("a.Nicht Bestanden") }}
</span>
</div>

View File

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

Binary file not shown.