Skip to content

Conversation

@krusche
Copy link
Member

@krusche krusche commented Jan 24, 2026

Checklist

General

Client

  • Important: I implemented the changes with a very good performance, prevented too many (unnecessary) REST calls and made sure the UI is responsive, even with large data (e.g. using paging).
  • I strictly followed the principle of data economy for all client-server REST calls.
  • I strictly followed the client coding guidelines.
  • I strictly followed the AET UI-UX guidelines.
  • Following the theming guidelines, I specified colors only in the theming variable files and checked that the changes look consistent in both the light and the dark theme.
  • I added multiple integration tests (Vitest) related to the features (with a high test coverage), while following the test guidelines.
  • I added authorities to all new routes and checked the course groups for displaying navigation elements (links, buttons).
  • I documented the TypeScript code using JSDoc style.
  • I added multiple screenshots/screencasts of my UI changes.
  • I translated all newly inserted strings into English and German.

Motivation and Context

This continues the migration of the Angular core module to signals and Vitest (zoneless) to align with current Angular patterns, reduce manual change detection, and standardize the test stack. It also addresses signal-related issues discovered during migration.

Description

  • Migrated core module components to signals (signal, computed, input, output, viewChild) and updated templates to call signal values.
  • Migrated core module tests from Jest to Vitest with zoneless setup (setupTestBed({ zoneless: true })) and added new Vitest specs for admin, auth, calendar, notifications, settings, and course modules.
  • Cleaned up subscription handling and race conditions surfaced during the migration (e.g., course dashboard/card, open-code-editor button).
  • Updated shared fixtures and test setup to avoid Jest/Vitest conflicts.
  • Adjusted jest.config.js and vitest.config.ts to reflect the new testing split and coverage expectations.
  • Minor follow-up adjustments in shared/exam/exercise components to align with the new signal-based inputs.

Scope summary: 229 files changed (+11562/-5211), primarily under src/main/webapp/app/core with additional supporting changes in shared/exam/exercise code and test infrastructure.

Steps for Testing

Automated tests run:

  • npm run vitest:run src/main/webapp/app/core/course/overview/course-overview

Manual verification (suggested for reviewers):
Prerequisites:

  • 1 Instructor
  • 1 Student
  • 1 Course with exercises, tutorials, and exams
  1. Log in as instructor, open Course Management, and verify the course overview, dashboard, and exercise list render correctly.
  2. Log in as student, open Course Overview and exercise details; verify navigation tabs, exercise cards, and registration flows work.
  3. Open user settings (notifications, passkeys, SSH keys, tokens) and verify the pages load and save as expected.
  4. Check system notifications and loading indicators to ensure they behave normally.

Exam Mode Testing

Prerequisites:

  • 1 Instructor
  • 1 Student
  • 1 Exam with at least one exercise
  1. Start the exam as a student.
  2. Verify exam navigation bar, timer, and exercise navigation behave as expected.
  3. Ensure the UI remains unchanged in exam mode.

Review Progress

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Exam mode testing

  • Test 1
  • Test 2

Test Coverage

Client

Class/File Line Coverage Lines Expects Ratio
message-inline-input.component.ts 98.21% 111 19 17.1
admin-data-export-create-modal.component.ts 100.00% 97 20 20.6
course-management-container.component.ts 87.76% 539 109 20.2
course-management.component.ts 91.26% 189 11 5.8
course-scores.component.ts 93.97% 724 50 6.9
course-management-card.component.ts 100.00% 164 18 11.0
course-management-overview-statistics.component.ts 94.00% 108 19 17.6
user-management-dropdown.component.ts 100.00% 60 3 5.0
course-card.component.ts 97.87% 103 5 4.9
course-dashboard.component.ts 100.00% 207 46 22.2
course-exercise-lateness.component.ts 100.00% 80 ? ?
course-exercise-performance.component.ts 100.00% 80 ? ?
course-exercise-row.component.ts 83.07% 135 1 0.7
course-exercises.component.ts 88.42% 183 13 7.1
course-prerequisites-button.component.ts 100.00% 18 2 11.1
course-registration-button.component.ts 95.45% 50 4 8.0
course-prerequisites-modal.component.ts 93.33% 47 4 8.5
course-registration.component.ts 94.87% 104 33 31.7
course-statistics.component.ts 95.16% 578 45 7.8
course-exercise-details.component.ts 74.90% 613 42 6.9
open-code-editor-button.component.ts 100.00% 51 23 45.1
problem-statement.component.ts 92.59% 57 11 19.3
reset-repo-button.component.ts 93.93% 74 5 6.8
start-practice-mode-button.component.ts 93.33% 72 10 13.9
exercise-details-student-actions.component.ts 94.26% 240 40 16.7
submission-result-status.component.ts 90.38% 86 7 8.1
exercise-scores-chart.component.ts 94.38% 188 17 9.0
course-base-container.component.ts 96.05% 286 ? ?
course-sidebar.component.ts 98.21% 130 24 18.5
test.helpers.ts 84.61% 26 ? ?
exam-bar.component.ts 85.71% 78 12 15.4
exam-participation-cover.component.ts 97.00% 187 26 13.9
exam-navigation-bar.component.ts 92.72% 185 44 23.8
exam-timer.component.ts 100.00% 70 10 14.3
exam-exercise-row-buttons.component.ts 97.72% 162 30 18.5
manage-assessment-buttons.component.ts 100.00% 102 21 20.6
updating-result.component.ts 95.60% 169 55 32.5
submission-policy-update.component.ts 96.49% 193 14 7.3
confirm-autofocus-button.component.ts 100.00% 57 22 38.6
image-cropper.component.ts 65.65% 434 40 9.2
markdown-editor-monaco.component.ts 97.50% 523 46 8.8
conversation-options.component.ts 91.30% 157 21 13.4

Last updated: 2026-01-26 15:51:13 UTC

Screenshots

No screenshots provided. This is a refactor and test migration only; template updates are limited to signal invocation syntax and do not change visuals.

krusche and others added 2 commits January 24, 2026 21:04
- Fix race condition in OpenCodeEditorButtonComponent.switchPracticeMode()
- Fix subscription leak in CourseCardComponent by tracking subscription
- Fix nested subscription leak in CourseDashboardComponent using switchMap
- Update test mock to return proper Observable

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@krusche krusche requested a review from a team as a code owner January 24, 2026 20:16
@github-project-automation github-project-automation bot moved this to Work In Progress in Artemis Development Jan 24, 2026
@github-actions github-actions bot added tests client Pull requests that update TypeScript code. (Added Automatically!) communication Pull requests that affect the corresponding module core Pull requests that affect the corresponding module exam Pull requests that affect the corresponding module exercise Pull requests that affect the corresponding module labels Jan 24, 2026
@krusche krusche changed the title Development: Migrate core module to Angular signals and Vitest Development: Migrate core module to Angular signals and Vitest Jan 24, 2026
@github-actions
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report223 ran218 passed1 skipped4 failed1h 49m 35s 333ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/atlas/LearningPathManagement.spec.ts
ts.Learning Path Management › Create simple learning path❌ failure22s 494ms
e2e/exercise/modeling/ModelingExerciseManagement.spec.ts
ts.Modeling Exercise Management › Create Modeling Exercise › Create a new modeling exercise❌ failure1m 57s 597ms
e2e/exam/test-exam/TestExamParticipation.spec.ts
ts.Test exam participation › Early Hand-in › Using exercise sidebar to navigate within exam❌ failure4m 40s 313ms
ts.Test exam participation › Early Hand-in › Using exercise overview to navigate within exam❌ failure4m 55s 534ms

krusche and others added 4 commits January 25, 2026 07:20
- Add null check in CourseExerciseRowComponent.updateExerciseData
- Move expectedProfileInfo to separate helper file to avoid Vitest/Jest conflicts
- Update imports in profile.service.spec.ts and code-button.component.spec.ts

