sergio-sastre / AndroidUiTestingUtils

A set of TestRules, ActivityScenarios and utils to facilitate UI and screenshot testing under given configurations: FontSizes, Locales...
MIT License
293 stars 14 forks source link

UiMode not working with ActivityTestRule, works fine with ActivityScenario though #78

Closed sergio-sastre closed 8 months ago

sergio-sastre commented 1 year ago

Describe the bug When UiMode is used with the deprecated ActivityTestRule, it does not work. This is reproducible when using android-testify, which uses ActivityTestRule under the hood

Environment The setup in which the bug is reproducible:

Expected behavior The UiMode should change accordingly

Additional context This can be solved for API 29+ by changing the UiMode via adb. android-testify will likely migrate to ActivityScenario in version 2.0.0, so it might not need a fix for previous versions

sergio-sastre commented 8 months ago

Notes:

sergio-sastre commented 8 months ago

Added in 2.2.0