diff --git a/frontend/tests/log.spec.ts b/frontend/tests/log.spec.ts index a5380b7..f835e84 100644 --- a/frontend/tests/log.spec.ts +++ b/frontend/tests/log.spec.ts @@ -12,7 +12,7 @@ test("Cox can start and cancel trip", async ({ page }, testInfo) => { await page.getByRole("link", { name: "Ausfahrt eintragen" }).click(); if (testInfo.project.name.includes("Mobile")) { // No left boat selector on mobile views - await page.getByText("Kaputtes Boot :-( (7x)").nth(1).click(); + await page.getByText('-- Wähle ein Boot aus ---').nth(1).click(); await page.getByRole("option", { name: "Joe" }).click(); } else { await page.getByText('2x', { exact: true }).click(); @@ -54,7 +54,7 @@ test("Cox can start and finish trip", async ({ page }, testInfo) => { await page.getByRole("link", { name: "Ausfahrt eintragen" }).click(); if (testInfo.project.name.includes("Mobile")) { // No left boat selector on mobile views - await page.getByText("Kaputtes Boot :-( (7x)").nth(1).click(); + await page.getByText('-- Wähle ein Boot aus ---').nth(1).click(); await page.getByRole("option", { name: "Joe" }).click(); } else { await page.getByText('2x', { exact: true }).click(); @@ -107,7 +107,7 @@ test("Kiosk can start and cancel trip", async ({ page }, testInfo) => { await page.goto("/log/kiosk/ekrv2019/Linz"); if (testInfo.project.name.includes("Mobile")) { // No left boat selector on mobile views - await page.getByText("Kaputtes Boot :-( (7x)").nth(1).click(); + await page.getByText('-- Wähle ein Boot aus ---').nth(1).click(); await page.getByRole("option", { name: "Joe" }).click(); } else { await page.getByText('2x', { exact: true }).click(); @@ -141,7 +141,7 @@ test("Kiosk can start and finish trip", async ({ page }, testInfo) => { if (testInfo.project.name.includes("Mobile")) { // No left boat selector on mobile views - await page.getByText("Kaputtes Boot :-( (7x)").nth(1).click(); + await page.getByText('-- Wähle ein Boot aus ---').nth(1).click(); await page.getByRole("option", { name: "Joe" }).click(); } else { await page.getByText('2x', { exact: true }).click(); diff --git a/templates/includes/forms/log.html.tera b/templates/includes/forms/log.html.tera index 79db3e5..f805e32 100644 --- a/templates/includes/forms/log.html.tera +++ b/templates/includes/forms/log.html.tera @@ -31,7 +31,7 @@ method="post" id="form" class="grid grid-cols-4 gap-3" - onsubmit="Array.from(this.elements).forEach(e=>!e.value.trim()&&(e.disabled=true));"> + onsubmit="if (!this.elements['boat_id'].value) { alert('Kein Boot ausgewählt'); return false; }Array.from(this.elements).forEach(e=>!e.value.trim()&&(e.disabled=true));"> {{ log::boat_select() }}