-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add orientation change regression test #10814
Conversation
c4eb828
to
faa34d6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks for creating this one!
Can we include ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT
and ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE
as well?
public static ViewAction orientationPortrait() { | ||
return new OrientationChangeAction(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While we are at it, can we include ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT
and ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE
as well?
onView(isRoot()).perform(orientationPortrait()); | ||
onView(isRoot()).perform(orientationLandscape()); | ||
onView(isRoot()).perform(orientationPortrait()); | ||
onView(isRoot()).perform(orientationLandscape()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One or two wait loops with different delays would be nice.
faa34d6
to
3ac8954
Compare
@LukasPaczos review comments have been addressed:
|
3ac8954
to
a406792
Compare
This PR adds a integration test that validates possible regressions related to orientation changes. Haven't been able to reproduce the crashes for which this test was created though I feel this would be a great addition to our test suite.
cc @LukasPaczos