From 3448c7390099ddb9a1a04fe223d7afd0deaaca54 Mon Sep 17 00:00:00 2001 From: Florian Glombik <63976129+florian-glombik@users.noreply.github.com> Date: Sun, 5 Jan 2025 22:28:09 +0100 Subject: [PATCH] Lectures: Replace guided mode with status bar edit and create view (#9655) --- jest.config.js | 8 +- .../webapp/app/entities/attachment.model.ts | 2 - .../close-edit-lecture-modal.component.html | 4 +- .../close-edit-lecture-modal.component.ts | 0 .../lecture/hasLectureUnsavedChanges.guard.ts | 4 +- .../lecture/lecture-attachments.component.ts | 4 +- .../lecture-period.component.html | 4 +- .../lecture-unit-management.component.ts | 68 +++--- .../lecture-units.component.html} | 8 +- .../lecture-units.component.ts} | 30 ++- .../app/lecture/lecture-update.component.html | 219 +++++++++--------- .../app/lecture/lecture-update.component.ts | 128 ++++++---- .../webapp/app/lecture/lecture.component.ts | 10 +- src/main/webapp/app/lecture/lecture.module.ts | 17 +- .../webapp/app/lecture/lecture.service.ts | 2 + .../lecture-update-wizard-step.component.html | 16 -- .../lecture-update-wizard-step.component.ts | 24 -- .../lecture-update-wizard.component.html | 54 ----- .../lecture-update-wizard.component.scss | 70 ------ .../lecture-update-wizard.component.ts | 104 --------- .../lecture-wizard-attachments.component.html | 7 - .../lecture-wizard-attachments.component.ts | 13 -- .../lecture-wizard-title.component.html | 11 - .../lecture-wizard-title.component.ts | 14 -- .../exercise-filter-modal.component.html | 5 - src/main/webapp/i18n/de/lecture.json | 32 +-- src/main/webapp/i18n/en/lecture.json | 32 +-- ...close-edit-lecture-modal.component.spec.ts | 2 +- ...pec.ts => lecture-units.component.spec.ts} | 16 +- .../lecture/lecture-update.component.spec.ts | 176 +++++++------- ...cture-wizard-attachments.component.spec.ts | 34 --- .../lecture-wizard-title.component.spec.ts | 44 ---- .../lecture-wizard.component.spec.ts | 218 ----------------- .../image-cropper/keyboard.util.spec.ts | 71 ++++++ .../javascript/spec/util/regex.util.spec.ts | 34 +++ .../e2e/lecture/LectureManagement.spec.ts | 11 +- 36 files changed, 524 insertions(+), 972 deletions(-) rename src/main/webapp/app/lecture/{close-edit-lecture-dialog => close-edit-lecture-modal}/close-edit-lecture-modal.component.html (87%) rename src/main/webapp/app/lecture/{close-edit-lecture-dialog => close-edit-lecture-modal}/close-edit-lecture-modal.component.ts (100%) rename src/main/webapp/app/lecture/{wizard-mode/lecture-wizard-units.component.html => lecture-units/lecture-units.component.html} (87%) rename src/main/webapp/app/lecture/{wizard-mode/lecture-wizard-units.component.ts => lecture-units/lecture-units.component.ts} (89%) delete mode 100644 src/main/webapp/app/lecture/wizard-mode/lecture-update-wizard-step.component.html delete mode 100644 src/main/webapp/app/lecture/wizard-mode/lecture-update-wizard-step.component.ts delete mode 100644 src/main/webapp/app/lecture/wizard-mode/lecture-update-wizard.component.html delete mode 100644 src/main/webapp/app/lecture/wizard-mode/lecture-update-wizard.component.scss delete mode 100644 src/main/webapp/app/lecture/wizard-mode/lecture-update-wizard.component.ts delete mode 100644 src/main/webapp/app/lecture/wizard-mode/lecture-wizard-attachments.component.html delete mode 100644 src/main/webapp/app/lecture/wizard-mode/lecture-wizard-attachments.component.ts delete mode 100644 src/main/webapp/app/lecture/wizard-mode/lecture-wizard-title.component.html delete mode 100644 src/main/webapp/app/lecture/wizard-mode/lecture-wizard-title.component.ts rename src/test/javascript/spec/component/lecture/{wizard-mode/lecture-wizard-units.component.spec.ts => lecture-units.component.spec.ts} (98%) delete mode 100644 src/test/javascript/spec/component/lecture/wizard-mode/lecture-wizard-attachments.component.spec.ts delete mode 100644 src/test/javascript/spec/component/lecture/wizard-mode/lecture-wizard-title.component.spec.ts delete mode 100644 src/test/javascript/spec/component/lecture/wizard-mode/lecture-wizard.component.spec.ts create mode 100644 src/test/javascript/spec/component/shared/image-cropper/keyboard.util.spec.ts create mode 100644 src/test/javascript/spec/util/regex.util.spec.ts diff --git a/jest.config.js b/jest.config.js index eb987708aa76..ab2c159af355 100644 --- a/jest.config.js +++ b/jest.config.js @@ -105,10 +105,10 @@ module.exports = { coverageThreshold: { global: { // TODO: in the future, the following values should increase to at least 90% - statements: 87.78, - branches: 73.93, - functions: 82.47, - lines: 87.83, + statements: 87.81, + branches: 73.97, + functions: 82.50, + lines: 87.86, }, }, coverageReporters: ['clover', 'json', 'lcov', 'text-summary'], diff --git a/src/main/webapp/app/entities/attachment.model.ts b/src/main/webapp/app/entities/attachment.model.ts index c070019513ee..78e6b639da8d 100644 --- a/src/main/webapp/app/entities/attachment.model.ts +++ b/src/main/webapp/app/entities/attachment.model.ts @@ -20,6 +20,4 @@ export class Attachment implements BaseEntity { lecture?: Lecture; exercise?: Exercise; attachmentUnit?: AttachmentUnit; - - constructor() {} } diff --git a/src/main/webapp/app/lecture/close-edit-lecture-dialog/close-edit-lecture-modal.component.html b/src/main/webapp/app/lecture/close-edit-lecture-modal/close-edit-lecture-modal.component.html similarity index 87% rename from src/main/webapp/app/lecture/close-edit-lecture-dialog/close-edit-lecture-modal.component.html rename to src/main/webapp/app/lecture/close-edit-lecture-modal/close-edit-lecture-modal.component.html index afc317c054bc..d554326acf9e 100644 --- a/src/main/webapp/app/lecture/close-edit-lecture-dialog/close-edit-lecture-modal.component.html +++ b/src/main/webapp/app/lecture/close-edit-lecture-modal/close-edit-lecture-modal.component.html @@ -13,12 +13,12 @@