-
Notifications
You must be signed in to change notification settings - Fork 15
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
Feat core testing #14
Merged
Merged
Conversation
This file contains 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
Owner
shinhyo
commented
Aug 27, 2024
•
edited
Loading
edited
- Add Kover: Introduced the Kover plugin to measure code coverage. (d3555ab, d6bb96c, 9743344)
- Enable Kover Report on Check: Enabled Kover report generation during code checks. (84d6bd1)
Update dependencies to their latest versions, including: - Android Gradle Plugin to 8.5.2 - Android Tools to 31.5.2 - Kotlin to 2.0.10 - KSP to 2.0.10-1.0.24 - Jetpack Compose to 1.7.0-beta07 - Coil to 2.7.0 - Haze to 0.7.2
This commit migrates all Java files in the project to Kotlin. This change improves code readability, concis eness, and maintainability.
Migrate from Gson to Kotlin Serialization for JSON parsing. This includes updating dependencies, annotations, and data classes . Also, enable HttpLoggingInterceptor for debugging in non-production builds.
Updated README.md to reflect the use of Kotlin Serialization in the project.
Update Kotlin version to 2.0.20-RC2 and KSP to 2.0.20-RC2-1.0.24.
- Separated image and info states for better data management. - Improved UI by adding spacing between elements. - Updated chip display for character categories. - Removed unnecessary list structure in UI state.
This commit updates the character model and UI to improve the user experience. Specific changes include: - Removing unnecessary fields from the character model. - Updating the UI to reflect the changes to the character model. - Improving the layout and styling of the character list and detail screens. - Fixing a bug that caused the favorite icon to not be displayed correctly.
This commit updates the kotlinxSerializationJson library to version 1.7.1.
This commit updates the project to use Jetpack Compose Navigation 2 .8.0-beta07 and migrates the navigation logic to use the new `composable<T>` API. Specific changes include: - Updating the `androidxNavigation` version in `gradle/libs.versions.toml`. - Replacing the old `composable` calls with `composable <T>` in `BottomBarNavigation.kt` and `DetailNavigation.kt`. - Updating the `DetailViewModel` to retrieve arguments using the new API. - Updating the `BrbaApp` to use the new `bottomBarComposable` function. - Applying the `org.jetbrains.kotlin.plugin.serialization` plugin to the feature modules. - Adding the `kotlinx.serialization.json` dependency to the feature modules.
This commit updates the Kotlin version used in the project to 2.0 .20-RC2. It also updates the corresponding badge in the README.md file.
This commit adds the character description to the detail screen, displaying it below the character's nickname and category chips. Specific changes include: - Adding a `description` field to the `CharacterResponse` and `BrbaCharacter` models. - Updating the RetrofitNetwork to ignore unknown keys when parsing JSON responses. - Modifying the DetailScreen to display the character description in a Text composable. - Adjusting the layout of the DetailScreen to accommodate the new description field.
This commit disables the debuggable flag in debug builds and fixes an issue with character ratios. The debuggable flag is now set to false for debug builds, preventing accidental debugging in production. The character ratio calculation has been improved to ensure consistency and avoid potential issues.
This commit introduces a new composable function called `BrbaChips` for displaying a list of chips. The `BrbaChips` composable takes a list of strings and displays them as chips with rounded corners, a border, and a background color. It is used in the `DetailScreen` to display the categories of a character. This change improves the UI by providing a consistent and visually appealing way to display chips.
This commit introduces a new module, `core:testing`, to the project. This module provides testing utilities and dependencies for other modules. The following changes were made: - Created the `core:testing` module with a basic build configuration. - Added dependencies on other core modules and testing libraries. - Included the module in the project's settings. - Added a `.gitignore` file and `proguard- rules.pro` file for the module. - Updated the `libs.versions.toml` file to include the `kotlinx-coroutines-test` dependency.
This commit moves files related to the list and setting features to their respective feature packages. - ListViewModel. kt is moved from feature/main to feature/list. - SettingNavigation.kt is moved from feature/main/navigation to feature/setting/navigation. - SettingScreen.kt is moved from feature/main to feature/setting. - ListNavigation.kt is moved from feature/main/navigation to feature/list/navigation. - SettingViewModel.kt is moved from feature/main to feature/setting. - ListScreen.kt is moved from feature/main to feature/list. This change improves the organization of the codebase and makes it easier to maintain.
This commit adds the necessary infrastructure for unit testing ViewModels. - Added dependencies for testing: MockK, Turbine, and JUnit. - Created a base class for ViewModel tests (`BaseViewModelTest`) to provide common setup and dependencies. - Created a test rule (`MainDispatcherRule`) to manage the main dispatcher for testing. - Added a sample test for the `ListViewModel`.
This commit adds unit tests for the ListViewModel, covering the following scenarios: - Fetching character list and device data on creation - Toggling favorite status of a character - Changing the theme mode - Handling exceptions when changing the theme from system mode
Update Kotlin to 2.0.20, KSP to 2.0.20-1.0. 24, and Jetpack Compose to 2024.08.00.
- Refactor ListViewModelTest to use Given-When-Then style for better readability. - Add a test case to handle RuntimeException when fetching character list. - Move default mock data setup to BaseViewModelTest for reusability.
Added unit tests for FavoriteViewModel to verify its behavior in different scenarios, including: - Initial state is Loading - Success state with data when favorites exist - Error state when getFavoriteListUseCase throws an exception - Empty state when no favorites exist - Invocation of updateFavoriteUseCase when onFavoriteClick is called Also, renamed `updateFavorite` function to `onFavoriteClick` for clarity.
This commit adds kover to the project for code coverage analysis. - Adds kover dependency to the build logic . - Configures kover for Android modules, including filters for specific classes and variants. - Applies kover plugin to feature modules.
…raintlayoutCompose This commit updates the version of androidDes ugarJdkLibs to 2.1.0 and removes the dependency on androidxConstraintlayoutCompose.
Apply spotless formatting to the codebase.
This commit adds kover to the project for code coverage analysis and integrates it with the CI workflow. - Adds kover dependency and configuration for Android modules. - Includes a step to generate kover XML reports in the build workflow. - Utilizes the madrapps/jacoco-report action to display test coverage and enforce minimum coverage thresholds. - Adjusts the build trigger to run on pull requests instead of pushes to the develop branch. - Reduces the build timeout to 30 minutes.
test coverage report
Files
|
This commit updates the jacoco-report action to v1.6.1 and fixes the path to the kover report in the workflow. The updated path now points to the correct location of the kover report within the feature modules. This ensures that the coverage report is generated correctly and displayed in the workflow.
shinhyo
force-pushed
the
feat_core_testing
branch
from
August 27, 2024 01:47
41b7190
to
fe78ed1
Compare
This commit adds kover to the project for code coverage analysis and updates the README to reflect the changes. - Adds kover dependency to the build logic. - Updates README with information about kover.
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.