-
Notifications
You must be signed in to change notification settings - Fork 143
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
✅ Re-implement the Instrumented Tests with Compose Multiplatform #674
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
375c275
to
c54e95e
Compare
This file was created a while ago because the test dependencies didn't have it it was failing on some Android SDK versions. We don't need this anymore because it's duplicating the embedded resource.
Since the strings are provided different on each platform, a new provider with "expected" code was created. Since the idea is only using for UI tests for now, it was not added to the DI graph and the context is injected directly to the reference.
Basic configuration added based on the official docs. https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-test.html
One of the most simple test were implemented to start the new era!
Adding accessibility sync options not only provides a better UX experience for all users but also allows Maestro to get the appropriate areas, ids and content descriptions.
Test and structure updated.
Lint fixed!
The iOS test framework is not playing well with WindowClassSize and iOS NotificationCenter, failing the Gradle task. A new structure was created to fake those modules with no-op implementations.
After spending hours trying to understand why the iOS tests were not running and getting stuck, I founded out that the issue is the `rememberRefreshKey()`. In the iOS tests, the `delay` calls are not being respected and since we have a 1-minute delay for the Task Screen, it is infinite looping. For now, we are simply removing it. A new issue was opened in the Compose Multiplatform project to get a better understanding of the behavior. JetBrains/compose-multiplatform#4805
Cleaning the house
Changes made in the build.yml and instrumented_tests.yml to run the instrumented tests for both iOS and Android. The build.yml was updated to remove the unit tests from the build step, otherwise, it will try to run the UI tests during that step. Not the perfect solution, but good enough for now. The Android Emulator Runner was also updated and it's running much faster with the new recommended setup.
Removing the tests that only runs in Jetpack Compose. Next commits will re-add them in the Compose Multiplatform way.
Instead of having two files containing UI Test-related functions, now everything is inside AlkaaTest.kt.
Some of the functions used in the code are not properly supported in the iOS Simulator. Some modifications and fake classes are injected to make it possible.
Here we go! For now, the notification tests are not ported because they are framework-dependant. But at least the other tests can give us more confidence about the new changes.
New test added to the recently added feature to add alarms via the bottom sheet.
Small changes in injection structure and adding more KDocs.
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.
Port the Android-only UI tests to Compose Multiplatform. Some tests were removed, such as the notifications, but the existing ones can give the level of reliance I need for now.