use of org.mifos.test.acceptance.framework.center.MeetingParameters in project head by mifos.
the class CenterTest method editingCenterMeetinSchedule.
// http://mifosforge.jira.com/browse/MIFOSTEST-1176
@Test(enabled = true)
public void editingCenterMeetinSchedule() {
//Given
String centerName = "DefineNewSavingsProductTestCenter";
String groupName = "DefineNewSavingsProductTestGroup";
String clientName = "DefineNewSavingsProduct TestClient";
MeetingParameters parameters = new MeetingParameters();
parameters.setWeekDay(MeetingParameters.WeekDay.THURSDAY);
//When
String meetingSchedule = centerTestHelper.editCenterMeetingSchedule(centerName, parameters).getMeetingSchedule();
//Then
clientTestHelper.verifyMeetingSchedule(clientName, meetingSchedule);
groupTestHelper.verifyMeetingSchedule(groupName, meetingSchedule);
parameters.setWeekDay(MeetingParameters.WeekDay.MONDAY);
centerTestHelper.editCenterMeetingSchedule(centerName, parameters);
}
use of org.mifos.test.acceptance.framework.center.MeetingParameters in project head by mifos.
the class CenterTest method verifyApplyPaymentForCenterWithUnusualName.
@Test(enabled = true)
public void verifyApplyPaymentForCenterWithUnusualName() {
String centerName = "`~!@#$%^&*()_+-=[];',./{}|:<>? Center";
CreateCenterEnterDataPage.SubmitFormParameters formParameters = new CreateCenterEnterDataPage.SubmitFormParameters();
formParameters.setCenterName(centerName);
formParameters.setLoanOfficer("loan officer");
MeetingParameters meeting = MeetingParameters.getRandomMeetingParameters();
formParameters.setMeeting(meeting);
centerTestHelper.createCenter(formParameters, "MyOfficeDHMFT");
NavigationHelper navigationHelper = new NavigationHelper(selenium);
ViewCenterChargesDetailPage viewCenterChargesDetailPage = navigationHelper.navigateToCenterViewDetailsPage(centerName).navigateToViewCenterChargesDetailPage();
ApplyChargesPage applyChargesPage = viewCenterChargesDetailPage.navigateToApplyCharges();
ChargeParameters chargeParameters = new ChargeParameters();
chargeParameters.setAmount("100");
chargeParameters.setType(ChargeParameters.MISC_FEES);
viewCenterChargesDetailPage = applyChargesPage.applyChargeAndNaviagteToViewCenterChargesDetailPage(chargeParameters);
ApplyPaymentPage applyPaymentPage = viewCenterChargesDetailPage.navigateToApplyPayments();
PaymentParameters parameters = new PaymentParameters();
DateTime dateTime = new DateTime();
parameters.setAmount("100");
parameters.setTransactionDateDD(Integer.toString(dateTime.getDayOfMonth()));
parameters.setTransactionDateMM(Integer.toString(dateTime.getMonthOfYear()));
parameters.setTransactionDateYYYY(Integer.toString(dateTime.getYear()));
parameters.setPaymentType(PaymentParameters.CASH);
ApplyPaymentConfirmationPage applyPaymentConfirmationPage = applyPaymentPage.submitAndNavigateToApplyPaymentConfirmationPage(parameters);
//ElementPresent("css=form[name=applyPaymentActionForm]"));
Assert.assertEquals(true, applyPaymentConfirmationPage.getSelenium().isTextPresent("Review transaction"));
}
use of org.mifos.test.acceptance.framework.center.MeetingParameters in project head by mifos.
the class ClientTestHelper method createClientWithCustomMFIInformation.
/**
* Creates client for office and witch custom weekly meeting schedule.
* @param loanOfficer assigned loan officer
* @param office office's name
* @param frequency weekly meeting frequency
* @param weekDay day of the meeting
* @param meetingPlace place of the meetings
* @return
*/
public ClientViewDetailsPage createClientWithCustomMFIInformation(String loanOfficer, String office, String frequency, MeetingParameters.WeekDay weekDay, String meetingPlace) {
CreateClientEnterPersonalDataPage clientPersonalDataPage = navigateToPersonalDataPage(office);
CreateClientEnterPersonalDataPage.SubmitFormParameters formParameters = FormParametersHelper.getClientEnterPersonalDataPageFormParameters();
clientPersonalDataPage = clientPersonalDataPage.create(formParameters);
clientPersonalDataPage.submitAndGotoCreateClientEnterMfiDataPage();
CreateClientEnterMfiDataPage.SubmitFormParameters mfiFormParameters = new CreateClientEnterMfiDataPage.SubmitFormParameters();
mfiFormParameters.setLoanOfficerId(loanOfficer);
MeetingParameters meetingFormParameters = new MeetingParameters();
meetingFormParameters.setWeekFrequency(frequency);
meetingFormParameters.setWeekDay(weekDay);
meetingFormParameters.setMeetingPlace(meetingPlace);
mfiFormParameters.setMeeting(meetingFormParameters);
CreateClientPreviewDataPage clientPreviewDataPage = new CreateClientEnterMfiDataPage(selenium).submitAndGotoCreateClientPreviewDataPage(mfiFormParameters);
CreateClientConfirmationPage clientConfirmationPage = clientPreviewDataPage.submit();
clientConfirmationPage.verifyPage();
return navigateToClientViewDetails(formParameters);
}
use of org.mifos.test.acceptance.framework.center.MeetingParameters in project head by mifos.
the class ClientTestHelper method createClientMFIInformationAndGoToPreviewPage.
public CreateClientPreviewDataPage createClientMFIInformationAndGoToPreviewPage(String loanOfficer, CreateClientEnterMfiDataPage clientMfiDataPage) {
CreateClientEnterMfiDataPage.SubmitFormParameters mfiFormParameters = new CreateClientEnterMfiDataPage.SubmitFormParameters();
mfiFormParameters.setLoanOfficerId(loanOfficer);
MeetingParameters meetingFormParameters = new MeetingParameters();
meetingFormParameters.setWeekFrequency("1");
meetingFormParameters.setWeekDay(MeetingParameters.WeekDay.WEDNESDAY);
meetingFormParameters.setMeetingPlace("Mangalore");
mfiFormParameters.setMeeting(meetingFormParameters);
return clientMfiDataPage.submitAndGotoCreateClientPreviewDataPage(mfiFormParameters);
}
use of org.mifos.test.acceptance.framework.center.MeetingParameters in project head by mifos.
the class TestDataSetup method setMeetingScheduleParameters.
private MeetingParameters setMeetingScheduleParameters() {
MeetingParameters meetingParameters = new MeetingParameters();
meetingParameters.setMeetingPlace("test_location");
meetingParameters.setWeekFrequency("1");
meetingParameters.setWeekDay(MeetingParameters.WeekDay.TUESDAY);
return meetingParameters;
}
Aggregations