@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"); }
/* * 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"); }