Skip to content

Lectures: Integrate slide visibility scheduling into ScheduleService #10705

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 46 commits into from
Jul 8, 2025

Conversation

eceeeren
Copy link
Contributor

@eceeeren eceeeren commented Apr 18, 2025

Checklist

General

Server

  • Important: I implemented the changes with a very good performance and prevented too many (unnecessary) and too complex database calls.
  • I strictly followed the principle of data economy for all database calls.
  • I strictly followed the server coding and design guidelines.
  • I added multiple integration tests (Spring) related to the features (with a high test coverage).
  • I added pre-authorization annotations according to the guidelines and checked the course groups for all new REST Calls (security).
  • I documented the Java code using JavaDoc style.

Motivation and Context

This pull request assigns a distinct name to each scheduled task to improve clarity in debug logs, making it easier to identify and trace specific tasks during execution. It also exposes the scheduling information through an admin REST API via AdminScheduleResource, allowing for better visibility and management of scheduled tasks.

Description

To enable this implementation, the following changes are made:

  1. SlideLifecycle is created to represent the lifecycle events of a Slide
  2. SlideLifecycle is represented in the ScheduleService alongside the Exercise and Participation Events
  3. A mapping is created as "slide-schedules" in AdminScheduleResource to get a page of scheduled slide events

Steps for Testing

Prerequisites:

  • 1 Instructor
  1. Log in to Artemis
  2. Navigate to Course Administration > Lectures > Lectures Units
  3. Select a PDF file and add it as an Attachment Unit
  4. Hide a page for a short time (e.g. 2 minutes) and immediately save the Attachment Unit!
  5. The selected page and the Student Version should be updated automatically after 2 minutes (Slide will be visible again, if there are no hidden pages Student Version will disappear and if there are, Student Version should be updated)
  6. Create a Text Exercise with a Release Date and Due Date in a short time (e.g. 3 minutes)
  7. Get back to the Lecture Unit and hide a page using that exercise and immediately save the Attachment Unit!
  8. The selected page and the Student Version should be shown automatically after 3 minutes

Testserver States

You can manage test servers using Helios. Check environment statuses in the environment list. To deploy to a test server, go to the CI/CD page, find your PR or branch, and trigger the deployment.

Review Progress

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Test Coverage

Class/File Line Coverage Confirmation (assert/expect)
SlideUnhideScheduleService.java 100%
SlideUnhideExecutionService.java 100%
SlideLifecycleService.java 100%
SlideUnhideService.java 93%

Screenshots

Summary by CodeRabbit

  • New Features

    • Introduced scheduling, querying, and management of slide lifecycle events, including scheduling and cancellation of slide unhide tasks.
    • Added a new API endpoint to retrieve scheduled slide events with pagination.
    • Slides now support lifecycle-based scheduling similar to exercises.
  • Refactor

    • Refactored slide unhide services to delegate scheduling and cancellation to a centralized scheduling service for improved consistency and maintainability.
    • Enhanced slide unhide service to coordinate scheduling and cancellation through both messaging and local scheduling.
    • Removed direct task management in slide unhide scheduling service, fully delegating to the centralized scheduling service.
  • Tests

    • Added comprehensive tests for slide unhide scheduling and execution, covering various scenarios and edge cases.
    • Updated existing tests to verify interactions with scheduling and execution services instead of messaging.

@github-project-automation github-project-automation bot moved this to Work In Progress in Artemis Development Apr 18, 2025
@github-actions github-actions bot added server Pull requests that update Java code. (Added Automatically!) core Pull requests that affect the corresponding module lecture Pull requests that affect the corresponding module labels Apr 18, 2025
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report201 ran196 passed3 skipped2 failed48m 59s 874ms
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 edit message in channel❌ failure26s 580ms
e2e/exercise/programming/ProgrammingExerciseStaticCodeAnalysis.spec.ts
ts.Static code analysis tests › Configures SCA grading and makes a successful submission with SCA errors❌ failure1m 48s 532ms

