Ejemplo 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");
  }
  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;
  }
Ejemplo n.º 3
0
  @SuppressWarnings("PMD.SignatureDeclareThrowsException")
  @Test(
      sequential = true,
      groups = {"savings", "acceptance", "ui"})
  public void newMandatoryGroupSavingsAccount() throws Exception {
    initRemote.dataLoadAndCacheRefresh(
        dbUnitUtilities, "acceptance_small_008_dbunit.xml.zip", dataSource, selenium);

    CreateSavingsAccountSearchParameters searchParameters =
        new CreateSavingsAccountSearchParameters();
    searchParameters.setSearchString("MyGroup1232993846342");
    searchParameters.setSavingsProduct("MandGroupSavingsPerIndiv1MoPost");

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

    verifySavingsAccountCreation(searchParameters, submitAccountParameters);
  }
Ejemplo n.º 4
0
  @SuppressWarnings("PMD.SignatureDeclareThrowsException")
  @Test(
      sequential = true,
      groups = {"smoke", "savings", "acceptance", "ui"})
  public void newVoluntaryClientSavingsAccount() throws Exception {
    initRemote.dataLoadAndCacheRefresh(
        dbUnitUtilities, "acceptance_small_008_dbunit.xml.zip", dataSource, selenium);

    CreateSavingsAccountSearchParameters searchParameters =
        new CreateSavingsAccountSearchParameters();
    searchParameters.setSearchString("Stu1233266079799 Client1233266079799");
    searchParameters.setSavingsProduct("VolClientSavings3MoPost");

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

    verifySavingsAccountCreation(searchParameters, submitAccountParameters);
  }
Ejemplo n.º 5
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");
  }