Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setOrientation in Activity not always rotating back on API 31 once the test finished #4

Closed
sergio-sastre opened this issue Mar 16, 2022 · 1 comment

Comments

@sergio-sastre
Copy link
Owner

Describe the bug
setOrientation in Activity: when using it, it does not rotate back to the initial orientation after the test finished. That means, the next tests might start with the wrong orientation.

Environment
The setup in which the bug is reproducible:

  • Device or Emulator: Emulator
  • API level: API 31 at least. Could not reproduce it on API 23,26,27,28 though.
  • AndroidUiTestingUtils version: 1.0.0
  • Affected Component: Activity only
  • Buggy Configuration: Orientation

Expected behavior
After the test where we use setOrientation finishes, the layout orientation returns to the one before the test started.

Reproducible sample
Run Road to effective snapshot testing on API 31.

@sergio-sastre
Copy link
Owner Author

This only happens if not calling activityScenario.close() at the end of the corresponding tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant