Skip to content

Conversation

@ShashwatKedia
Copy link
Contributor

@ShashwatKedia ShashwatKedia commented Feb 2, 2024

Related to #4664

What changes did you make and why?
Moved the SettingsActivity from Butterknife to ViewBinding

Tests performed (required)
Tested prodDebug on OnePlus Nord CE 2 Lite with API level 31

@ShashwatKedia ShashwatKedia marked this pull request as ready for review February 2, 2024 18:31
@ShashwatKedia
Copy link
Contributor Author

Hmm, I'll check why unit tests are failing

@psh
Copy link
Collaborator

psh commented Feb 2, 2024

Just for reference, a lot of the unit tests (mistakenly) avoid taking the UI through its normal lifecycle and try to mock components instead. There's a lot of reflection to jam the mock values into place. A few recent Fragment tests do it correctly using the Google FragmentScenario so you might look at those as a template.

@ShashwatKedia
Copy link
Contributor Author

Just for reference, a lot of the unit tests (mistakenly) avoid taking the UI through its normal lifecycle and try to mock components instead. There's a lot of reflection to jam the mock values into place. A few recent Fragment tests do it correctly using the Google FragmentScenario so you might look at those as a template.

Thank you so much @psh, I'll look into this :)

@domdomegg domdomegg marked this pull request as draft February 14, 2024 21:04
@ShashwatKedia ShashwatKedia force-pushed the settingsActivityViewBinding branch from a60569f to 593b609 Compare March 2, 2024 22:06
@ShashwatKedia ShashwatKedia changed the title #4664 Moved Main Activity and Settings Activity to ViewBinding #4664 Moved Settings Activity to ViewBinding Mar 3, 2024
@ShashwatKedia ShashwatKedia marked this pull request as ready for review March 3, 2024 07:54
@psh psh merged commit bd06a74 into commons-app:main Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants