コード例 #1
0
  private void createSingleHire() {
    ActivityUtils.fromActivityToActivity(MainActivity.class, Hire.class);

    // add one customer request
    CustomerRequest customerRequest = AutoAction.autoHire();
    AutoAction.goToActivity(ServiceProviderListByServiceID.class, CustomerRequestList.class);
    onView(
            allOf(
                withText(R.string.strEnter),
                hasSibling(withText(customerRequest.getDescription()))))
        .perform(click());
    AutoAction.goToActivity(ServiceProviderListByServiceID.class, Hire.class);
  }
コード例 #2
0
  private void createMultipleHire() {
    // add a few customer request
    List<CustomerRequest> customerRequestList = AutoAction.autoHireList();

    // check all the customer request is created by same person
    AutoAction.goToActivity(Hire.class, CustomerRequestList.class);
    for (CustomerRequest customerRequestRec : customerRequestList) {
      onView(
              allOf(
                  ViewMatchers.withText(R.string.strEnter),
                  hasSibling(withText(customerRequestRec.getDescription()))))
          .perform(click());
      AutoAction.goToActivity(ServiceProviderListByServiceID.class, CustomerRequestList.class);
    }
  }
コード例 #3
0
  @org.junit.Ignore
  public void process() {

    User user = AutoAction.userLogin(false);
    createSingleHire();
    createMultipleHire();
  }