commons-app / apps-android-commons

The Wikimedia Commons Android app allows users to upload pictures from their Android phone/tablet to Wikimedia Commons
https://commons-app.github.io/
Apache License 2.0
1.03k stars 1.24k forks source link

Fix the 36 unit tests that started failing when switching from MapBox to OpenStreetMap (now set as @Ignored) #5408

Closed nicolas-raoul closed 9 months ago

nicolas-raoul commented 10 months ago

The switch from MapBox to OpenStreetMap was urgent, and unit tests were not considered a priority, so they have been set as ignored. Now we need to re-instate these unit tests.

Step 1: Remove all @Ignore added in this commit: https://github.com/commons-app/apps-android-commons/commit/5df18fb4a6f7c105b3a7d14526c08a0d1dd8f9ad Step 2: Make the unit tests pass Step 3: Send a pull request. :-)

tamojitdas commented 10 months ago

Hi Can i work on this ....quite new to open source contributions ...looking for skilling up

nicolas-raoul commented 10 months ago

@tamojitdas It is yours, thanks! Please let us know about your progress every week or so. 🙂

tamojitdas commented 10 months ago

Sure thing

tamojitdas commented 10 months ago

still working on the unit tests ..will be able to send some updates in mid next week

axelthepony27 commented 10 months ago

Hi! I would like to helo solve this issue. @tamojitdas Do you need some help with it?

tamojitdas commented 10 months ago

Sure @axelthepony27 will let you know For any help needed

tamojitdas commented 10 months ago

tamojitdas/apps-android-commons@4cf854bb94a63bb85e17ceba0e46ece7080d4e68 posting here the progress made in forked repo

kanahia1 commented 9 months ago

Hi @tamojitdas, Can I assist you with this issue!

tamojitdas commented 9 months ago

Sure, will raise a PR in about 2 days, Will be assigning you and @nicolas-raoul to review I have some points to discuss with you Both....will be giving details in PR comments...Thanks

kanahia1 commented 9 months ago

Sure and Thanks!, Looking forward for your PR 🙌

tamojitdas commented 9 months ago

Hi @nicolas-raoul @kanahia1, one quick question, regarding this function from NearbyParentFragmentPresenter.java:: @Override public void onCameraMove(com.mapbox.mapboxsdk.geometry.LatLng latLng) { // If our nearby markers are calculated at least once if (NearbyController.latestSearchLocation != null) { double distance = latLng.distanceTo (LocationUtils.commonsLatLngToMapBoxLatLng(NearbyController.latestSearchLocation)); if (nearbyParentFragmentView.isNetworkConnectionEstablished()) { if (distance > NearbyController.latestSearchRadius) { //nearbyParentFragmentView.setSearchThisAreaButtonVisibility(true); } else { nearbyParentFragmentView.setSearchThisAreaButtonVisibility(false); } } } else { nearbyParentFragmentView.setSearchThisAreaButtonVisibility(false); } }

,as per the latest commit for Mapbox to osmdroid I am seeing that nearbyParentFragmentView.setSearchThisAreaButtonVisibility(true); is not required anymore.... Just Confirming if that is the case, then I will skip working on this test step :: testSearchThisAreaButtonVisibleWhenMoveToFarPosition() from NearbyParentFragmentPresenterTest.kt...

kanahia1 commented 9 months ago

@tamojitdas, feel free to skip this one as this function is of no use now!

tamojitdas commented 9 months ago

thanks @kanahia1 for the info

tamojitdas commented 9 months ago

tamojitdas/apps-android-commons@2c9badb2e7b715c9705d835108897c2b9670b792 posting here some updates made in forked repo ....need to work on this for the next week as some changes has been done in the NearbyParentFragmentPresenterTest.kt class and others from the remote repo ..hence had to sync & update accordingly ..but will be sending the PR next week..Thanks

tamojitdas commented 9 months ago

tamojitdas/apps-android-commons@d6ab627eff60b7ba62f118484521e8ef83ceeac2 progress update. Done with NearbyParentFragmentPresenterTest.kt few remaining on NearbyParentFragmentUnitTest.kt will try sending the PR tommorow.

kanahia1 commented 9 months ago

Thanks @tamojitdas 😄