Conflict resolved

This commit is contained in:
Ivymaster
2026-07-09 10:50:16 +02:00
27 changed files with 1634 additions and 332 deletions
@@ -37,7 +37,9 @@ context("Tempus event mutation tests", () => {
const eventData = JSON.parse(eventJSON);
const eventId = eventData?.id;
const originalRoom = eventData?.orig?.ort_kurzbz;
let originalRoom = eventData?.orig?.ort_kurzbz;
if (Array.isArray(originalRoom)) originalRoom = originalRoom.length ? originalRoom[0] : "";
expect(eventId, "planner event id").to.exist;
expect(originalRoom, "original event room").to.be.a("string").and.not.be
.empty;
@@ -80,7 +82,9 @@ context("Tempus event mutation tests", () => {
const eventData = JSON.parse(eventJSON);
const eventId = eventData?.id;
const originalRoom = eventData?.orig?.ort_kurzbz;
let originalRoom = eventData?.orig?.ort_kurzbz;
if (Array.isArray(originalRoom)) originalRoom = originalRoom.length ? originalRoom[0] : "";
expect(eventId, "planner event id").to.exist;
expect(originalRoom, "original event room").to.be.a("string").and.not.be
.empty;
@@ -16,7 +16,9 @@ context("Tempus filter tests", () => {
.then((eventJSON) => {
expect(eventJSON).to.exist;
const selectedRoom = JSON.parse(eventJSON)?.orig?.ort_kurzbz;
let selectedRoom = JSON.parse(eventJSON)?.orig?.ort_kurzbz;
if (Array.isArray(selectedRoom)) selectedRoom = selectedRoom.length ? selectedRoom[0] : "";
expect(selectedRoom, "first event room").to.be.a("string").and.not.be
.empty;
expect(
@@ -40,8 +42,11 @@ context("Tempus filter tests", () => {
tempusPage.getCalendarEvents().should("have.length.greaterThan", 0);
tempusPage.getCalendarEvents().each(($event) => {
const eventData = tempusPage.getCalendarEventData($event);
let eventRoom = eventData?.orig?.ort_kurzbz;
if (Array.isArray(eventRoom)) eventRoom = eventRoom.length ? eventRoom[0] : "";
expect(eventData?.orig?.ort_kurzbz, "event data room").to.eq(
expect(eventRoom, "event data room").to.eq(
selectedRoom,
);
cy.wrap($event)
@@ -64,7 +69,9 @@ context("Tempus filter tests", () => {
.then((eventJSON) => {
expect(eventJSON).to.exist;
const selectedRoom = JSON.parse(eventJSON)?.orig?.ort_kurzbz;
let selectedRoom = JSON.parse(eventJSON)?.orig?.ort_kurzbz;
if (Array.isArray(selectedRoom)) selectedRoom = selectedRoom.length ? selectedRoom[0] : "";
console.log("Selected room:", selectedRoom);
expect(selectedRoom, "first event room").to.be.a("string").and.not.be
.empty;
expect(
@@ -135,7 +135,10 @@ class TempusPage {
const eventData = JSON.parse(
event.getAttribute("data-fhc-draggable-value"),
);
return !!eventData?.orig?.ort_kurzbz;
let isArray = Array.isArray(eventData?.orig?.ort_kurzbz);
return isArray ? eventData?.orig?.ort_kurzbz.length > 0 : !!eventData?.orig?.ort_kurzbz;
});
getCalendarEventsWithLecturer = () =>
this.getCalendarEvents().filter((index, event) => {
@@ -435,6 +438,7 @@ class TempusPage {
const event = this.getCalendarEventById(eventId);
return event
.scrollIntoView()
.should("be.visible")
.drag(this.getCalendarPartDropTarget(partIndex), {
waitForAnimations: false,