use of org.mifos.test.acceptance.framework.loan.AccountChangeStatusPage in project head by mifos.
the class ClientLoanStatusChangeTest method testBackDatedApprovals.
public void testBackDatedApprovals() {
customPropertiesHelper.setAllowBackdatedApproval(true);
LoanAccountPage loanAccountPage = loanTestHelper.createLoanAccount("Stu1233171716380 Client1233171716380", "WeeklyFlatLoanWithOneTimeFees");
loanAccountPage.verifyStatus("Application Pending Approval");
AccountChangeStatusPage changeStatusPage = loanAccountPage.navigateToEditAccountStatus();
LocalDate approvalDate = new LocalDate(2009, 6, 1);
EditAccountStatusParameters editAccountStatusParams = new EditAccountStatusParameters();
editAccountStatusParams.setNote("test note");
editAccountStatusParams.setAccountStatus(AccountStatus.LOAN_APPROVED);
editAccountStatusParams.setTrxnDate(approvalDate);
loanAccountPage = changeStatusPage.setChangeStatusParametersAndSubmit(editAccountStatusParams).submitAndNavigateToLoanAccountPage();
loanAccountPage.verifyStatus("Application Approved");
loanAccountPage.verifyLastNoteDate(approvalDate);
}
use of org.mifos.test.acceptance.framework.loan.AccountChangeStatusPage in project head by mifos.
the class CustomizeTextTest method verifyCustomizedTextChangeLoanStatusPage.
/*
* http://mifosforge.jira.com/browse/MIFOSTEST-1170
* Verify customized text on 'Change Loan status' page
*/
@Test
public void verifyCustomizedTextChangeLoanStatusPage() {
String errorMessage;
List<String> originalTextVector = new ArrayList<String>(Arrays.asList("Select from the status options below", "Then click Continue", "information", "Status", "Change status", "Other", "explanation", "Cancel", "note", "current status"));
List<String> customTextVector = new ArrayList<String>(Arrays.asList("Choose options", "搜索工具", "عر", "State", "Set different state", "Different", "answer", "Abort", "ربية ر", "Actual state"));
for (int i = 0; i < originalTextVector.size(); i++) {
adminTestHelper.addCustomizedText(originalTextVector.get(i), customTextVector.get(i));
}
LoanAccountPage loanAccountPage = navigationHelper.navigateToLoanAccountPage("000100000000050");
AccountChangeStatusPage accountChangeStatusPage = loanAccountPage.navigateToEditAccountStatus();
for (int i = 0; i < customTextVector.size() - 2; i++) {
errorMessage = "No text <" + customTextVector.get(i) + "> present on the page";
accountChangeStatusPage.verifyTextPresent(customTextVector.get(i), errorMessage);
}
for (int i = customTextVector.size() - 2; i < customTextVector.size(); i++) {
errorMessage = "The Text <" + customTextVector.get(i) + "> presents on the page";
accountChangeStatusPage.verifyNotTextPresent(customTextVector.get(i), errorMessage);
}
for (int i = 0; i < 3; i++) {
adminTestHelper.removeCustomizedText(originalTextVector.get(i));
}
loanAccountPage = navigationHelper.navigateToLoanAccountPage("000100000000050");
accountChangeStatusPage = loanAccountPage.navigateToEditAccountStatus();
for (int i = 0; i < 3; i++) {
errorMessage = "No text <" + originalTextVector.get(i) + "> present on the page";
accountChangeStatusPage.verifyTextPresent(originalTextVector.get(i), errorMessage);
}
for (int i = 3; i < originalTextVector.size(); i++) {
adminTestHelper.removeCustomizedText(originalTextVector.get(i));
}
}
use of org.mifos.test.acceptance.framework.loan.AccountChangeStatusPage in project head by mifos.
the class SavingsAccountHelper method changeStatus.
public SavingsAccountDetailPage changeStatus(String savingsId, EditAccountStatusParameters editAccountStatusParameters) {
SavingsAccountDetailPage savingsAccountDetailPage = navigationHelper.navigateToSavingsAccountDetailPage(savingsId);
AccountChangeStatusPage accountChangeStatusPage = savingsAccountDetailPage.navigateToEditAccountStatus();
EditAccountStatusConfirmationPage editAccountStatusConfirmationPage = accountChangeStatusPage.setChangeStatusParametersAndSubmit(editAccountStatusParameters);
savingsAccountDetailPage = editAccountStatusConfirmationPage.submitAndNavigateToSavingAccountPage();
savingsAccountDetailPage.verifyStatus(editAccountStatusParameters.getAccountStatus().getStatusText());
return savingsAccountDetailPage;
}
use of org.mifos.test.acceptance.framework.loan.AccountChangeStatusPage in project head by mifos.
the class LoanTestHelper method changeLoanAccountStatusProvidingQuestionGroupResponses.
public void changeLoanAccountStatusProvidingQuestionGroupResponses(String loanId, EditLoanAccountStatusParameters params, QuestionResponseParameters responseParameters) {
LoanAccountPage loanAccountPage = navigationHelper.navigateToLoanAccountPage(loanId);
AccountChangeStatusPage accountChangeStatusPage = loanAccountPage.navigateToEditAccountStatus();
EditAccountStatusConfirmationPage editAccountStatusConfirmationPage = accountChangeStatusPage.submitAndNavigateToNextPage(params);
if (responseParameters != null) {
populateQuestionGroupResponses(responseParameters);
}
loanAccountPage = editAccountStatusConfirmationPage.submitAndNavigateToLoanAccountPage();
loanAccountPage.verifyStatus(params.getStatus(), params.getCancelReason());
}
use of org.mifos.test.acceptance.framework.loan.AccountChangeStatusPage in project head by mifos.
the class ApplyPaymentOnGLIMLoanAccountTest method checkApplyPaymentOnGLIMLoanAccount.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(enabled = true)
public void checkApplyPaymentOnGLIMLoanAccount() throws Exception {
LoanAccountPage loanAccountPage = createNewLoan();
AccountChangeStatusPage accountChangeStatusPage = loanAccountPage.navigateToEditAccountStatus();
EditLoanAccountStatusParameters params = new EditLoanAccountStatusParameters();
params.setNote("asd");
params.setStatus(EditLoanAccountStatusParameters.APPROVED);
loanAccountPage = accountChangeStatusPage.submitAndNavigateToNextPage(params).submitAndNavigateToLoanAccountPage();
DisburseLoanParameters disburseParams = new DisburseLoanParameters();
disburseParams.setDisbursalDateDD("04");
disburseParams.setDisbursalDateMM("03");
disburseParams.setDisbursalDateYYYY("2011");
disburseParams.setPaymentType(DisburseLoanParameters.CASH);
loanAccountPage = loanAccountPage.disburseLoan(disburseParams);
ApplyGroupPaymentPage applyGroupPaymentPage = loanAccountPage.navigateToApplyGroupPayment();
applyGroupPaymentPage.setAmount("140");
applyGroupPaymentPage.verifyIndividualAmount(0, "20.0");
applyGroupPaymentPage.verifyIndividualAmount(1, "40.0");
applyGroupPaymentPage.verifyIndividualAmount(2, "80.0");
//principal 25, less
applyGroupPaymentPage.setIndividualAmount(0, "20");
//principal 50, equal
applyGroupPaymentPage.setIndividualAmount(1, "50");
//principal 100, more
applyGroupPaymentPage.setIndividualAmount(2, "120");
applyGroupPaymentPage.verifyAmount("190");
applyGroupPaymentPage.setPaymentMethod("1");
applyGroupPaymentPage.setDate("04", "03", "2011");
ApplyGroupPaymentConfirmationPage applyGroupPaymentConfirmation = applyGroupPaymentPage.submit();
loanAccountPage = applyGroupPaymentConfirmation.submitAndNavigateToLoanAccountDetailsPage();
ViewRepaymentSchedulePage viewRepaymentSchedulePage = loanAccountPage.navigateToViewRepaymentSchedule();
verifyRepaymentScheduleInstallmentsPaid(viewRepaymentSchedulePage, EXPECTED_PAID_INSTALLMENTS);
loanAccountPage = viewRepaymentSchedulePage.navigateToLoanAccountPage();
for (int i = 0; i <= 2; i += 1) {
viewRepaymentSchedulePage = loanAccountPage.navigateToIndividualRepaymentSchedulePage(i);
verifyRepaymentScheduleInstallmentsPaid(viewRepaymentSchedulePage, INDIVIDUAL_EXPECTED_PAID_INSTALLMENTS[i]);
loanAccountPage = viewRepaymentSchedulePage.navigateToLoanAccountPage();
}
// Test applying payment for last installment
applyGroupPaymentPage = loanAccountPage.navigateToApplyGroupPayment();
applyGroupPaymentPage.setPaymentMethod("1");
applyGroupPaymentPage.setAmount("1500");
applyGroupPaymentConfirmation = applyGroupPaymentPage.submit();
loanAccountPage = applyGroupPaymentConfirmation.submitAndNavigateToLoanAccountDetailsPage();
// Last installment left to payoff whole account
applyGroupPaymentPage = loanAccountPage.navigateToApplyGroupPayment();
applyGroupPaymentPage.verifyAmount("60.0");
applyGroupPaymentPage.verifyIndividualAmount(0, "15.7");
applyGroupPaymentPage.verifyIndividualAmount(1, "21.4");
applyGroupPaymentPage.verifyIndividualAmount(2, "22.9");
applyGroupPaymentPage.setPaymentMethod("1");
applyGroupPaymentConfirmation = applyGroupPaymentPage.submit();
loanAccountPage = applyGroupPaymentConfirmation.submitAndNavigateToLoanAccountDetailsPage();
loanAccountPage.verifyLoanStatus(LoanAccountPage.CLOSED);
}
Aggregations