@github-actions github-actions bot added the tests label Apr 18, 2025
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report201 ran196 passed3 skipped2 failed48m 50s 583ms
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 edit message in channel❌ failure24s 618ms
e2e/exercise/programming/ProgrammingExerciseStaticCodeAnalysis.spec.ts
ts.Static code analysis tests › Configures SCA grading and makes a successful submission with SCA errors❌ failure1m 47s 439ms

Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report201 ran196 passed3 skipped2 failed49m 13s 595ms
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 edit message in channel❌ failure24s 722ms
e2e/exercise/programming/ProgrammingExerciseStaticCodeAnalysis.spec.ts
ts.Static code analysis tests › Configures SCA grading and makes a successful submission with SCA errors❌ failure1m 45s 578ms

Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report201 ran196 passed3 skipped2 failed48m 40s 276ms
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 edit message in channel❌ failure27s 90ms
e2e/exercise/programming/ProgrammingExerciseStaticCodeAnalysis.spec.ts
ts.Static code analysis tests › Configures SCA grading and makes a successful submission with SCA errors❌ failure1m 46s 920ms

Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report201 ran196 passed3 skipped2 failed50m 49s 443ms
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 edit message in channel❌ failure24s 444ms
e2e/exercise/programming/ProgrammingExerciseStaticCodeAnalysis.spec.ts
ts.Static code analysis tests › Configures SCA grading and makes a successful submission with SCA errors❌ failure1m 48s 633ms

Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report201 ran196 passed3 skipped2 failed50m 1s 556ms
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 edit message in channel❌ failure2m 4s 222ms
e2e/exercise/programming/ProgrammingExerciseStaticCodeAnalysis.spec.ts
ts.Static code analysis tests › Configures SCA grading and makes a successful submission with SCA errors❌ failure1m 44s 279ms

@helios-aet helios-aet bot temporarily deployed to artemis-test3.artemis.cit.tum.de April 19, 2025 21:22 Inactive
@eceeeren eceeeren marked this pull request as ready for review April 20, 2025 12:24
@eceeeren eceeeren requested review from a team and krusche as code owners April 20, 2025 12:24
Copy link
Contributor

coderabbitai bot commented Apr 20, 2025

Walkthrough

This update introduces comprehensive scheduling and lifecycle management for slide entities, mirroring the mechanisms previously available for exercises and participations. A new SlideLifecycle enum and SlideLifecycleService are added to support scheduling tasks based on slide lifecycle events, such as unhiding slides at specified times. The ScheduleService is extended to manage, query, and cancel scheduled slide tasks. The REST API is updated to provide endpoints for retrieving scheduled slide events. Slide unhide scheduling and execution logic is refactored to use the new scheduling infrastructure, and related test suites are added or updated to reflect these changes.

Changes

File(s) Change Summary
src/main/java/de/tum/cit/aet/artemis/core/service/ScheduleService.java Extended to support scheduling, tracking, querying, and managing lifecycle tasks for Slide entities, including new methods, a new record for scheduled slide events, and updated constructor.
src/main/java/de/tum/cit/aet/artemis/core/web/admin/AdminScheduleResource.java Renamed method for exercise schedules; added new REST endpoint and method to retrieve paginated scheduled slide events.
src/main/java/de/tum/cit/aet/artemis/lecture/domain/SlideLifecycle.java Introduced new SlideLifecycle enum with an abstract method for retrieving lifecycle dates from a slide; currently contains the UNHIDE event.
src/main/java/de/tum/cit/aet/artemis/lecture/service/SlideLifecycleService.java Added new service class for scheduling tasks tied to slide lifecycle events, with methods to schedule tasks at specified times or based on slide lifecycle data.
src/main/java/de/tum/cit/aet/artemis/lecture/service/SlideUnhideScheduleService.java Refactored to delegate all scheduling and cancellation logic to ScheduleService, removing direct scheduling and task management; constructor updated to accept ScheduleService.
src/main/java/de/tum/cit/aet/artemis/lecture/service/SlideUnhideService.java Refactored to directly manage scheduling and execution of slide unhide tasks using ScheduleService, removing dependency on messaging; updated logic for handling hidden date updates and immediate unhiding; constructor updated to accept optional ScheduleService.
src/main/java/de/tum/cit/aet/artemis/lecture/api/SlideLifecycleServiceApi.java Added new interface defining methods to schedule lifecycle-related tasks for slides, supporting scheduling with or without explicit dates.
src/test/java/de/tum/cit/aet/artemis/lecture/service/SlideUnhideExecutionServiceTest.java Added new test class covering slide unhide execution scenarios, including handling of attachments, missing slides, and exception cases.
src/test/java/de/tum/cit/aet/artemis/lecture/service/SlideUnhideScheduleServiceTest.java Added new test class verifying scheduling and cancellation behavior for slide unhide scheduling service, including interaction with dependencies and event handling.
src/test/java/de/tum/cit/aet/artemis/lecture/service/SlideUnhideServiceTest.java Refactored tests to use mocked scheduling and execution services; updated and added tests to verify correct scheduling, cancellation, and immediate execution logic for slide unhide operations.
gradle/jacoco.gradle Adjusted code coverage thresholds and maximum allowed uncovered classes for aggregated and core modules.
jest.config.js Slightly decreased global coverage threshold values for statements, branches, and lines.

Sequence Diagram(s)

sequenceDiagram
    participant Admin as AdminScheduleResource
    participant Schedule as ScheduleService
    participant SlideService as SlideLifecycleService
    participant Slide as Slide

    Admin->>Schedule: getAllSlideSchedules(pageable)
    Schedule->>Schedule: findAllSlideEvents(pageable)
    Schedule-->>Admin: Page<ScheduledSlideEvent>
Loading
sequenceDiagram
    participant SlideUnhideSched as SlideUnhideScheduleService
    participant SlideUnhide as SlideUnhideService
    participant Schedule as ScheduleService
    participant SlideExec as SlideUnhideExecutionService
    participant Slide as Slide

    SlideUnhideSched->>SlideUnhide: handleSlideHiddenUpdate(slide)
    alt slide.hidden == null
        SlideUnhide->>Schedule: cancelScheduledTaskForSlideLifecycle(slide.id, UNHIDE)
    else slide.hidden in past
        SlideUnhide->>Schedule: cancelScheduledTaskForSlideLifecycle(slide.id, UNHIDE)
        SlideUnhide->>SlideExec: unhideSlide(slide.id)
    else slide.hidden in future
        SlideUnhide->>Schedule: cancelScheduledTaskForSlideLifecycle(slide.id, UNHIDE)
        Schedule->>Schedule: scheduleSlideTask(slide, UNHIDE, ...)
    end
Loading

Possibly related PRs

Suggested labels

ready for review, ready to merge

Suggested reviewers

  • krusche
  • Anishyou
  • HawKhiem

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 421143a and 2a6a53b.

📒 Files selected for processing (1)
  • src/test/java/de/tum/cit/aet/artemis/lecture/service/SlideUnhideServiceTest.java (6 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/test/java/de/tum/cit/aet/artemis/lecture/service/SlideUnhideServiceTest.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: Build and Push Docker Image / Build Docker Image for ls1intum/artemis
  • GitHub Check: Build and Push Docker Image / Build Docker Image for ls1intum/artemis
  • GitHub Check: Build .war artifact
  • GitHub Check: client-style
  • GitHub Check: server-style
  • GitHub Check: client-tests
  • GitHub Check: server-tests
  • GitHub Check: Analyse
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/lectures/create-slide-lifecycle

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

coderabbitai[bot]
coderabbitai bot previously approved these changes Jun 27, 2025
Copy link

End-to-End (E2E) Test Results Summary

@github-actions github-actions bot removed the stale label Jun 28, 2025
@krusche krusche removed this from the 8.2.0 milestone Jun 29, 2025
coderabbitai[bot]
coderabbitai bot previously approved these changes Jul 7, 2025
coderabbitai[bot]
coderabbitai bot previously approved these changes Jul 7, 2025
Copy link

github-actions bot commented Jul 7, 2025

End-to-End (E2E) Test Results Summary

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

coderabbitai[bot]
coderabbitai bot previously approved these changes Jul 7, 2025
Copy link

github-actions bot commented Jul 7, 2025

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report201 ran197 passed3 skipped1 failed52m 16s 158ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/exercise/programming/ProgrammingExerciseParticipation.spec.ts
ts.Programming exercise participation › Programming exercise team participation › Team members make git submissions❌ failure38s 485ms

@helios-aet helios-aet bot temporarily deployed to artemis-test1.artemis.cit.tum.de July 7, 2025 10:50 Inactive
Copy link

github-actions bot commented Jul 7, 2025

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report201 ran196 passed3 skipped2 failed55m 10s 814ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/exercise/quiz-exercise/QuizExerciseParticipation.spec.ts
ts.Quiz Exercise Participation › DnD Quiz participation › Student can participate in DnD Quiz❌ failure2m 3s 197ms
e2e/exercise/programming/ProgrammingExerciseParticipation.spec.ts
ts.Programming exercise participation › Programming exercise team participation › Team members make git submissions❌ failure38s 8ms

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/test/java/de/tum/cit/aet/artemis/lecture/service/SlideUnhideServiceTest.java (1)

35-36: Consider using @MockitoBean instead of @MockitoSpyBean for manually created service.

Since you're manually instantiating the SlideUnhideService with mocked dependencies, using @MockitoSpyBean for slideUnhideExecutionService may not be the intended approach. Consider using @MockitoBean for cleaner mock management.

-    @MockitoSpyBean
+    @MockitoBean
     private SlideUnhideExecutionService slideUnhideExecutionService;
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1f5b343 and 421143a.

📒 Files selected for processing (1)
  • src/test/java/de/tum/cit/aet/artemis/lecture/service/SlideUnhideServiceTest.java (6 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`src/test/java/**/*.java`: test_naming: descriptive; test_size: small_specific; ...

src/test/java/**/*.java: test_naming: descriptive; test_size: small_specific; fixed_data: true; junit5_features: true; assert_use: assertThat; assert_specificity: true; archunit_use: enforce_package_rules; db_query_count_tests: track_performance; util_service_factory_pattern: true; avoid_db_access: true; mock_strategy: static_mocks; context_restart_minimize: true

⚙️ Source: CodeRabbit Configuration File

List of files the instruction was applied to:

  • src/test/java/de/tum/cit/aet/artemis/lecture/service/SlideUnhideServiceTest.java
🧠 Learnings (2)
📓 Common learnings
Learnt from: julian-christl
PR: ls1intum/Artemis#7993
File: src/main/java/de/tum/in/www1/artemis/service/scheduled/cache/quiz/QuizScheduleService.java:515-518
Timestamp: 2024-06-10T19:44:09.116Z
Learning: The additional database call for initializing team's students in `QuizScheduleService` is considered to have minimal performance impact due to the rarity of the endpoint's usage, as assessed by `julian-christl`.
Learnt from: SamuelRoettgermann
PR: ls1intum/Artemis#9303
File: src/main/java/de/tum/in/www1/artemis/service/exam/StudentExamService.java:296-300
Timestamp: 2024-10-20T18:37:45.365Z
Learning: When reviewing code changes in `StudentExamService.saveSubmission`, if the PR aims to improve readability without changing logic, avoid suggesting changes that alter logic, such as adding exceptions in the default case of switch statements.
src/test/java/de/tum/cit/aet/artemis/lecture/service/SlideUnhideServiceTest.java (12)
Learnt from: julian-christl
PR: ls1intum/Artemis#8052
File: src/test/java/de/tum/in/www1/artemis/lecture/CompetencyIntegrationTest.java:310-310
Timestamp: 2024-06-10T19:44:09.116Z
Learning: Modifications to parameters in `competencyProgressUtilService.createCompetencyProgress` for debugging purposes are considered irrelevant to the test outcomes but helpful for clarity during debugging.
Learnt from: magaupp
PR: ls1intum/Artemis#9751
File: src/test/java/de/tum/cit/aet/artemis/programming/util/ProgrammingExerciseFactory.java:143-148
Timestamp: 2024-11-26T20:43:17.588Z
Learning: In `src/test/java/de/tum/cit/aet/artemis/programming/util/ProgrammingExerciseFactory.java`, the test package name assigned in `populateUnreleasedProgrammingExercise` does not need to adhere to naming conventions.
Learnt from: Strohgelaender
PR: ls1intum/Artemis#8574
File: src/main/java/de/tum/in/www1/artemis/service/tutorialgroups/TutorialGroupService.java:0-0
Timestamp: 2024-10-08T15:35:42.972Z
Learning: The `tryToFindMatchingUsers` method in `TutorialGroupService.java` has been updated to skip registrations without a student, enhancing the method's robustness. This change was implemented in commit `bef30f9751de0913143e8cb28cc0088264052261`.
Learnt from: alexjoham
PR: ls1intum/Artemis#9455
File: src/test/java/de/tum/cit/aet/artemis/iris/IrisTextExerciseChatMessageIntegrationTest.java:401-401
Timestamp: 2024-10-15T11:33:17.915Z
Learning: In the Artemis project, when new fields are added to classes like `PyrisChatStatusUpdateDTO`, corresponding tests may be implemented in separate integration test classes such as `IrisChatTokenTrackingIntegrationTest`.
Learnt from: SimonEntholzer
PR: ls1intum/Artemis#9918
File: src/main/java/de/tum/cit/aet/artemis/programming/service/sshuserkeys/UserSshPublicKeyExpiryNotificationService.java:52-57
Timestamp: 2024-12-13T16:34:24.743Z
Learning: In `UserSshPublicKeyExpiryNotificationService`, changing the visibility of `notifyUserOnExpiredKey()` or modifying its lambda return value can cause issues and should be avoided.
Learnt from: SimonEntholzer
PR: ls1intum/Artemis#9345
File: src/main/java/de/tum/cit/aet/artemis/core/service/telemetry/TelemetryService.java:0-0
Timestamp: 2024-10-08T21:46:22.597Z
Learning: In the `TelemetryService` class, the fields `useTelemetry`, `sendAdminDetails`, `eurekaEnabled`, and `sendingDelay` are intentionally kept public for testability purposes.
Learnt from: SamuelRoettgermann
PR: ls1intum/Artemis#10921
File: src/test/java/de/tum/cit/aet/artemis/exam/ExamIntegrationTest.java:1334-1339
Timestamp: 2025-06-15T04:13:22.541Z
Learning: In Artemis ExamIntegrationTest, time difference assertions use ChronoUnit.MILLIS.between().isLessThan(1) without Math.abs() because the server only stores and retrieves timestamp values without calling now(), making differences predictable and consistent due to serialization/storage precision rather than timing variations.
Learnt from: jakubriegel
PR: ls1intum/Artemis#8050
File: src/test/java/de/tum/in/www1/artemis/plagiarism/PlagiarismUtilService.java:62-66
Timestamp: 2024-10-08T15:35:42.972Z
Learning: The `createCourseWithUsers` method in `PlagiarismUtilService.java` uses fixed inputs as it is designed to be a test helper method for simplifying the setup of courses and users in tests.
Learnt from: jakubriegel
PR: ls1intum/Artemis#8050
File: src/test/java/de/tum/in/www1/artemis/plagiarism/PlagiarismUtilService.java:62-66
Timestamp: 2024-06-10T19:44:09.116Z
Learning: The `createCourseWithUsers` method in `PlagiarismUtilService.java` uses fixed inputs as it is designed to be a test helper method for simplifying the setup of courses and users in tests.
Learnt from: jakubriegel
PR: ls1intum/Artemis#8050
File: src/test/java/de/tum/in/www1/artemis/plagiarism/PlagiarismUtilService.java:125-136
Timestamp: 2024-06-10T19:44:09.116Z
Learning: The `createTeamTextExerciseAndSimilarSubmissions` method in `PlagiarismUtilService.java` uses fixed inputs as it is designed to be a test helper method for simplifying the setup of team exercises and submissions in tests.
Learnt from: jakubriegel
PR: ls1intum/Artemis#8050
File: src/test/java/de/tum/in/www1/artemis/plagiarism/PlagiarismUtilService.java:125-136
Timestamp: 2024-10-08T15:35:48.767Z
Learning: The `createTeamTextExerciseAndSimilarSubmissions` method in `PlagiarismUtilService.java` uses fixed inputs as it is designed to be a test helper method for simplifying the setup of team exercises and submissions in tests.
Learnt from: valentin-boehm
PR: ls1intum/Artemis#7384
File: src/test/java/de/tum/in/www1/artemis/exam/StudentExamIntegrationTest.java:975-980
Timestamp: 2024-06-10T19:44:09.116Z
Learning: The `testSubmitStudentExam_notInTime` method does not require additional checks to verify the state of `studentExam1` after receiving a `HttpStatus.FORBIDDEN` because the control flow in the `StudentExamResource` is straightforward and ensures no state change occurs.
🧬 Code Graph Analysis (1)
src/test/java/de/tum/cit/aet/artemis/lecture/service/SlideUnhideServiceTest.java (2)
src/main/webapp/app/lecture/shared/entities/lecture-unit/attachmentVideoUnit.model.ts (1)
  • AttachmentVideoUnit (5-15)
src/main/webapp/app/lecture/shared/entities/lecture-unit/slide.model.ts (1)
  • Slide (4-10)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Build and Push Docker Image / Build Docker Image for ls1intum/artemis
  • GitHub Check: Build and Push Docker Image / Build Docker Image for ls1intum/artemis
  • GitHub Check: Build .war artifact
  • GitHub Check: client-style
  • GitHub Check: client-tests
  • GitHub Check: server-style
  • GitHub Check: server-tests
  • GitHub Check: Analyse
🔇 Additional comments (4)
src/test/java/de/tum/cit/aet/artemis/lecture/service/SlideUnhideServiceTest.java (4)

74-104: Well-structured test with comprehensive verification.

The test effectively verifies the scheduling behavior for future hidden dates, including proper argument capture and verification of method calls. The use of ArgumentCaptor to verify specific parameters passed to scheduleSlideTask is thorough.


106-129: Comprehensive test coverage for past hidden date scenario.

The test properly verifies that slides with past hidden dates are immediately unhidden rather than scheduled, which is the expected behavior. The verification that scheduling methods are not called is important for ensuring correct logic flow.


146-158: Good verification of cancellation behavior.

The test properly verifies that when a slide's hidden date is set to null, the scheduled task is canceled and no new scheduling or immediate unhiding occurs. The comprehensive verification of what should NOT happen (using never()) is excellent.


168-178: Effective test for immediate unhide scenario.

The test cleverly uses handleSlideHiddenUpdate with a past date to trigger immediate unhiding, which is a good approach for testing the unhide functionality. The verification of both cancellation and execution is thorough.

Copy link

github-actions bot commented Jul 7, 2025

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report201 ran196 passed3 skipped2 failed55m 59s 280ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/exercise/programming/ProgrammingExerciseParticipation.spec.ts
ts.Programming exercise participation › Programming exercise team participation › Team members make git submissions❌ failure44s 5ms
e2e/exercise/programming/ProgrammingExerciseStaticCodeAnalysis.spec.ts
ts.Static code analysis tests › Configures SCA grading and makes a successful submission with SCA errors❌ failure2m 8s 872ms

coderabbitai[bot]
coderabbitai bot previously approved these changes Jul 7, 2025
Copy link

github-actions bot commented Jul 7, 2025

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report201 ran174 passed6 skipped21 failed3h 5m 26s 572ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/exam/ExamChecklists.spec.ts
ts.Exam Checklists › Individual exam generation and exam preparation checks › Instructor generates individual exams, prepares exercises for start and corresponding checks are marked❌ failure2m 22s 137ms
e2e/exam/ExamDateVerification.spec.ts
ts.Exam date verification › Exam timing › Student can start after start Date❌ failure2m 22s 565ms
ts.Exam date verification › Exam timing › Exam ends after end time❌ failure2m 24s 769ms
e2e/exam/ExamResults.spec.ts
ts.Exam Results › Check exam exercise results › Check exam results for text exercise › Check exam result overview❌ failure2m 28s 425ms
e2e/exam/ExamTestRun.spec.ts
ts.Exam test run › Creates a test run❌ failure2m 34s 747ms
ts.Exam test run › Manage a test run › Changes test run working time❌ failure2m 28s 884ms
ts.Exam test run › Manage a test run › Conducts a test run❌ failure2m 29s 949ms
ts.Exam test run › Delete a test run › Deletes a test run❌ failure2m 38s 789ms
e2e/exercise/ExerciseImport.spec.ts
ts.Import exercises › Imports exercises › Imports text exercise❌ failure3m 2s 842ms
ts.Import exercises › Imports exercises › Imports quiz exercise❌ failure2m 53s 34ms
ts.Import exercises › Imports exercises › Imports modeling exercise❌ failure3m 4s 214ms
e2e/exam/ExamAssessment.spec.ts
ts.Exam assessment › Text exercise assessment › Assess a text exercise submission❌ failure
e2e/exam/ExamParticipation.spec.ts
ts.Exam participation › Early Hand-in › Participates as a student in a registered exam❌ failure7m 47s 144ms
ts.Exam participation › Early Hand-in › Using navigation sidebar to navigate within exam❌ failure3m 35s 459ms
e2e/exam/test-exam/TestExamParticipation.spec.ts
ts.Test exam participation › Early Hand-in › Participates as a student in a registered test exam❌ failure5m 34s 185ms
ts.Test exam participation › Early Hand-in › Using exercise sidebar to navigate within exam❌ failure4m 33s 316ms
ts.Test exam participation › Early Hand-in › Using exercise overview to navigate within exam❌ failure4m 26s 938ms
e2e/exam/test-exam/TestExamStudentExams.spec.ts
ts.Test Exam - student exams › Check exam participants and their submissions › Open the list of exam students❌ failure6m 51s 947ms
e2e/exam/test-exam/TestExamTestRun.spec.ts
ts.Test exam test run › Creates a test run❌ failure4m 35s 681ms
ts.Test exam test run › Manage a test run › Conducts a test run❌ failure4m 10s 417ms
e2e/exercise/programming/ProgrammingExerciseParticipation.spec.ts
ts.Programming exercise participation › Programming exercise team participation › Team members make git submissions❌ failure2m 2s 312ms

@bassner bassner added this to the 8.2.3 milestone Jul 8, 2025
@bassner bassner merged commit a5e556e into develop Jul 8, 2025
25 of 30 checks passed
@github-project-automation github-project-automation bot moved this from Ready For Review to Merged in Artemis Development Jul 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Pull requests that affect the corresponding module lecture Pull requests that affect the corresponding module server Pull requests that update Java code. (Added Automatically!) tests
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

7 participants