mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 00:24:35 +00:00
Add smoke test for calendar event tag assignment
This commit is contained in:
@@ -177,6 +177,17 @@ VALUES
|
||||
(51006, 31),
|
||||
(51004, 32);
|
||||
|
||||
-- Calendar setup for tags tests
|
||||
INSERT INTO lehre.tbl_kalender
|
||||
(von, bis, typ, status_kurzbz, vorgaenger_kalender_id, eindeutige_gruppen_id, insertamum, insertvon, updateamum, updatevon)
|
||||
VALUES
|
||||
(date_trunc('week', CURRENT_DATE) + INTERVAL '6 day' + TIME '16:55:00', date_trunc('week', CURRENT_DATE) + INTERVAL '6 day' + TIME '17:40:00', 'lehreinheit', 'live', NULL, 'ec1bd001-facf-4b21-a671-bcb2d4f037fd', now(), 'demoadmin', NULL, 'demoadmin');
|
||||
|
||||
INSERT INTO lehre.tbl_kalender_lehreinheit
|
||||
(lehreinheit_id, kalender_id)
|
||||
VALUES
|
||||
(51004, 33);
|
||||
|
||||
-- INSERT INTO public.tbl_variablenname
|
||||
-- (name, defaultwert)
|
||||
-- VALUES('ignore_resources_collisions', 'false');
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
INSERT INTO public.tbl_notiz_typ
|
||||
(typ_kurzbz, bezeichnung_mehrsprachig, beschreibung, automatisiert, aktiv, zuordnung, tag, style, vorrueckung, prioritaet/*, taglib*/)
|
||||
VALUES
|
||||
('prioone', '{Prio 1,Prio 1}', '', false, true, NULL, false, 'tag_rot', false, 1/*, NULL*/),
|
||||
('priotwo', '{Prio 2,Prio 2}', '', false, true, NULL, false, 'tag_gelb', false, 2/*, NULL*/);
|
||||
@@ -71,6 +71,20 @@ context("Tempus smoke tests", () => {
|
||||
tempusPage.getResourcesModal().should("be.visible");
|
||||
});
|
||||
|
||||
it("shows tags modal when selecting Tags from event context menu", () => {
|
||||
tempusPage.waitForCalendarToFinishLoading();
|
||||
tempusPage
|
||||
.getCalendarEventsByWeekdayAndStartTime("Sunday", "16:55:00")
|
||||
.should("have.length.greaterThan", 0);
|
||||
|
||||
tempusPage.getCalendarEventsByWeekdayAndStartTime("Sunday", "16:55:00").first().rightclick();
|
||||
tempusPage.getEventContextMenuOption("Tags").click({ force: true });
|
||||
waitForOk("@fetchTags");
|
||||
waitForOk("@fetchTagsByCalendar");
|
||||
|
||||
tempusPage.getTagsModal().should("be.visible");
|
||||
});
|
||||
|
||||
it("shows history modal when selecting History from event context menu", () => {
|
||||
tempusPage.waitForCalendarToFinishLoading();
|
||||
tempusPage.getCalendarEvents().should("have.length.greaterThan", 0);
|
||||
|
||||
@@ -72,6 +72,14 @@ class TempusPage {
|
||||
method: "GET",
|
||||
url: "**/tempus/OperationalResourceToCalenderAPI/getAssignedResourcesByCalender/**",
|
||||
}).as("fetchAssignedResources");
|
||||
cy.intercept({
|
||||
method: "GET",
|
||||
url: "**/tempus/Tags/getTags**",
|
||||
}).as("fetchTags");
|
||||
cy.intercept({
|
||||
method: "GET",
|
||||
url: "**/tempus/Tags/getTagsByCalendar/**",
|
||||
}).as("fetchTagsByCalendar");
|
||||
cy.intercept({
|
||||
method: "POST",
|
||||
url: "**/tempus/coursepicker/getByStg**",
|
||||
@@ -345,6 +353,8 @@ class TempusPage {
|
||||
cy
|
||||
.get("[data-cy='resourcesAssignmentModal']")
|
||||
.closest(".bootstrap-modal.show");
|
||||
getTagsModal = () =>
|
||||
cy.get("[data-cy='tagsAssignmentModal']").closest(".bootstrap-modal.show")
|
||||
getCalendarEventRoom = (id) =>
|
||||
this.getCalendarEventById(id).find("[data-cy='calendar-event-room']");
|
||||
getStundenrasterToggle = () =>
|
||||
|
||||
Reference in New Issue
Block a user