Commit 9d62a12
committed
refactor: Stabilize and multiplatform UI tests
This commit refactors the UI testing infrastructure to improve stability and enable multiplatform testing. It introduces a new `ui:test` module for common UI test logic and stabilizes tests by using idling resources.
### Key Changes
- **New `ui:test` Module**
- A new Gradle module, `ui:test`, has been created to house multiplatform UI tests.
- Existing UI test cases (`CrudTestCase`, `SettingPasswordTestCase`, etc.) and screen objects have been moved from `ui/test-jvm` to `ui:test/src/commonMain` to enable them to run on all platforms (Android, iOS, Desktop, and Web).
- `ui:test-jvm` now contains only JVM-specific utilities, such as the bridge between `ComposeContentTestRule` and the multiplatform `ComposeUiTest`.
- **UI Test Stabilization with Idling Resources**
- Introduced `CountingIdlingRes`, a new utility in `core/domain` to track the state of long-running asynchronous operations in ViewModels.
- ViewModels now increment/decrement this counter during operations like database access or encryption changes.
- A `ComposeCountingIdlingResource` has been added to `ui/test-jvm` to integrate with the Compose test framework, making tests wait for async operations to complete, thus preventing flakiness.
- **Test Tagging and Navigation**
- Added explicit test tags to UI components in security dialogs (`EnterPasswordDialog`, `ConfirmPasswordDialog`, `ChangePasswordDialog`) and the `SignInScreen` for more reliable test node selection.
- Improved the `RouterImpl` by setting `launchSingleTop = true` for all navigation actions to prevent duplicate screen instances.
- Added abstract navigation tests (`AbstractNavigationTest`) for Android and Desktop to verify router behavior.
- **Dependency and Version Updates**
- Upgraded Kotlin to version `2.3.0` and updated various other dependencies like `androidx.activityCompose` and `androidx.paging`.
- Bumped the application version to `8.4.9` for Android, iOS, and Desktop.
- Added a `CHANGELOG.md` file to document project changes.
- **Minor Refinements**
- Removed the `android_ui_test_job` dependency on `build_job` in the GitHub Actions workflow.
- Cleaned up and improved formatting in `.podspec` files.
- Added a "Save" string resource used in password dialogs.1 parent e10ad80 commit 9d62a12
File tree
96 files changed
+2823
-1080
lines changed- .github/workflows
- app
- android
- src/androidTest/java/com/softartdev/notedelight/ui
- desktop
- src/jvmTest/kotlin/com/softartdev/notedelight/ui
- ios-kit
- iosApp
- Pods
- Local Podspecs
- Pods.xcodeproj
- iosApp.xcodeproj
- iosApp
- core
- data/db-sqldelight
- domain/src/commonMain/kotlin/com/softartdev/notedelight/util
- presentation/src/commonMain/kotlin/com/softartdev/notedelight/presentation
- settings
- security
- change
- confirm
- enter
- signin
- splash
- docs
- gradle
- ui
- test-jvm
- src/main/kotlin/com/softartdev/notedelight
- di
- ui
- screen
- dialog
- util
- test
- src
- androidMain/kotlin/com/softartdev/notedelight
- commonMain/kotlin/com/softartdev/notedelight
- di
- ui
- cases
- screen
- dialog
- commonTest/kotlin/com/softartdev/notedelight
- iosMain/kotlin/com/softartdev/notedelight
- jvmMain/kotlin/com/softartdev/notedelight
- wasmJsMain/kotlin/com/softartdev/notedelight
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
96 files changed
+2823
-1080
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
0 commit comments