Conversation
Added tests to verify `MarkChaptersRemote` handles merged/non-merged chapters and conditionally bypasses external status calls when `skipSync` is true. Co-authored-by: nonproto <2092019+nonproto@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
There was a problem hiding this comment.
Code Review
This pull request introduces unit tests for the MarkChaptersRemote use case, specifically covering the skipSync edge case and the synchronization of mixed chapters. It also updates the project's testing documentation to reflect learnings regarding MockK verification. A review comment identified a compilation error in the test assertions where an invalid property was accessed on the chapter object, providing a suggestion to use the correct identifier property.
| coVerify(exactly = 1) { | ||
| statusHandler.markMergedChaptersStatus( | ||
| chapters = | ||
| match { it.size == 1 && it.first().mangadex_chapter_id == "md-chapter-2" }, |
There was a problem hiding this comment.
The property mangadex_chapter_id is not a member of the SChapter interface. In this project, the chapter identifier is typically stored in the url property of SChapter after conversion from SimpleChapter. Using an undefined property will cause a compilation error.
| match { it.size == 1 && it.first().mangadex_chapter_id == "md-chapter-2" }, | |
| match { it.size == 1 && it.first().url == "md-chapter-2" }, |
💡 What: Added unit tests for
MarkChaptersRemoteUseCase to verify proper updating of merged and non-merged chapter reading statuses, as well as testing theskipSyncearly exit logic.🎯 Why: Ensures regressions are not introduced to the
MarkChaptersRemotesyncing logic when dealing with mixed sets of chapters and that theskipSyncparameter accurately prevents unnecessary network calls.PR created automatically by Jules for task 6049267990904438320 started by @nonproto