use of org.mifos.test.acceptance.framework.loan.LoanAccountPage in project head by mifos.
the class LoanTestHelper method verifyNoPeriodicFeeRemovalLinkExists.
public void verifyNoPeriodicFeeRemovalLinkExists(int feeIndex) {
LoanAccountPage loanAccountPage = new LoanAccountPage(selenium);
loanAccountPage.verifyNoPeriodicFeeRemovalLinkExists(feeIndex);
}
use of org.mifos.test.acceptance.framework.loan.LoanAccountPage in project head by mifos.
the class LoanTestHelper method disburseLoan.
/**
* Disburses the loan with id <tt>loanId</tt>.
* @param loanId The system/global id of the loan that'll be disbursed.
* @param disburseParameters The disbursal parameters.
* @return The loan account page of the loan account with id loanId.
*/
public LoanAccountPage disburseLoan(String loanId, DisburseLoanParameters disburseParameters) {
DisburseLoanPage disburseLoanPage = prepareToDisburseLoan(loanId);
DisburseLoanConfirmationPage disburseLoanConfirmationPage = disburseLoanPage.submitAndNavigateToDisburseLoanConfirmationPage(disburseParameters);
LoanAccountPage loanAccountPage = disburseLoanConfirmationPage.submitAndNavigateToLoanAccountPage();
loanAccountPage.verifyStatus(LoanAccountPage.ACTIVE);
return loanAccountPage;
}
use of org.mifos.test.acceptance.framework.loan.LoanAccountPage in project head by mifos.
the class LoanTestHelper method changeLoanAccountInformation.
/**
* TODO: Create a helper for creating a GLIM loan account.
*/
/**
* Edits the loan account with id loanId and updates its settings with the ones in params.
* @param loanId The account id.
* @param accountSubmitParameters The create loan parameters.
* @param editAccountParameters The edit loan parameters.
* @return edit preview loan account page
*/
public LoanAccountPage changeLoanAccountInformation(String loanId, CreateLoanAccountSubmitParameters accountSubmitParameters, EditLoanAccountInformationParameters editAccountParameters) {
LoanAccountPage loanAccountPage = navigationHelper.navigateToLoanAccountPage(loanId);
EditLoanAccountInformationPage editLoanAccountInformationPage = loanAccountPage.navigateToEditAccountInformation();
EditPreviewLoanAccountPage editPreviewLoanAccountPage = editLoanAccountInformationPage.editAccountParams(accountSubmitParameters, editAccountParameters).submitAndNavigateToAccountInformationPreviewPage();
loanAccountPage = editPreviewLoanAccountPage.submitAndNavigateToLoanAccountPage();
loanAccountPage.verifyLoanDetails(accountSubmitParameters, editAccountParameters);
return loanAccountPage;
}
use of org.mifos.test.acceptance.framework.loan.LoanAccountPage 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.LoanAccountPage in project head by mifos.
the class LoanTestHelper method createTwoLoanAccountsWithMixedRestricedPoducts.
public LoanAccountPage createTwoLoanAccountsWithMixedRestricedPoducts(CreateLoanAccountSearchParameters searchParams1, CreateLoanAccountSearchParameters searchParams2, DisburseLoanParameters disburseParams, DateTime disbursalDate) {
LoanAccountPage loanAccountPage = navigationHelper.navigateToAdminPage().navigateToDefineProductMix().createOneMixAndNavigateToClientsAndAccounts(searchParams1.getLoanProduct(), searchParams2.getLoanProduct()).navigateToCreateLoanAccountUsingLeftMenu().searchAndNavigateToCreateLoanAccountPage(searchParams1).setDisbursalDate(disbursalDate).continuePreviewSubmitAndNavigateToDetailsPage();
loanAccountPage.changeAccountStatusToAccepted();
loanAccountPage.navigateToDisburseLoan().submitAndNavigateToDisburseLoanConfirmationPage(disburseParams).submitAndNavigateToLoanAccountPage();
// create second account and try to disburse
return loanAccountPage.navigateToClientsAndAccountsUsingHeaderTab().navigateToCreateLoanAccountUsingLeftMenu().searchAndNavigateToCreateLoanAccountPage(searchParams2).setDisbursalDate(disbursalDate).continuePreviewSubmitAndNavigateToDetailsPage().changeAccountStatusToAccepted().tryNavigatingToDisburseLoanWithError();
}
Aggregations