Co-Authored-By: Claude Opus 4.5 <[email protected]>
The test was asserting response.body equals userSshPublicKey but the
mock was flushing an empty object. Fixed by flushing the expected
userSshPublicKey object.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
The tests were flushing { body: token } instead of just token. When
using HttpTestingController.flush(), the argument becomes the response
body, so flushing { body: token } made response.body be an object
instead of the expected string.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@github-actions
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ✅SkippedFailedTime ⏱
End-to-End (E2E) Test Report1 ran1 passed0 skipped0 failed2s 210ms
TestResultTime ⏱
No test annotations available

After migrating CourseExerciseRowComponent to use signal inputs,
the test needs to call course() and exercise() as functions to
access the signal values.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@krusche krusche requested a review from a team as a code owner January 25, 2026 07:00
@github-actions github-actions bot added the lecture Pull requests that affect the corresponding module label Jan 25, 2026
Adjusted global coverage thresholds to account for the migration of the
core module tests from Jest to Vitest. Since more code is now tested by
Vitest, the Jest coverage naturally decreases.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@github-actions
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ✅SkippedFailedTime ⏱
End-to-End (E2E) Test Report1 ran1 passed0 skipped0 failed1s 967ms
TestResultTime ⏱
No test annotations available

@github-actions
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report223 ran221 passed1 skipped1 failed1h 33m 17s 54ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/exam/test-exam/TestExamStudentExams.spec.ts
ts.Test Exam - student exams › Check exam participants and their submissions › Open the list of exam students❌ failure7m 1s 295ms

@github-actions
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report223 ran219 passed1 skipped3 failed1h 44m 57s 701ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/exam/ExamTestRun.spec.ts
ts.Exam test run › Delete a test run › Deletes a test run❌ failure3m 12s 477ms
e2e/exam/test-exam/TestExamParticipation.spec.ts
ts.Test exam participation › Early Hand-in › Using exercise sidebar to navigate within exam❌ failure4m 23s 228ms
ts.Test exam participation › Early Hand-in › Using exercise overview to navigate within exam❌ failure4m 58s 821ms

@github-actions
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ✅SkippedFailedTime ⏱
End-to-End (E2E) Test Report1 ran1 passed0 skipped0 failed2s 657ms
TestResultTime ⏱
No test annotations available

@github-actions
Copy link

@krusche Test coverage has been automatically updated in the PR description.

@krusche krusche modified the milestones: 8.7.4, 8.8.0 Jan 25, 2026
@github-actions
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ✅SkippedFailedTime ⏱
End-to-End (E2E) Test Report1 ran1 passed0 skipped0 failed2s 154ms
TestResultTime ⏱
No test annotations available

@github-actions
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report223 ran219 passed2 skipped2 failed1h 45m 21s 994ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/course/CourseMessages.spec.ts
ts.Course messages › Channel messages › Write/edit/delete message in channel › Student should be able to write message in channel❌ failure2m 22s 317ms
e2e/exam/ExamAssessment.spec.ts
ts.Exam assessment › Text exercise assessment › Complaints about text exercises assessment❌ failure1m 24s 119ms

@github-actions
Copy link

@krusche Test coverage has been automatically updated in the PR description.

@github-actions
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ✅Skipped ⚠️FailedTime ⏱
End-to-End (E2E) Test Report223 ran222 passed1 skipped0 failed1h 26m 44s 293ms
TestResultTime ⏱
No test annotations available

@github-actions
Copy link

@krusche Test coverage has been automatically updated in the PR description.

@github-actions
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report223 ran221 passed1 skipped1 failed1h 28m 33s 752ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/course/CourseMessages.spec.ts
ts.Course messages › Channel messages › Write/edit/delete message in channel › Student should be able to write message in channel❌ failure2m 19s 302ms

@github-actions
Copy link

@krusche Test coverage has been automatically updated in the PR description.

@github-actions
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ✅Skipped ⚠️FailedTime ⏱
End-to-End (E2E) Test Report223 ran222 passed1 skipped0 failed1h 25m 46s 747ms
TestResultTime ⏱
No test annotations available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client Pull requests that update TypeScript code. (Added Automatically!) communication Pull requests that affect the corresponding module core Pull requests that affect the corresponding module exam Pull requests that affect the corresponding module exercise Pull requests that affect the corresponding module lecture Pull requests that affect the corresponding module ready for review tests

Projects

Status: Work In Progress
Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants