Describe the bug
When verifying only, it fails with UnexpectedDeviceException.
This happens because testify uses different Contexts to create the customKeys for naming the destination folders:
record: activity context
verify: instrumentation context
Since AndroidUiTestingUtils modifies the Activity context display size, it differs from the one of the instrumentation context used when verifying and it fails.
Environment
The setup in which the bug is reproducible:
*Possible fix
We could use a the DisplaySizeTestRule internally to set the Display size. The test rule executes an adb command to change the display size of the device, and therefore it affects also the instrumentation context and not only that of the activity.
Seems that it is a bit hacky to deal with TestRules and ComposeRule together, and the tests also become more slow... better to get it fixed in Android-Testify
Describe the bug When verifying only, it fails with UnexpectedDeviceException.
This happens because testify uses different Contexts to create the customKeys for naming the destination folders: record: activity context verify: instrumentation context
Since AndroidUiTestingUtils modifies the Activity context display size, it differs from the one of the instrumentation context used when verifying and it fails.
Environment The setup in which the bug is reproducible:
Expected behavior No exception is thrown
*Possible fix We could use a the DisplaySizeTestRule internally to set the Display size. The test rule executes an adb command to change the display size of the device, and therefore it affects also the instrumentation context and not only that of the activity.
Moreover, report this in Android-Testify repo