Repository: e-valuation/EvaP

Issue:
Bootstrap update
Update Bootstrap to version 5


Discussion:

Resolving patch:
diff --git a/evap/staff/forms.py b/evap/staff/forms.py
--- a/evap/staff/forms.py
+++ b/evap/staff/forms.py
@@ -535,8 +535,8 @@ class EvaluationEmailForm(forms.Form):
         widget=forms.CheckboxSelectMultiple(), choices=EmailTemplate.Recipients.choices, label=_("Send email to")
     )
     subject = forms.CharField(label=_("Subject"))
-    plain_content = forms.CharField(widget=forms.Textarea(), label=_("Plain Message"))
-    html_content = forms.CharField(widget=forms.Textarea(), label=_("HTML Message"))
+    plain_content = forms.CharField(widget=forms.Textarea(), label=_("Plain Text"))
+    html_content = forms.CharField(widget=forms.Textarea(), label=_("HTML"))
 
     def __init__(self, *args, evaluation, export=False, **kwargs):
         super().__init__(*args, **kwargs)
@@ -575,8 +575,8 @@ class RemindResponsibleForm(forms.Form):
     to = UserModelChoiceField(None, required=False, disabled=True, label=_("To"))
     cc = UserModelMultipleChoiceField(None, required=False, disabled=True, label=_("CC"))
     subject = forms.CharField(label=_("Subject"))
-    plain_content = forms.CharField(widget=forms.Textarea(), label=_("Plain Message"))
-    html_content = forms.CharField(widget=forms.Textarea(), label=_("HTML Message"))
+    plain_content = forms.CharField(widget=forms.Textarea(), label=_("Plain Text"))
+    html_content = forms.CharField(widget=forms.Textarea(), label=_("HTML"))
 
     def __init__(self, *args, responsible, **kwargs):
         super().__init__(*args, **kwargs)


Test patch:
diff --git a/evap/static/ts/tests/frontend/student-vote.ts b/evap/static/ts/tests/frontend/student-vote.ts
--- a/evap/static/ts/tests/frontend/student-vote.ts
+++ b/evap/static/ts/tests/frontend/student-vote.ts
@@ -54,7 +54,7 @@ test("checking bottom confirm checkbox check top but keeps bottom visible", page
 test("resolving submit errors clears warning", pageHandler(
     "student/vote/1/submit_errors.html",
     async page => {
-        const checkbox = (await page.$(".choice-error input[type=radio][value='3']"))!;
+        const checkbox = (await page.$(".choice-error + input[type=radio][value='3']"))!;
         await checkbox.click();
         const row = await queryClosest(checkbox, ".row");
         expect(await row.$$(".choice-error")).toHaveLength(0);
@@ -64,16 +64,14 @@ test("resolving submit errors clears warning", pageHandler(
 test("skip contributor", pageHandler(
     "student/vote/1/normal.html",
     async page => {
-        const voteArea = (await page.$(".card .collapse"))!;
-        const button = (await queryClosest(voteArea, ".card").then(card => card.$("button")))!;
+        const button = (await page.$("[data-mark-no-answers-for]"))!;
+        const voteArea = (await queryClosest(button, ".card").then(card => card.$(".collapse")))!
         await button.click();
         for (const checkbox of await voteArea.$$("input[type=radio]:not([value='6'])")) {
             await expect(checkbox).not.toBeChecked();
-            await expect(await queryParent(checkbox)).not.toHaveClass("active");
         }
         for (const checkbox of await voteArea.$$("input[type=radio][value='6']")) {
             await expect(checkbox).toBeChecked();
-            await expect(await queryParent(checkbox)).toHaveClass("active");
         }
         await expect(voteArea).toHaveClass("collapsing");
     },
@@ -82,8 +80,8 @@ test("skip contributor", pageHandler(
 test("skipping contributor clears warning", pageHandler(
     "student/vote/1/submit_errors.html",
     async page => {
-        const voteArea = (await page.$(".card .collapse"))!;
-        const button = (await queryClosest(voteArea, ".card").then(card => card.$("button")))!;
+        const button = (await page.$("[data-mark-no-answers-for]"))!;
+        const voteArea = (await queryClosest(button, ".card").then(card => card.$(".collapse")))!;
         await button.click();
         await expect(await voteArea.$$(".choice-error")).toHaveLength(0);
     },
diff --git a/evap/static/ts/tests/utils/page.ts b/evap/static/ts/tests/utils/page.ts
--- a/evap/static/ts/tests/utils/page.ts
+++ b/evap/static/ts/tests/utils/page.ts
@@ -44,6 +44,7 @@ export function pageHandler(fileName: string, fn: (page: Page) => void): (done?:
                 await page.evaluate(() => {
                     localStorage.clear();
                 });
+                await page.close();
                 done!(reason);
             }
         }