@Test public void testRotateOnOrientationFixedActivity() { espDevice.assertOrientationIsLandscape(); espDevice.rotateToLandscape(); espDevice.assertOrientationIsLandscape(); } }
@Test public void testAssertOrientationIsLandscapeFailure() { exception.expect(AssertionFailedError.class); exception.expectMessage(is("expected device orientation LANDSCAPE but was PORTRAIT")); espDevice.rotateToPortrait(); espDevice.assertOrientationIsLandscape(); }
@Test @Ignore("change orientation works only for current activity but not following activities") public void testKeepRotation() { espDevice.assertOrientationIsPortrait(); espDevice.rotateToLandscape(); espDevice.assertOrientationIsLandscape(); getActivity().startActivity(new Intent(getActivity(), LongListActivity.class)); espDevice.assertOrientationIsLandscape(); }
@Test public void testRotateWithDialog() { addDialog(new AlertDialog.Builder(getActivity())); espDevice.rotateToLandscape(); espDevice.assertOrientationIsLandscape(); }
@Test public void testRotate() { espDevice.assertOrientationIsPortrait(); espDevice.rotateToLandscape(); espDevice.assertOrientationIsLandscape(); espDevice.rotateToPortrait(); espDevice.assertOrientationIsPortrait(); }