package de.nenick.espressomacchiato.elements;

import org.junit.Test;

import de.nenick.espressomacchiato.test.views.LandscapeFixedActivity;
import de.nenick.espressotools.EspressoTestCase;

public class EspDeviceOrientationFixedTest extends EspressoTestCase<LandscapeFixedActivity> {

    private EspDevice espDevice = EspDevice.root();

    @Test
    public void testRotateOnOrientationFixedActivity() {
        espDevice.assertOrientationIsLandscape();
        espDevice.rotateToLandscape();
        espDevice.assertOrientationIsLandscape();
    }
}

@@ -51,24 +51,193 @@
 ort 
-org.junit.Test;%0A
+android.content.Intent;%0Aimport android.support.test.InstrumentationRegistry;%0A%0Aimport org.junit.After;%0Aimport org.junit.Test;%0A%0Aimport de.nenick.espressomacchiato.test.views.BaseActivity;
 %0Aimp
@@ -501,16 +501,228 @@
 oot();%0A%0A
+    @After%0A    public void reset() %7B%0A        activityTestRule.getActivity().startActivity(new Intent(InstrumentationRegistry.getTargetContext(), BaseActivity.class));%0A        espDevice.rotateToPortrait();%0A    %7D%0A%0A
     @Tes

reset orientation state after test