Exemplo n.º 1
0
  @SuppressWarnings("PMD.SignatureDeclareThrowsException")
  // http://mifosforge.jira.com/browse/MIFOSTEST-216
  @Test(enabled = true)
  public void verifyPropertySavingsPendingApprovalStateEnabled() throws Exception {
    // Given
    propertiesHelper.setSavingsPendingApprovalStateEnabled("false");
    // When
    CreateSavingsAccountSearchParameters searchParameters =
        new CreateSavingsAccountSearchParameters();
    searchParameters.setSearchString("UpdateCustomProperties TestClient");
    searchParameters.setSavingsProduct("MandatorySavingsAccount");
    CreateSavingsAccountSubmitParameters submitAccountParameters =
        new CreateSavingsAccountSubmitParameters();
    submitAccountParameters.setAmount("248.0");
    SavingsAccountDetailPage savingsAccountPage =
        savingsAccountHelper.createSavingsAccountWithoutPendingApprovalState(
            searchParameters, submitAccountParameters);
    savingsAccountPage.verifyPage();
    // Then
    savingsAccountPage.verifySavingsAmount(submitAccountParameters.getAmount());
    savingsAccountPage.verifySavingsProduct(searchParameters.getSavingsProduct());
    savingsAccountPage.verifyStatus("Active");

    propertiesHelper.setSavingsPendingApprovalStateEnabled("true");
  }
Exemplo n.º 2
0
 private void verifySavingsAccountCreation(
     CreateSavingsAccountSearchParameters searchParameters,
     CreateSavingsAccountSubmitParameters submitAccountParameters) {
   SavingsAccountDetailPage savingsAccountPage =
       savingsAccountHelper.createSavingsAccount(searchParameters, submitAccountParameters);
   savingsAccountPage.verifyPage();
   savingsAccountPage.verifySavingsAmount(submitAccountParameters.getAmount());
   savingsAccountPage.verifySavingsProduct(searchParameters.getSavingsProduct());
 }
  private SavingsAccountDetailPage createSavingAccountWithCreatedProduct(
      String client, String productName, String amount) {
    CreateSavingsAccountSearchParameters searchParameters =
        new CreateSavingsAccountSearchParameters();
    searchParameters.setSearchString(client);
    searchParameters.setSavingsProduct(productName);

    CreateSavingsAccountSubmitParameters submitAccountParameters =
        new CreateSavingsAccountSubmitParameters();
    submitAccountParameters.setAmount(amount);
    SavingsAccountDetailPage savingsAccountPage =
        savingsAccountHelper.createSavingsAccount(searchParameters, submitAccountParameters);
    savingsAccountPage.verifyPage();
    savingsAccountPage.verifySavingsAmount(amount);
    savingsAccountPage.verifySavingsProduct(searchParameters.getSavingsProduct());
    return savingsAccountPage;
  }
Exemplo n.º 4
0
  /*
   * FIXME - keithw - test passes when run individually but not as part of ci build. it appears that question groups data is not
   *                  cleaned up right as instead of stepping to review installments, the questionnaire page is presented.
   */
  @SuppressWarnings("PMD.SignatureDeclareThrowsException")
  // http://mifosforge.jira.com/browse/MIFOSTEST-215
  @Test(enabled = true)
  public void verifyPropertyPendingApprovalStateEnabledForSavingsAndLoanAccounts()
      throws Exception {
    // Given
    propertiesHelper.setSavingsPendingApprovalStateEnabled("true");
    propertiesHelper.setLoanPendingApprovalStateEnabled("true");
    propertiesHelper.setGroupPendingApprovalStateEnabled("true");
    // When
    CreateSavingsAccountSearchParameters searchParameters =
        new CreateSavingsAccountSearchParameters();
    searchParameters.setSearchString("UpdateCustomProperties TestClient");
    searchParameters.setSavingsProduct("MonthlyClientSavingsAccount");

    CreateSavingsAccountSubmitParameters submitAccountParameters =
        new CreateSavingsAccountSubmitParameters();
    submitAccountParameters.setAmount("248.0");

    SavingsAccountDetailPage savingsAccountPage =
        savingsAccountHelper.createSavingsAccount(searchParameters, submitAccountParameters);
    savingsAccountPage.verifyPage();
    // Then
    savingsAccountPage.verifySavingsAmount(submitAccountParameters.getAmount());
    savingsAccountPage.verifySavingsProduct(searchParameters.getSavingsProduct());
    savingsAccountPage.verifyStatus("Application Pending Approval");
    // when
    CreateLoanAccountSearchParameters searchParameters2 = new CreateLoanAccountSearchParameters();
    searchParameters2.setSearchString("UpdateCustomProperties TestClient");
    searchParameters2.setLoanProduct("ClientEmergencyLoan");
    CreateLoanAccountSubmitParameters submitAccountParameters2 =
        new CreateLoanAccountSubmitParameters();
    submitAccountParameters2.setAmount("2765.0");
    submitAccountParameters2.setGracePeriodTypeNone(true);
    LoanTestHelper loanTestHelper = new LoanTestHelper(selenium);
    LoanAccountPage loanAccountPage =
        loanTestHelper.createLoanAccount(searchParameters2, submitAccountParameters2);
    loanAccountPage.verifyStatus("Application Pending Approval");
  }