Esempio n. 1
0
  @MediumTest
  public void testLoginActivityStart() {

    Utils.updateDriver(targetContext, null);
    assertNull("driver wasn't null", Utils.getDriver(getActivity()));

    getActivity().onStart();

    final Intent launchIntent = this.getStartedActivityIntent();
    assertNotNull("Intent was null", launchIntent);
    assertEquals(launchIntent.getComponent().getShortClassName(), ".LoginActivity");
  }
Esempio n. 2
0
  @MediumTest
  public void testRequestActivityStart() throws InterruptedException {

    Utils.updateDriver(targetContext, TestUtils.getDriver());
    assertNotNull("driver was null", Utils.getDriver(getActivity()));

    getActivity().onResume();
    assertTrue("Unable to connect Internet", Utils.isOnline(getActivity()));

    // waiting for network response
    Thread.sleep(5000);

    final Intent launchIntent = this.getStartedActivityIntent();
    assertNotNull("Intent was null", launchIntent);
    assertEquals(launchIntent.getComponent().getShortClassName(), ".CustomerListActivity");
  }