2 Commits

Author SHA1 Message Date
a241b9f1d8 fix ci?
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
2025-10-01 23:26:18 +02:00
1de7a6fb33 fix ci?
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
2025-10-01 22:53:59 +02:00
2 changed files with 15 additions and 7 deletions

View File

@@ -426,7 +426,7 @@ function initNewChoice(select: HTMLInputElement) {
return `Nur ${maxItemCount} Ruderer können hinzugefügt werden`;
},
callbackOnInit: function (this: Choices) {
const items = this.getValue(); // Get all selected items
const items = this.getValue(true); // Get all selected items
const itemsArray = Array.isArray(items) ? items : [items];
itemsArray.forEach((obj: any) => {
if (boat_in_ottensheim && obj.customProperties) {

View File

@@ -18,16 +18,20 @@ test("Cox can start and cancel trip", async ({ page }, testInfo) => {
await page.getByText('2x', { exact: true }).click();
await page.getByText("Joe", { exact: true }).click();
}
await page.getByLabel('Remove item: \'6\'').click(); // remove pre-filled cox2
await page.getByRole('button', { name: 'Remove item:' }).click(); // remove pre-filled cox2
await page.getByPlaceholder("Ruderer auswählen").click();
await page.getByRole("option", { name: "rower2" }).click();
await page.getByRole("option", { name: "cox2" }).click();
await expect(page.getByRole("listbox")).toContainText(
await expect(page.locator("#form")).toContainText(
"Nur 2 Ruderer können hinzugefügt werden",
);
await expect(page.locator("#shipmaster-newrowerjs")).toContainText("cox");
await expect(page.locator("#steering_person-newrowerjs")).toContainText(
"rower2 cox",
"rower2",
);
await expect(page.locator("#steering_person-newrowerjs")).toContainText(
"cox2",
);
await page.getByRole("button", { name: "Ausfahrt eintragen" }).click();
await expect(page.locator("body")).toContainText(
@@ -60,11 +64,11 @@ test("Cox can start and finish trip", async ({ page }, testInfo) => {
await page.getByText('2x', { exact: true }).click();
await page.getByText("Joe", { exact: true }).click();
}
await page.getByLabel('Remove item: \'6\'').click(); // remove pre-filled cox2
await page.getByRole('button', { name: 'Remove item:' }).click(); // remove pre-filled cox2
await page.getByPlaceholder("Ruderer auswählen").click();
await page.getByRole("option", { name: "rower2" }).click();
await page.getByRole("option", { name: "cox2" }).click();
await expect(page.getByRole("listbox")).toContainText(
await expect(page.locator("#form")).toContainText(
"Nur 2 Ruderer können hinzugefügt werden",
);
@@ -79,8 +83,12 @@ test("Cox can start and finish trip", async ({ page }, testInfo) => {
await expect(page.locator("#shipmaster-newrowerjs")).toContainText("cox");
await expect(page.locator("#steering_person-newrowerjs")).toContainText(
"rower2 cox",
"rower2",
);
await expect(page.locator("#steering_person-newrowerjs")).toContainText(
"cox",
);
await page.getByRole("button", { name: "Ausfahrt eintragen" }).click();
await expect(page.locator("body")).toContainText(
"Ausfahrt erfolgreich hinzugefügt",