Search in sources :

Example 16 with CreateLoanAccountEntryPage

use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage in project head by mifos.

the class CenterMeetingTest method verifyDefaultDisburstmentDateWithMeetingStartDateInTheFutureWithSameWeekDays.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
private void verifyDefaultDisburstmentDateWithMeetingStartDateInTheFutureWithSameWeekDays(int lsim) throws Exception {
    databaseOperation.updateLSIM(lsim);
    DateTime time = new DateTime(2012, 10, 19, 1, 0, 0, 0);
    setTime(time);
    MeetingParameters meeting = new MeetingParameters();
    meeting.setMeetingPlace("centerTestMeetingPlace" + StringUtil.getRandomString(5));
    meeting.setWeekFrequency("1");
    meeting.setWeekDay(MeetingParameters.WeekDay.WEDNESDAY);
    meeting.setMeetingStartDate("31/10/2012");
    prepareCenterForTest(meeting);
    prepareGroupForTest();
    LoanTestHelper loanHelper = new LoanTestHelper(selenium);
    CreateLoanAccountEntryPage loanEntryPage = loanHelper.navigateToCreateLoanAccountEntryPageWithoutLogout(groupName, loanProductName);
    loanEntryPage.verifyDisbsursalDate("31", "10", "2012");
}
Also used : MeetingParameters(org.mifos.test.acceptance.framework.center.MeetingParameters) DateTime(org.joda.time.DateTime) LoanTestHelper(org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper) CreateLoanAccountEntryPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)

Example 17 with CreateLoanAccountEntryPage

use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage in project head by mifos.

the class CenterMeetingTest method verifyDefaultDisburstmentDateWithMeetingStartDateInThePast.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
private void verifyDefaultDisburstmentDateWithMeetingStartDateInThePast(int lsim) throws Exception {
    databaseOperation.updateLSIM(lsim);
    DateTime time = new DateTime(2012, 10, 19, 1, 0, 0, 0);
    setTime(time);
    MeetingParameters meeting = new MeetingParameters();
    meeting.setMeetingPlace("centerTestMeetingPlace" + StringUtil.getRandomString(5));
    meeting.setWeekFrequency("1");
    meeting.setWeekDay(MeetingParameters.WeekDay.MONDAY);
    meeting.setMeetingStartDate("10/10/2000");
    prepareCenterForTest(meeting);
    prepareGroupForTest();
    LoanTestHelper loanHelper = new LoanTestHelper(selenium);
    CreateLoanAccountEntryPage loanEntryPage = loanHelper.navigateToCreateLoanAccountEntryPageWithoutLogout(groupName, loanProductName);
    loanEntryPage.verifyDisbsursalDate("22", "10", "2012");
}
Also used : MeetingParameters(org.mifos.test.acceptance.framework.center.MeetingParameters) DateTime(org.joda.time.DateTime) LoanTestHelper(org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper) CreateLoanAccountEntryPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)

Example 18 with CreateLoanAccountEntryPage

use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage in project head by mifos.

the class CenterMeetingTest method verifyDefaultDisburstmentDateWithDefaultMeetingStartDate.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
private void verifyDefaultDisburstmentDateWithDefaultMeetingStartDate(int lsim) throws Exception {
    databaseOperation.updateLSIM(lsim);
    DateTime time = new DateTime(2012, 10, 19, 1, 0, 0, 0);
    setTime(time);
    MeetingParameters meeting = new MeetingParameters();
    meeting.setMeetingPlace("centerTestMeetingPlace" + StringUtil.getRandomString(5));
    meeting.setWeekFrequency("1");
    meeting.setWeekDay(MeetingParameters.WeekDay.MONDAY);
    meeting.setMeetingStartDate(null);
    prepareCenterForTest(meeting);
    prepareGroupForTest();
    LoanTestHelper loanHelper = new LoanTestHelper(selenium);
    CreateLoanAccountEntryPage loanEntryPage = loanHelper.navigateToCreateLoanAccountEntryPageWithoutLogout(groupName, loanProductName);
    loanEntryPage.verifyDisbsursalDate("22", "10", "2012");
}
Also used : MeetingParameters(org.mifos.test.acceptance.framework.center.MeetingParameters) DateTime(org.joda.time.DateTime) LoanTestHelper(org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper) CreateLoanAccountEntryPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)

Example 19 with CreateLoanAccountEntryPage

use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage in project head by mifos.

the class CenterMeetingTest method verifyDefaultDisburstmentDateWithMeetingStartDateInTheFuture.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
private void verifyDefaultDisburstmentDateWithMeetingStartDateInTheFuture(int lsim) throws Exception {
    databaseOperation.updateLSIM(lsim);
    DateTime time = new DateTime(2012, 10, 19, 1, 0, 0, 0);
    setTime(time);
    MeetingParameters meeting = new MeetingParameters();
    meeting.setMeetingPlace("centerTestMeetingPlace" + StringUtil.getRandomString(5));
    meeting.setWeekFrequency("1");
    meeting.setWeekDay(MeetingParameters.WeekDay.WEDNESDAY);
    meeting.setMeetingStartDate("25/10/2012");
    prepareCenterForTest(meeting);
    prepareGroupForTest();
    LoanTestHelper loanHelper = new LoanTestHelper(selenium);
    CreateLoanAccountEntryPage loanEntryPage = loanHelper.navigateToCreateLoanAccountEntryPageWithoutLogout(groupName, loanProductName);
    loanEntryPage.verifyDisbsursalDate("31", "10", "2012");
}
Also used : MeetingParameters(org.mifos.test.acceptance.framework.center.MeetingParameters) DateTime(org.joda.time.DateTime) LoanTestHelper(org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper) CreateLoanAccountEntryPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)

Example 20 with CreateLoanAccountEntryPage

use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage in project head by mifos.

the class QuestionGroupLoanAccountTest method verifyKeyFinderInQuestionary.

@Test(enabled = true)
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void verifyKeyFinderInQuestionary() {
    NavigationHelper navigationHelper = new NavigationHelper(selenium);
    QuestionGroupHelper questionGroupHelper = new QuestionGroupHelper(navigationHelper);
    Random random = new Random();
    boolean keyUnpressed = true;
    boolean keyPressed = false;
    String questionGroupTitle = "QG1" + random.nextInt(100);
    String question1 = "DT_6245";
    String choiceAnswer1 = "choiceTest13242";
    String choiceAnswer2 = "choiceTest34003";
    List<String> tag1 = new ArrayList<String>();
    List<String> tag2 = new ArrayList<String>();
    tag1.add("tag");
    tag2.add("tag1");
    questionGroupHelper.createQuestionGroupSmart(questionGroupTitle, "Create Loan", question1, choiceAnswer1, choiceAnswer2, tag1, tag2);
    loanProductTestHelper.editLoanProductIncludeQuestionsGroups("ClientEmergencyLoan", questionGroupTitle);
    CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
    searchParameters.setSearchString("ClientWithLoan 20110221");
    searchParameters.setLoanProduct("ClientEmergencyLoan");
    CreateLoanAccountSubmitParameters submitAccountParameters = new CreateLoanAccountSubmitParameters();
    submitAccountParameters.setAmount("1012.0");
    LoanTestHelper loanTestHelper = new LoanTestHelper(selenium);
    CreateLoanAccountEntryPage createLoanAccountEntryPage = loanTestHelper.navigateToCreateLoanAccountEntryPage(searchParameters);
    createLoanAccountEntryPage.submitAndNavigateToQuestionResponsePage();
    searchParameters.setSearchString("ClientWithLoan 20110221");
    Assert.assertEquals((boolean) createLoanAccountEntryPage.isAnswerExist(keyUnpressed), true);
    Assert.assertEquals((boolean) createLoanAccountEntryPage.isAnswerExist(keyPressed), false);
    createLoanAccountEntryPage.setInputFilterChoices("2");
    Assert.assertEquals((boolean) createLoanAccountEntryPage.isAnswerExist(keyPressed), true);
    navigationHelper.navigateToAdminPage().navigateToViewAllQuestions().navigateToQuestionDetail(question1).navigateToEditQuestionPage().deactivate();
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) Random(java.util.Random) ArrayList(java.util.ArrayList) CreateLoanAccountSubmitParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters) QuestionGroupHelper(org.mifos.test.acceptance.loan.QuestionGroupHelper) LoanTestHelper(org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper) CreateLoanAccountEntryPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage) Test(org.testng.annotations.Test)

Aggregations

CreateLoanAccountEntryPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)33 CreateLoanAccountSearchParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters)22 DateTime (org.joda.time.DateTime)16 CreateLoanAccountConfirmationPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountConfirmationPage)14 CreateLoanAccountSearchPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchPage)13 CreateLoanAccountPreviewPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountPreviewPage)12 CreateLoanAccountReviewInstallmentPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage)12 Test (org.testng.annotations.Test)12 ClientsAndAccountsHomepage (org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage)10 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)10 LoanTestHelper (org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper)7 MeetingParameters (org.mifos.test.acceptance.framework.center.MeetingParameters)6 DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)6 CreateLoanAccountSubmitParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters)5 DisburseLoanParameters (org.mifos.test.acceptance.framework.loan.DisburseLoanParameters)5 EditLoanAccountStatusParameters (org.mifos.test.acceptance.framework.loan.EditLoanAccountStatusParameters)5 EditPreviewLoanAccountPage (org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage)5 ViewRepaymentSchedulePage (org.mifos.test.acceptance.framework.loan.ViewRepaymentSchedulePage)5 EditLoanAccountInformationPage (org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationPage)4 ArrayList (java.util.ArrayList)2