-
Notifications
You must be signed in to change notification settings - Fork 110
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
Espresso tests for survey toolbar #179
Espresso tests for survey toolbar #179
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests do not pass on the build server (CircleCI).
org.opendatakit.survey.logic.TestMainMenuActivity > testSettingsMenuItem[avd(AVD) - 11] FAILED
androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching: view.getId() is <2131361857/org.opendatakit.survey:id/action_settings>
org.opendatakit.survey.logic.TestMainMenuActivity > testSyncMenuItem[avd(AVD) - 11] FAILED
androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching: view.getId() is <2131361858/org.opendatakit.survey:id/action_sync>
Some of these fixes have now been made. Make sure to merge changes back to your update-jdk11 branch. Check out a similar PR that was merged yesterday that had similar issues. |
Alright @wbrunette, will do that |
Hi @wbrunette tho I merged changes back to my upgrade-jdk11 branch, when I tried following a similar approach from @Stryker101 on this 178 merged PR on my branch, it still keeps failing on CircleCI, I annotated two other tests with @ignore annotations, but still failing with the error messages: |
I was curious about this as well. In my PR the test for sync passed without Services being installed. I looked at the implementation and saw that the handling of the intents were both in a try catch block, but they errors were handled differently. Could this be why Sync test passed without Services? |
@wbrunette I added the @ignore annotation |
Hi @wbrunette Still yet to get a response on this question |
I guess I am confused by the question. Looking at @Stryker101 at his test I do not see a sync test. Your statement "I think sync and settings require Services to be installed. " is correct. |
This is it https://github.com/odk-x/survey/blob/upgrade-jdk11/survey_app/src/androidTest/java/org/opendatakit/survey/activities/MainMenuActivityTest.java#L92 @wbrunette |
Intending is actually a Mock that checks the intent is formed correctly: So it does not need Services installed |
Okay, thanks for the clarification. Will check that out |
* created tests for the main menu activities * removed unused imports * included test options in build.gradle * remove unwanted files * added test options in build * ignore annotation added till service pipeline is fixed * modified method * clean up and removed unused imports * ignored test * added edge cases * added idling resource * refactored annotations * added @ignore annotation
This is a PR for issue 483, and the PR contains the following:
Overview
The Survey App toolbar was recently revised and updated, so there are needs to write tests to ensure the App is behaving as expected
The Survey App's functionality tested
testToolbarLogoNavigation()
testSyncMenuItem()
testSettingsMenuItem()
Screenshot of passed Tests on Android Studio