Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c255c8b3 authored by vadimt's avatar vadimt
Browse files

Unlock the phone before each test

We were trying to do so from the test config, but this didn't work

Change-Id: I098eb392c76572bc43443adac130fa8700b49bde
parent c6d9ddfd
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -163,6 +163,8 @@ public abstract class AbstractLauncherUiTest {
    public void setUp() throws Exception {
    public void setUp() throws Exception {
        mTargetContext = InstrumentationRegistry.getTargetContext();
        mTargetContext = InstrumentationRegistry.getTargetContext();
        mTargetPackage = mTargetContext.getPackageName();
        mTargetPackage = mTargetContext.getPackageName();
        // Unlock the phone
        mDevice.executeShellCommand("input keyevent 82");
    }
    }


    @After
    @After
+0 −2
Original line number Original line Diff line number Diff line
@@ -154,8 +154,6 @@ public final class LauncherInstrumentation {
        } catch (IOException e) {
        } catch (IOException e) {
            fail(e.toString());
            fail(e.toString());
        }
        }

        assertTrue("Phone is locked", !hasSystemUiObject("keyguard_status_view"));
    }
    }


    Context getContext() {
    Context getContext() {