use of org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage.SubmitFormParameters in project head by mifos.
the class CollectionSheetEntryTest method getFormParametersForTestOffice.
private SubmitFormParameters getFormParametersForTestOffice() {
SubmitFormParameters formParameters = new SubmitFormParameters();
formParameters.setBranch("MyOffice1233265929385");
formParameters.setLoanOfficer("Joe1233265931256 Guy1233265931256");
formParameters.setCenter("MyCenter1233265933427");
formParameters.setPaymentMode("Cash");
return formParameters;
}
use of org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage.SubmitFormParameters in project head by mifos.
the class CollectionSheetEntryTest method defaultAmountsForMediumCenterSavedToDatabase.
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
//http://mifosforge.jira.com/browse/MIFOSTEST-3
@Test(enabled = true)
public void defaultAmountsForMediumCenterSavedToDatabase() throws Exception {
// Given
initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, "acceptance_medium_005_dbunit.xml", dataSource, selenium);
SubmitFormParameters formParameters = new SubmitFormParameters();
String office = "MyOffice1233171674227";
String officer = "Joe1233171679953 Guy1233171679953";
String center = "MyCenter1233171688286";
String client = "Stu1233171716380 Client1233171716380";
formParameters.setBranch(office);
formParameters.setLoanOfficer(officer);
formParameters.setCenter(center);
formParameters.setPaymentMode(SubmitFormParameters.CASH);
// When
LoanAccountPage loanAccountPage = sheetTestHelper.submitDefaultCollectionSheetEntryData(formParameters).navigateToClientsAndAccountsPageUsingHeaderTab().searchForClient(client).navigateToSearchResult(client + ": ID 0003-000000006").navigateToOnlyLoanAccount();
// Then
loanAccountPage.verifyPrincipalOriginal("2,000");
loanAccountPage.verifyPrincipalBalance("2,000");
}
use of org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage.SubmitFormParameters in project head by mifos.
the class CollectionSheetEntryTest method defaultAdminUserSelectsValidCollectionSheetEntryParameters.
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(enabled = true)
public void defaultAdminUserSelectsValidCollectionSheetEntryParameters() throws Exception {
SubmitFormParameters formParameters = new SubmitFormParameters();
formParameters.setBranch("Office1");
formParameters.setLoanOfficer("Bagonza Wilson");
formParameters.setCenter("Center1");
formParameters.setPaymentMode("Cash");
initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, "acceptance_small_001_dbunit.xml", dataSource, selenium);
CollectionSheetEntrySelectPage selectPage = new CollectionSheetEntryTestHelper(selenium).loginAndNavigateToCollectionSheetEntrySelectPage();
selectPage.verifyPage();
CollectionSheetEntryEnterDataPage enterDataPage = selectPage.submitAndGotoCollectionSheetEntryEnterDataPage(formParameters);
enterDataPage.enterAccountValue(0, 0, 99.0);
enterDataPage.enterAccountValue(1, 1, 0.0);
enterDataPage.enterAccountValue(2, 0, 0.0);
CollectionSheetEntryPreviewDataPage previewPage = enterDataPage.submitAndGotoCollectionSheetEntryPreviewDataPage();
previewPage.verifyPage(formParameters);
CollectionSheetEntryConfirmationPage confirmationPage = previewPage.submitAndGotoCollectionSheetEntryConfirmationPage();
confirmationPage.verifyPage();
verifyCollectionSheetData("acceptance_small_002_dbunit.xml");
}
use of org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage.SubmitFormParameters in project head by mifos.
the class CollectionSheetEntryAttendanceTest method verifyEnteringAttendanceForOneCenterDoesntAffectOtherCenters.
/**
* Verify Entering attendance for one center doesn't affect other centers.
* http://mifosforge.jira.com/browse/MIFOSTEST-5
* @throws Exception
*/
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void verifyEnteringAttendanceForOneCenterDoesntAffectOtherCenters() throws Exception {
initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, "acceptance_small_001_dbunit.xml", dataSource, selenium);
int[] overwriteAttendanceValues = new int[] { ATTENDANCE_L, ATTENDANCE_AA, ATTENDANCE_A, ATTENDANCE_P };
int[] basicAttendanceValues = new int[] { ATTENDANCE_P, ATTENDANCE_P, ATTENDANCE_P, ATTENDANCE_L };
int[] secondCenterAttendance = new int[] { ATTENDANCE_AA, ATTENDANCE_A, ATTENDANCE_L };
SubmitFormParameters collectionSheetParams = getFormParametersForCenter2();
SubmitFormParameters collectionSheetParams2 = getFormParametersForCenter1();
int[] defaultAttendanceValues = { ATTENDANCE_P, ATTENDANCE_P, ATTENDANCE_P, ATTENDANCE_P };
int[] defaultAttendanceValues2 = { ATTENDANCE_P, ATTENDANCE_P, ATTENDANCE_P };
String[] clients = { "Teja Kakarla", "Aarif Mawani", "Mutu Juma", "Anna Martin" };
String[] clients2 = { "Veronica Abisya", "Dauda Mayowa", "Polly Gikonyo" };
String[] clientsNotAffected = { "Tesa Mendez", "Megana Martin", "Reyna Tabilin", "Mary Asanti" };
int[] meetingsAttended11 = { 1, 1, 1, 1 };
int[] meetingsMissed11 = { 0, 0, 0, 0 };
int[] meetingsAttended12 = { 1, 0, 0, 1 };
int[] meetingsMissed12 = { 0, 1, 1, 0 };
int[] meetingsAttended22 = { 0, 0, 1 };
int[] meetingsMissed22 = { 1, 1, 0 };
collectionSheetEntryTestHelper.submitCollectionSheetWithChangedAttendance(collectionSheetParams, defaultAttendanceValues, basicAttendanceValues);
for (int i = 0; i < clients.length; i++) {
verifyMeetingAttendances(clients[i], meetingsAttended11[i], meetingsMissed11[i]);
}
collectionSheetEntryTestHelper.submitCollectionSheetWithChangedAttendance(collectionSheetParams, basicAttendanceValues, overwriteAttendanceValues);
collectionSheetEntryTestHelper.submitCollectionSheetWithChangedAttendance(collectionSheetParams2, defaultAttendanceValues2, secondCenterAttendance);
for (int i = 0; i < clients.length; i++) {
verifyMeetingAttendances(clients[i], meetingsAttended12[i], meetingsMissed12[i]);
}
for (int i = 0; i < clients2.length; i++) {
verifyMeetingAttendances(clients2[i], meetingsAttended22[i], meetingsMissed22[i]);
}
for (String element : clientsNotAffected) {
verifyMeetingAttendances(element, 0, 0);
}
}
use of org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage.SubmitFormParameters in project head by mifos.
the class CollectionSheetEntryCustomerAccountTest method previousPaidFeeNotDisplayedOnSecondCollectionSheetEntry.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public // one of the dependent methods throws Exception
void previousPaidFeeNotDisplayedOnSecondCollectionSheetEntry() throws Exception {
SubmitFormParameters formParameters = getFormParametersForTestOffice();
initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, "acceptance_small_003_dbunit.xml", dataSource, selenium);
CollectionSheetEntryConfirmationPage confirmationPage = enterAndSubmitCustomerAccountData(formParameters, BASIC_CUSTOMER_ACCT_VALUES);
// navigate back to collection sheet entry
HomePage homePage = confirmationPage.navigateToHomePage();
ClientsAndAccountsHomepage clientsAndAccountsPage = homePage.navigateToClientsAndAccountsUsingHeaderTab();
CollectionSheetEntrySelectPage selectPage = clientsAndAccountsPage.navigateToEnterCollectionSheetDataUsingLeftMenu();
selectPage.verifyPage();
// enter same search data and inspect displayed client account (A/C
// Collection) values
CollectionSheetEntryEnterDataPage enterDataPage = selectCenterAndContinue(formParameters, selectPage);
enterDataPage.verifyCustomerAccountValue(0, 6, 0.0);
enterDataPage.verifyCustomerAccountValue(1, 6, 0.0);
enterDataPage.verifyCustomerAccountValue(2, 6, 0.0);
enterDataPage.verifyCustomerAccountValue(3, 6, 0.0);
enterDataPage.verifyCustomerAccountValue(4, 6, 0.0);
enterDataPage.cancel();
}
Aggregations