Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces an initial Kaspresso-based instrumentation “integration test” flow (mixing Espresso/Kakao screens with UI Automator for the external browser), updates AndroidX test dependency versions, and temporarily disables a set of currently failing/flaky existing androidTest tests.
Changes:
- Add Kaspresso dependency and include
src/integrationTest/javain theandroidTestsource set. - Add the first Kaspresso test (
LoginScreenTest) plus screen objects for key app/browser UI. - Update AndroidX test/espresso versions and mark multiple existing instrumentation tests as
@Ignoreto unblock local runs.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 16 comments.
Show a summary per file
| File | Description |
|---|---|
| opencloudComLibrary/src/main/java/eu/opencloud/android/lib/resources/shares/GetRemoteShareesOperation.kt | Adjusts KDoc for constructor params (currently introduces a param-name inconsistency). |
| opencloudComLibrary/build.gradle | Switches AndroidX test core dependency to version-catalog alias. |
| opencloudApp/src/integrationTest/java/screens/StartScreen.kt | Adds Kakao/Kaspresso screen for initial account setup UI. |
| opencloudApp/src/integrationTest/java/screens/MainScreen.kt | Adds Kakao/Kaspresso screen for main activity UI. |
| opencloudApp/src/integrationTest/java/screens/ManageAccountsDialog.kt | Adds screen model for account removal flow (currently uses hardcoded text + naming typo). |
| opencloudApp/src/integrationTest/java/screens/LoginScreen.kt | Adds UI Automator screen for external browser login (currently Chrome-package pinned). |
| opencloudApp/src/integrationTest/java/eu/opencloud/android/LoginScreenTest.kt | Adds first Kaspresso integration test flow for login/remove-account. |
| opencloudApp/src/androidTest/java/eu/opencloud/android/ui/activity/ReleaseNotesActivityTest.kt | Ignores two tests. |
| opencloudApp/src/androidTest/java/eu/opencloud/android/sharing/shares/ui/ShareFileFragmentTest.kt | Ignores entire test class. |
| opencloudApp/src/androidTest/java/eu/opencloud/android/settings/security/SettingsSecurityFragmentTest.kt | Ignores multiple tests. |
| opencloudApp/src/androidTest/java/eu/opencloud/android/settings/security/PassCodeActivityTest.kt | Ignores multiple tests. |
| opencloudApp/src/androidTest/java/eu/opencloud/android/settings/more/SettingsMoreFragmentTest.kt | Ignores one test. |
| opencloudApp/src/androidTest/java/eu/opencloud/android/settings/logs/SettingsLogsFragmentTest.kt | Ignores one test. |
| opencloudApp/src/androidTest/java/eu/opencloud/android/settings/advanced/SettingsAdvancedFragmentTest.kt | Ignores one test. |
| opencloudApp/src/androidTest/java/eu/opencloud/android/files/details/FileDetailsFragmentTest.kt | Ignores entire test class. |
| opencloudApp/src/androidTest/java/eu/opencloud/android/authentication/LoginActivityTest.kt | Adds AccountManager static mocking and ignores multiple tests. |
| opencloudApp/build.gradle | Adds Kaspresso dependency, integration test source dir, and globally forces AndroidX test/espresso versions. |
| gradle/libs.versions.toml | Bumps AndroidX test/espresso versions and adds Kaspresso version/catalog entry. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...Library/src/main/java/eu/opencloud/android/lib/resources/shares/GetRemoteShareesOperation.kt
Show resolved
Hide resolved
opencloudApp/src/integrationTest/java/screens/ManageAccountsDialog.kt
Outdated
Show resolved
Hide resolved
opencloudApp/src/integrationTest/java/screens/ManageAccountsDialog.kt
Outdated
Show resolved
Hide resolved
opencloudApp/src/integrationTest/java/eu/opencloud/android/LoginScreenTest.kt
Show resolved
Hide resolved
...cloudApp/src/androidTest/java/eu/opencloud/android/settings/more/SettingsMoreFragmentTest.kt
Show resolved
Hide resolved
...cloudApp/src/androidTest/java/eu/opencloud/android/settings/logs/SettingsLogsFragmentTest.kt
Show resolved
Hide resolved
.../src/androidTest/java/eu/opencloud/android/settings/advanced/SettingsAdvancedFragmentTest.kt
Show resolved
Hide resolved
opencloudApp/src/androidTest/java/eu/opencloud/android/files/details/FileDetailsFragmentTest.kt
Show resolved
Hide resolved
opencloudApp/src/androidTest/java/eu/opencloud/android/authentication/LoginActivityTest.kt
Show resolved
Hide resolved
5b844f4 to
a957903
Compare
| // can't find it using withId("com.android.chrome", "username") so using withResourceName() | ||
| val username = UiEditText { withResourceName("username") } | ||
| val password = UiEditText { withResourceName("password") } | ||
| val loginButton = UiButton { withResourceName("kc-login") } |
Contributor
There was a problem hiding this comment.
trying to run the test it could not find that element
04-08 16:35:52.615 7129 7150 E TestRunner: failed: loginApp(eu.opencloud.android.LoginScreenTest)
04-08 16:35:52.616 7129 7150 E TestRunner: ----- begin exception -----
04-08 16:35:52.616 7129 7150 E TestRunner: com.kaspersky.components.kautomator.intercept.exception.UnfoundedUiObjectException: The UiObject2 was not found on the screen. The selector=BySelector [RES='\Qkc-login\E'], index=0
04-08 16:35:52.616 7129 7150 E TestRunner: at com.kaspersky.components.kautomator.intercept.interaction.UiObjectInteraction.check(UiObjectInteraction.kt:31)
04-08 16:35:52.616 7129 7150 E TestRunner: at com.kaspersky.kaspresso.interceptors.tolibrary.kautomator.KautomatorObjectInterceptor$interceptCheck$1.invoke(KautomatorObjectInterceptor.kt:29)
04-08 16:35:52.616 7129 7150 E TestRunner: at com.kaspersky.kaspresso.interceptors.tolibrary.kautomator.KautomatorObjectInterceptor$interceptCheck$1.invoke(KautomatorObjectInterceptor.kt:24)
04-08 16:35:52.616 7129 7150 E TestRunner: at com.kaspersky.kaspresso.autoscroll.ObjectAutoScrollProviderImpl.withAutoScroll(ObjectAutoScrollProviderImpl.kt:30)
a957903 to
f4294cb
Compare
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.
Changes:
How to run test:
java -jar ~/Downloads/adbserver-desktop.jar./gradlew :opencloudApp:connectedOriginalDebugAndroidTest \ -Pandroid.testInstrumentationRunnerArguments.class=eu.opencloud.android.LoginScreenTest#loginAppor run in the Android studio:
Screen.Recording.2026-03-31.at.15.29.51.mp4