Add HiltApplicationTestRunner to execute instrumented android tests with hilt
Introduce ComposeContentActivity in design module, in order to be able to start single screen instrumented tests in non-app modules - see OnboardingScreenTest.kt in onboarding module for example usage
Introduce test identifier (test tags) on relevant compose nodes of the screens in order to reference in UI tests
Introduce some extension helper functions on ComposeTestRule and Modifier
Add OnboardingScreenTest in onboarding module using fake repository (via a test hilt module) and screen display and click interaction
Simulator - Introduced the concept of simulators. Wrappers around ComposeTestRule with a DSL-like API to interact with a certain composable screen.
app
AppNavigationTest - Several test methods that invoke navigation via Navigator component and ensure display of the expected screen
OnboardingFlowTest tests the display of the initial onboarding screens and the navigation to the next expected one
Included several simulators that can also be reused in future tests - We can think of extracting all the simulators in a separate module for reusability among modules
TODO:
Add Github action to run connectedAndroidTest (issue #21) in CI and include in codecov
:recycle: Current situation & Problem
Link any open issues or pull requests (PRs) related to this PR. Please ensure that all non-trivial PRs are first tracked and discussed in an existing GitHub issue or discussion.
:gear: Release Notes
Add a bullet point list summary of the feature and possible migration guides if this is a breaking change so this section can be added to the release notes.Include code snippets that provide examples of the feature implemented or links to the documentation if it appends or changes the public interface.
:books: Documentation
Please ensure that you properly document any additions in conformance to Spezi Documentation Guide.You can use this section to describe your solution, but we encourage contributors to document your reasoning and changes using in-line documentation.
:white_check_mark: Testing
Please ensure that the PR meets the testing requirements set by CodeCov and that new functionality is appropriately tested.This section describes important information about the tests and why some elements might not be testable.
:pencil: Code of Conduct & Contributing Guidelines
Instrumentation tests
HiltApplicationTestRunner
to execute instrumented android tests with hiltComposeContentActivity
indesign
module, in order to be able to start single screen instrumented tests in non-app modules - seeOnboardingScreenTest.kt
inonboarding
module for example usageComposeTestRule
andModifier
OnboardingScreenTest
in onboarding module using fake repository (via a test hilt module) and screen display and click interactionSimulator
- Introduced the concept of simulators. Wrappers aroundComposeTestRule
with a DSL-like API to interact with a certain composable screen.app
AppNavigationTest
- Several test methods that invoke navigation viaNavigator
component and ensure display of the expected screenOnboardingFlowTest
tests the display of the initial onboarding screens and the navigation to the next expected oneTODO:
connectedAndroidTest
(issue #21) in CI and include in codecov:recycle: Current situation & Problem
Link any open issues or pull requests (PRs) related to this PR. Please ensure that all non-trivial PRs are first tracked and discussed in an existing GitHub issue or discussion.
:gear: Release Notes
Add a bullet point list summary of the feature and possible migration guides if this is a breaking change so this section can be added to the release notes. Include code snippets that provide examples of the feature implemented or links to the documentation if it appends or changes the public interface.
:books: Documentation
Please ensure that you properly document any additions in conformance to Spezi Documentation Guide. You can use this section to describe your solution, but we encourage contributors to document your reasoning and changes using in-line documentation.
:white_check_mark: Testing
Please ensure that the PR meets the testing requirements set by CodeCov and that new functionality is appropriately tested. This section describes important information about the tests and why some elements might not be testable.
:pencil: Code of Conduct & Contributing Guidelines
By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines: