use of org.mifos.test.acceptance.framework.testhelpers.NavigationHelper in project head by mifos.
the class EditLoanAccountTest method editLoanAccount.
private LoanAccountPage editLoanAccount(String accountID, EditLoanAccountInformationParameters params) {
NavigationHelper helper = new NavigationHelper(selenium);
LoanAccountPage loanAccountPage = helper.navigateToLoanAccountPage(accountID);
EditLoanAccountInformationPage editAccountInformationPage = loanAccountPage.navigateToEditAccountInformation();
editAccountInformationPage.editExternalID(params);
EditPreviewLoanAccountPage editPreviewLoanAccountPage = editAccountInformationPage.submitAndNavigateToAccountInformationPreviewPage();
loanAccountPage = editPreviewLoanAccountPage.submitAndNavigateToLoanAccountPage();
return loanAccountPage;
}
use of org.mifos.test.acceptance.framework.testhelpers.NavigationHelper in project head by mifos.
the class FeeTest method setUp.
@Override
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// one of the dependent methods throws Exception
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception {
super.setUp();
DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
DateTime targetTime = new DateTime(2009, 7, 11, 12, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
dataSetup = new TestDataSetup(selenium, applicationDatabaseOperation);
loanTestHelper = new LoanTestHelper(selenium);
feeTestHelper = new FeeTestHelper(dataSetup, new NavigationHelper(selenium));
navigationHelper = new NavigationHelper(selenium);
loanProductTestHelper = new LoanProductTestHelper(selenium);
}
use of org.mifos.test.acceptance.framework.testhelpers.NavigationHelper in project head by mifos.
the class LoanAccountAddNoteTest method addNoteToAccount.
private LoanAccountPage addNoteToAccount() {
NavigationHelper helper = new NavigationHelper(selenium);
LoanAccountPage loanAccountPage = helper.navigateToLoanAccountPage(TEST_ACCOUNT);
AccountAddNotesPage addNotesPage = loanAccountPage.navigateToAddNotesPage();
addNotesPage.verifyPage();
AccountPreviewNotesPage previewPage = addNotesPage.submitAndNavigateToAccountAddNotesPreviewPage(TEST_ACCOUNT_NOTE);
previewPage.verifyPage();
loanAccountPage = previewPage.submitAndNavigateToLoanAccountPage();
return loanAccountPage;
}
use of org.mifos.test.acceptance.framework.testhelpers.NavigationHelper in project head by mifos.
the class ClientLoanDisbursalTest method verifyAcceptedPaymentTypesForDisbursementsOfLoan.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public // http://mifosforge.jira.com/browse/MIFOSTEST-249
void verifyAcceptedPaymentTypesForDisbursementsOfLoan() throws Exception, InterruptedException {
// When
NavigationHelper navigationHelper = new NavigationHelper(selenium);
AdminPage adminPage = navigationHelper.navigateToAdminPage();
DefineAcceptedPaymentTypesPage defineAcceptedPaymentTypesPage = adminPage.navigateToDefineAcceptedPaymentType();
defineAcceptedPaymentTypesPage.addLoanDisbursementsPaymentType(defineAcceptedPaymentTypesPage.CHEQUE);
adminPage = navigationHelper.navigateToAdminPage();
defineAcceptedPaymentTypesPage = adminPage.navigateToDefineAcceptedPaymentType();
defineAcceptedPaymentTypesPage.addLoanDisbursementsPaymentType(defineAcceptedPaymentTypesPage.VOUCHER);
LoanTestHelper loanTestHelper = new LoanTestHelper(selenium);
CreateLoanAccountSearchParameters searchParams = new CreateLoanAccountSearchParameters();
searchParams.setLoanProduct("WeeklyFlatLoanWithOneTimeFees");
searchParams.setSearchString("Stu1233266063395 Client1233266063395");
//Extension https://mifosforge.jira.com/browse/MIFOSTEST-1194
LoanAccountPage loanAccountPage = loanTestHelper.createAndActivateDefaultLoanAccount(searchParams);
DisburseLoanPage disburseLoanPage = loanAccountPage.navigateToDisburseLoan();
DisburseLoanParameters params = new DisburseLoanParameters();
params.setDisbursalDateDD("20");
params.setDisbursalDateMM("03");
params.setDisbursalDateYYYY("2011");
params.setPaymentType(params.CASH);
disburseLoanPage.verifyDisbursalDateIsFutureDate(params);
//disburseLoanPage.submitWithWrongParams(params, "Date of transaction can not be a future date");
params.setDisbursalDateDD("01");
params.setDisbursalDateMM("03");
params.setDisbursalDateYYYY("2011");
disburseLoanPage.verifyDisbursalDateIsPriorToClientMeetingSchedule(params);
params.setDisbursalDateDD("04");
params.setDisbursalDateMM("03");
params.setDisbursalDateYYYY("2011");
//Then
disburseLoanPage.verifyModeOfPayments();
disburseLoanPage.submitAndNavigateToDisburseLoanConfirmationPage(params).submitAndNavigateToLoanAccountPage();
String[] locators = { "Payment rcvd.", "accountActivityTable.2.1" };
loanAccountPage.navigateToViewLoanAccountActivityPage().verifyAllElementsArePresent(locators);
//When
disburseLoanPage = navigationHelper.navigateToLoanAccountPage("000100000000020").navigateToDisburseLoan();
//Then
disburseLoanPage.verifyModeOfPayments();
disburseLoanPage.verifyPaymentModesOfPaymentAreEmpty();
disburseLoanPage.verifyPaymentModeOfPaymentIsEditable("payment mode of payment must be editable when a disbursal fee exists.");
}
use of org.mifos.test.acceptance.framework.testhelpers.NavigationHelper in project head by mifos.
the class PenaltyTest method applyAndWaivePenaltyOnDisbursedLoan.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void applyAndWaivePenaltyOnDisbursedLoan() throws Exception {
String accountId = "000100000000039";
ChargeParameters feeParameters = new ChargeParameters();
feeParameters.setAmount("15");
feeParameters.setType(ChargeParameters.MISC_PENALTY);
LoanAccountPage loanAccountPage = loanTestHelper.applyCharge(accountId, feeParameters);
verifySummaryAndActivity(loanAccountPage, "15", "15", "Misc penalty applied", 2);
loanTestHelper.waivePenalty(accountId);
loanAccountPage = new NavigationHelper(selenium).navigateToLoanAccountPage(accountId);
verifySummaryAndActivity(loanAccountPage, "15", "0", "Penalty waived", 2);
}
Aggregations