apps-android-commons
apps-android-commons copied to clipboard
Failure of uploadCancelledAfterLocationPickedTest and testBetaSkipButton
Not too sure what it is, but I see some unit tests failing in CI:
https://github.com/commons-app/apps-android-commons/actions/runs/6582881080/job/17885059535#step:8:458
fr.free.nrw.commons.UploadCancelledTest > uploadCancelledAfterLocationPickedTest[test(AVD) - 7.0] FAILED
androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching: (view.getId() is <2131296394/fr.free.nrw.commons.beta:id/caption_item_edit_text> and Child at position 0 in parent Child at position 0 in parent view.getId() is <2131296395> and (view has effective visibility <VISIBLE> and view.getGlobalVisibleRect() to return non-empty rectangle))
fr.free.nrw.commons.UploadTest > testUploadWithMultilingualDescription[test(AVD) - 7.0] SKIPPED
fr.free.nrw.commons.UploadTest > testUploadWithoutDescription[test(AVD) - 7.0] SKIPPED
fr.free.nrw.commons.UploadTest > testUploadWithDescription[test(AVD) - 7.0] SKIPPED
fr.free.nrw.commons.WelcomeActivityTest > testBetaSkipButton[test(AVD) - 7.0] FAILED
java.lang.AssertionError: Assertion failed
at fr.free.nrw.commons.WelcomeActivityTest.testBetaSkipButton(WelcomeActivityTest.kt:64)
Tests on test(AVD) - 7.0 failed: There was 2 failure(s).
https://github.com/commons-app/apps-android-commons/pull/5354/files might be a source of inspiration to fix these tests.
Can I have a try on it?
@MatheuMa It is yours, thanks! π
@MatheuMa Any progress to share? :-)
It's been long, but I'm finally able to run these tests after factory resetting my phone. testBetaSkipButton is running fine on my device, uploadCancelledAfterLocationPickedTest is getting affected by #5461. The list does not open on tapping the list icon at the top-right corner of Nearby.
With the PR for #5461, I'm able to reproduce this issue for uploadCancelledAfterLocationPickedTest. I would like to give this a try if no one is currently working on it.
With the PR for #5461, I'm able to reproduce this issue for
uploadCancelledAfterLocationPickedTest. I would like to give this a try if no one is currently working on it.
You could feel free to proceed, Ritika π
@RitikaPahwa4444 Do you know the status of this? Thanks a lot! :-)
Hey @nicolas-raoul, sorry for keeping this pending for such a long timeπ I was waiting for another PR to get merged (the one on which my PR is dependent) but when I got back to it and checked the CI, many more similar instrumentation tests were failing. I was expecting the ones in this issue to get fixed after including location permission and dialog checks for Nearby's picker but now I feel this requires deeper analysis to figure out the root cause (these are very much dependent on the device - they run fine on one of my devices but not the other). I'm bit busy this week and might not find enough time to take a look. I'll remove my assignment for now
More details about the tests that are failing now on the latest main branch:
fr.free.nrw.commons.MainActivityTest > testExplore[test(AVD) - 7.0] FAILED
androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching: (Child at position 2 in parent Child at position 0 in parent view.getId() is <2131296627/fr.free.nrw.commons.beta:id/fragment_main_nav_tab_layout> and (view has effective visibility <VISIBLE> and view.getGlobalVisibleRect() to return non-empty rectangle))
fr.free.nrw.commons.MainActivityTest > testBookmarks[test(AVD) - 7.0] FAILED
androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching: (Child at position 3 in parent Child at position 0 in parent view.getId() is <2131296627/fr.free.nrw.commons.beta:id/fragment_main_nav_tab_layout> and (view has effective visibility <VISIBLE> and view.getGlobalVisibleRect() to return non-empty rectangle))
fr.free.nrw.commons.MainActivityTest > testNotifications[test(AVD) - 7.0] FAILED
androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching: (view.getId() is <2131296957/fr.free.nrw.commons.beta:id/notifications> and Child at position 1 in parent Child at position 1 in parent view.getId() is <2131297216> and (view has effective visibility <VISIBLE> and view.getGlobalVisibleRect() to return non-empty rectangle))
fr.free.nrw.commons.MainActivityTest > testNearby[test(AVD) - 7.0] FAILED
androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching: (Child at position 1 in parent Child at position 0 in parent view.getId() is <2131296627/fr.free.nrw.commons.beta:id/fragment_main_nav_tab_layout> and (view has effective visibility <VISIBLE> and view.getGlobalVisibleRect() to return non-empty rectangle))
fr.free.nrw.commons.MainActivityTest > testContributions[test(AVD) - 7.0] FAILED
androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching: (Child at position 0 in parent Child at position 0 in parent view.getId() is <2131296627/fr.free.nrw.commons.beta:id/fragment_main_nav_tab_layout> and (view has effective visibility <VISIBLE> and view.getGlobalVisibleRect() to return non-empty rectangle))
fr.free.nrw.commons.ProfileActivityTest > testProfile[test(AVD) - 7.0] FAILED
androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching: (view.getContentDescription() is "More" and Child at position 4 in parent Child at position 0 in parent view.getId() is <2131296627> and (view has effective visibility <VISIBLE> and view.getGlobalVisibleRect() to return non-empty rectangle))
fr.free.nrw.commons.ReviewActivityTest > orientationChange[test(AVD) - 7.0] FAILED
java.lang.NullPointerException: Attempt to read from field 'androidx.appcompat.widget.Toolbar fr.free.nrw.commons.databinding.ToolbarBinding.toolbar' on a null object reference
at fr.free.nrw.commons.review.ReviewActivity.onCreate(ReviewActivity.java:89)
Tests on test(AVD) - 7.0 failed: There was 7 failure(s).
Test run failed to complete. Instrumentation run failed due to Process crashed.
> Task :app:connectedBetaDebugAndroidTest FAILED