You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Moreover, report this in Android-Testify repo
The text was updated successfully, but these errors were encountered:
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
sergio-sastre
changed the title
Android-Testify view and fragment rules do not handle DisplaySize properly
Android-Testify Compose, View and fragment rules do not handle DisplaySize properly
Mar 14, 2024
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
The text was updated successfully, but these errors were encountered: