Espresso Test for Activity with Forced Portrait Mode Fails Orientation Assertion
I am testing an Android app using Espresso, and I have an activity that should only be displayed in portrait mode. To enforce this, I programmatically lock the activity in portrait mode when it is started. This works correctly in the app during normal usage.