feature: increase project coverage#43
Merged
Nacchofer31 merged 10 commits intomasterfrom Mar 22, 2026
Merged
Conversation
…omFilmViewModel`, and `RandomFilmScreen` - **Repository**: Added tests for HTTP error handling (server errors) and fallback logic when poster page requests or script parsing fails. - **ViewModel**: Added tests for username changes, clearing states on info click, managing the search list, toggling film search modes (UNION/INTERSECTION), and handling multi-user submissions. - **UI (Android)**: Added instrumented tests to verify error view visibility for remote errors and visibility of the submit button during multi-user searches.
…omFilmViewModel`, and `RandomFilmScreen` - **Repository**: Added tests for HTTP error handling (server errors) and fallback logic when poster page requests or script parsing fails. - **ViewModel**: Added tests for username changes, clearing states on info click, managing the search list, toggling film search modes (UNION/INTERSECTION), and handling multi-user submissions. - **UI (Android)**: Added instrumented tests to verify error view visibility for remote errors and visibility of the submit button during multi-user searches.
…feature/increase-coverage
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Increase test coverage and exclude non-coverable files from JaCoCo
What was done
New unit tests (commonTest):
ResultDataTest— extension functionsmap,onSuccess,onError,asEmptyDataResultRandomFilmMappersTest—FilmDto.toFilm()including edge case with emptyreleaseYearDataErrorTest— allRemoteandLocalenum entriesRandomBoxdEndpointsTest— all endpoint URL builder functionsDefaultDispatchersTest—ioanddefaultdispatcher propertiesRandomFilmViewModelTest— extended withOnUserNameChanged,OnInfoButtonClick,OnAddOrRemoveUserNameSearchList,OnFilmSearchModeToggle,OnUserNameAdded,OnRemoveUserName,OnFilmClicked, and multi-user submitRandomFilmScrappingRepositoryTest— extended with HTTP error paths (500 responses), fallback image URL when poster fetch fails, and no-script-tag edge caseRandomFilmMappersTest— mapper field mapping correctnessNew instrumented tests (androidInstrumentedTest):
RandomFilmScreenTest— added tests for error state rendering (FilmErrorView) andUnionIntersectionSwitchvisibilityJaCoCo exclusions (
fileFilter):AndroidPlatform,MainActivity,Platform,OnboardingPreferences,ComposableSingletons$MainActivityKt)UsernameDatabase_Impl,UserNameDao_Impl,UserNameDatabaseConstructor)inlinefunctions, which JaCoCo cannot track at declaration site (ResultData,RandomBoxdHttpClientExtKt)RandomFilmRepository)RandomBoxdTheme)$$inlined$items*,$special$$inlined*)