Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Add orientation change regression test #10814

Merged
merged 1 commit into from
Jan 2, 2018
Merged

Add orientation change regression test #10814

merged 1 commit into from
Jan 2, 2018

Conversation

tobrun
Copy link
Member

@tobrun tobrun commented Jan 2, 2018

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

@tobrun tobrun added the Android Mapbox Maps SDK for Android label Jan 2, 2018
@tobrun tobrun added this to the android-v6.0.0 milestone Jan 2, 2018
@tobrun tobrun self-assigned this Jan 2, 2018
Copy link
Member

@LukasPaczos LukasPaczos left a 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);
}

Copy link
Member

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());
Copy link
Member

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.

@tobrun
Copy link
Member Author

tobrun commented Jan 2, 2018

@LukasPaczos review comments have been addressed:

  • added reverse variants
  • added waitloop with different durations

@tobrun tobrun merged commit 6ce38cc into master Jan 2, 2018
@tobrun tobrun deleted the tvn-orientation-test branch January 2, 2018 16:14
@tobrun tobrun mentioned this pull request Jan 26, 2018
23 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants