Search in sources :

Example 1 with SavingsAccountDetailPage

use of org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage in project head by mifos.

the class QuestionGroupSavingsAccountTest method verifyCapturingResponsesDuringSavingsCreation.

//http://mifosforge.jira.com/browse/MIFOSTEST-669
/*
     * need to fix up commonality between questionaire pages for loan and savings.
     */
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
//TODO http://mifosforge.jira.com/browse/MIFOS-5081
@Test(enabled = false)
public void verifyCapturingResponsesDuringSavingsCreation() throws Exception {
    DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    DateTime targetTime = new DateTime(2011, 2, 28, 15, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    setQuestionGroup();
    createClient("669");
    CreateSavingsAccountSearchParameters searchParameters = new CreateSavingsAccountSearchParameters();
    searchParameters.setSearchString("Joe669 Doe669");
    searchParameters.setSavingsProduct("MonthlyClientSavingsAccount");
    CreateSavingsAccountSubmitParameters submitAccountParameters = new CreateSavingsAccountSubmitParameters();
    submitAccountParameters.setAmount("248.0");
    QuestionResponseParameters questionResponseParameters = new QuestionResponseParameters();
    questionResponseParameters.addTextAnswer("questionGroups[1].sectionDetails[0].questions[0].value", "textquestion");
    questionResponseParameters.addTextAnswer("questionGroups[1].sectionDetails[0].questions[1].value", "100");
    questionResponseParameters.addTextAnswer("questionGroups[1].sectionDetails[0].questions[2].value", "Text");
    questionResponseParameters.addSingleSelectAnswer("questionGroups[1].sectionDetails[0].questions[3].value", "blue");
    questionResponseParameters.addSingleSelectAnswer("questionGroups[1].sectionDetails[1].questions[0].values", "two");
    questionResponseParameters.addTextAnswer("questionGroups[1].sectionDetails[1].questions[1].value", "6");
    questionResponseParameters.addTextAnswer("questionGroups[0].sectionDetails[0].questions[0].value", "04/02/2011");
    questionResponseParameters.addSingleSelectAnswer("questionGroups[0].sectionDetails[0].questions[1].values", "one");
    questionResponseParameters.addTextAnswer("questionGroups[0].sectionDetails[0].questions[2].value", "123");
    questionResponseParameters.addTextAnswer("questionGroups[0].sectionDetails[0].questions[3].value", "7");
    questionResponseParameters.addTextAnswer("questionGroups[0].sectionDetails[1].questions[0].value", "Text");
    questionResponseParameters.addSingleSelectAnswer("questionGroups[0].sectionDetails[1].questions[1].value", "red");
    questionResponseParameters.addTextAnswer("questionGroups[0].sectionDetails[2].questions[0].value", "Text");
    QuestionResponseParameters questionResponseParameters2 = new QuestionResponseParameters();
    questionResponseParameters2.addTextAnswer("questionGroups[1].sectionDetails[0].questions[0].value", "textQuestion");
    questionResponseParameters2.addTextAnswer("questionGroups[0].sectionDetails[0].questions[3].value", "9");
    savingsAccountHelper.fillQuestionGroupsDurringCreationSavingsAccount(searchParameters, submitAccountParameters, questionResponseParameters);
    SavingsAccountDetailPage savingsAccountDetailPage = savingsAccountHelper.editAdditionalInformationDurringCreationSavingsAccount(questionResponseParameters2);
    String savingsId = savingsAccountDetailPage.getAccountId();
    questionGroupTestHelper.markQuestionGroupAsInactive("QGForCreateSavingsAccount");
    questionGroupTestHelper.markQuestionAsInactive("SingleSelect");
    questionGroupTestHelper.markQuestionAsInactive("NumberBetween5And10");
    questionGroupTestHelper.markQuestionAsInactive("Question1");
    questionGroupTestHelper.markQuestionAsInactive("question 1");
    CreateQuestionParameters createQuestionParameters = new CreateQuestionParameters();
    createQuestionParameters.setType(CreateQuestionParameters.TYPE_FREE_TEXT);
    createQuestionParameters.setText("newQuestion232");
    List<CreateQuestionParameters> newQuestionList = new ArrayList<CreateQuestionParameters>();
    newQuestionList.add(createQuestionParameters);
    questionGroupTestHelper.addNewQuestionsToQuestionGroup("QGForCreateSavingsAccount2", newQuestionList);
    Map<String, String> questionsAndAnswers = new HashMap<String, String>();
    questionsAndAnswers.put("MultiSelect", "two");
    questionsAndAnswers.put("Number", "100");
    questionsAndAnswers.put("FreeText", "textquestion");
    String[] questionsExist = { "newQuestion232", "MultiSelect", "Number", "FreeText" };
    String[] questionsInactive = { "SingleSelect", "NumberBetween5And10", "Question1", "question 1", "Date" };
    QuestionnairePage questionnairePage = savingsAccountHelper.navigateToQuestionResponseDuringCreateSavings(searchParameters, submitAccountParameters);
    questionnairePage.verifyQuestionsExists(questionsExist);
    questionnairePage.verifyQuestionsDoesnotappear(questionsInactive);
    verifyQuestionResponsesExistInDatabase(savingsId, "Create Savings", questionsAndAnswers);
    questionGroupTestHelper.markQuestionGroupAsInactive("QGForCreateSavingsAccount2");
    questionGroupTestHelper.markQuestionAsActive("SingleSelect");
    questionGroupTestHelper.markQuestionAsActive("NumberBetween5And10");
    questionGroupTestHelper.markQuestionAsActive("Question1");
    questionGroupTestHelper.markQuestionAsActive("question 1");
}
Also used : HashMap(java.util.HashMap) QuestionnairePage(org.mifos.test.acceptance.framework.questionnaire.QuestionnairePage) ArrayList(java.util.ArrayList) SavingsAccountDetailPage(org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage) DateTime(org.joda.time.DateTime) QuestionResponseParameters(org.mifos.test.acceptance.framework.loan.QuestionResponseParameters) CreateSavingsAccountSubmitParameters(org.mifos.test.acceptance.framework.savings.CreateSavingsAccountSubmitParameters) CreateQuestionParameters(org.mifos.test.acceptance.framework.questionnaire.CreateQuestionParameters) CreateSavingsAccountSearchParameters(org.mifos.test.acceptance.framework.savings.CreateSavingsAccountSearchParameters) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) Test(org.testng.annotations.Test)

Example 2 with SavingsAccountDetailPage

use of org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage in project head by mifos.

the class AdditionalSavingsAccountTest method restrictionsSavingsTransactions.

//http://mifosforge.jira.com/browse/MIFOSTEST-1070
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(groups = "no_db_unit")
public void restrictionsSavingsTransactions() throws Exception {
    //Given
    DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    DateTime targetTime = new DateTime(2011, 2, 1, 13, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    //When
    SavingsAccountDetailPage savingsAccountDetailPage = createSavingAccountWithCreatedProduct("Stu1233171716380 Client1233171716380", "SavingsProductWithInterestOnMonthlyAvgBalance", "100000.0");
    String savingsId = savingsAccountDetailPage.getAccountId();
    EditAccountStatusParameters editAccountStatusParameters = new EditAccountStatusParameters();
    editAccountStatusParameters.setAccountStatus(AccountStatus.SAVINGS_ACTIVE);
    editAccountStatusParameters.setNote("change status to active");
    savingsAccountHelper.changeStatus(savingsId, editAccountStatusParameters);
    make3StraightDeposit(savingsId);
    targetTime = new DateTime(2012, 1, 1, 13, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    navigationHelper.navigateToAdminPage();
    runBatchJobsForSavingsIntPostingWithCleanup();
    navigationHelper.navigateToSavingsAccountDetailPage(savingsId);
    Assert.assertEquals(selenium.getTable("recentActivityForDetailPage.1.2"), "20,594.9");
    //Then
    DepositWithdrawalSavingsParameters depositParams = new DepositWithdrawalSavingsParameters();
    DateTime badDate = new DateTime(2011, 5, 5, 13, 0, 0, 0);
    makeDefaultDepositWithdrawal(badDate, depositParams, savingsId, DepositWithdrawalSavingsParameters.DEPOSIT, "100000");
    Assert.assertTrue(selenium.isTextPresent("Date of transaction is invalid. It can not be prior to the last meeting date of the customer or prior to activation date of the savings account."));
}
Also used : SavingsAccountDetailPage(org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DateTime(org.joda.time.DateTime) EditAccountStatusParameters(org.mifos.test.acceptance.framework.account.EditAccountStatusParameters) DepositWithdrawalSavingsParameters(org.mifos.test.acceptance.framework.savings.DepositWithdrawalSavingsParameters) Test(org.testng.annotations.Test)

Example 3 with SavingsAccountDetailPage

use of org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage in project head by mifos.

the class AdditionalSavingsAccountTest method savingsAccountWithDailyInterestMandatoryDeposits.

//http://mifosforge.jira.com/browse/MIFOSTEST-712
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void savingsAccountWithDailyInterestMandatoryDeposits() throws Exception {
    //Given
    DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    DateTime targetTime = new DateTime(2011, 2, 10, 13, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, "acceptance_small_008_dbunit.xml", dataSource, selenium);
    //When
    SavingsProductParameters params = savingsProductHelper.getMandatoryClientsMinimumBalanceSavingsProductParameters(targetTime);
    DefineNewSavingsProductConfirmationPage confirmationPage = savingsProductHelper.createSavingsProduct(params);
    //"Stu1233266079799 Client1233266079799"
    confirmationPage.navigateToSavingsProductDetails();
    SavingsAccountDetailPage savingsAccountDetailPage = createSavingAccountWithCreatedProduct("Stu1233266079799 Client1233266079799", params.getProductInstanceName(), "100000.0");
    String savingsId = savingsAccountDetailPage.getAccountId();
    EditAccountStatusParameters editAccountStatusParameters = new EditAccountStatusParameters();
    editAccountStatusParameters.setAccountStatus(AccountStatus.SAVINGS_ACTIVE);
    editAccountStatusParameters.setNote("change status to active");
    savingsAccountHelper.changeStatus(savingsId, editAccountStatusParameters);
    DepositWithdrawalSavingsParameters depositParams = new DepositWithdrawalSavingsParameters();
    make3StraightDeposit(savingsId);
    depositParams = setDepositParams(depositParams, "01", "03", "2011");
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    //Then
    targetTime = new DateTime(2011, 3, 1, 13, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    navigationHelper.navigateToSavingsAccountDetailPage(savingsId);
    navigationHelper.navigateToAdminPage();
    runBatchJobsForSavingsIntPosting();
    navigationHelper.navigateToSavingsAccountDetailPage(savingsId);
    Assert.assertEquals(selenium.getTable("recentActivityForDetailPage.1.2"), "57.4");
    //When
    targetTime = new DateTime(2011, 3, 7, 13, 0, 0, 0);
    depositParams = makeDefaultDepositWithdrawal(targetTime, depositParams, savingsId, DepositWithdrawalSavingsParameters.DEPOSIT, "100000.0");
    targetTime = new DateTime(2011, 3, 14, 13, 0, 0, 0);
    depositParams = makeDefaultDepositWithdrawal(targetTime, depositParams, savingsId, DepositWithdrawalSavingsParameters.DEPOSIT, "100000.0");
    targetTime = new DateTime(2011, 3, 21, 13, 0, 0, 0);
    depositParams = makeDefaultDepositWithdrawal(targetTime, depositParams, savingsId, DepositWithdrawalSavingsParameters.DEPOSIT, "100000.0");
    targetTime = new DateTime(2011, 3, 28, 13, 0, 0, 0);
    depositParams = makeDefaultDepositWithdrawal(targetTime, depositParams, savingsId, DepositWithdrawalSavingsParameters.DEPOSIT, "100000.0");
    //Then
    targetTime = new DateTime(2011, 4, 1, 13, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    navigationHelper.navigateToSavingsAccountDetailPage(savingsId);
    navigationHelper.navigateToAdminPage();
    runBatchJobsForSavingsIntPosting();
    navigationHelper.navigateToSavingsAccountDetailPage(savingsId);
    Assert.assertEquals(selenium.getTable("recentActivityForDetailPage.1.2"), "402.7");
}
Also used : DefineNewSavingsProductConfirmationPage(org.mifos.test.acceptance.framework.savingsproduct.DefineNewSavingsProductConfirmationPage) SavingsAccountDetailPage(org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage) SavingsProductParameters(org.mifos.test.acceptance.framework.savingsproduct.SavingsProductParameters) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DateTime(org.joda.time.DateTime) EditAccountStatusParameters(org.mifos.test.acceptance.framework.account.EditAccountStatusParameters) DepositWithdrawalSavingsParameters(org.mifos.test.acceptance.framework.savings.DepositWithdrawalSavingsParameters)

Example 4 with SavingsAccountDetailPage

use of org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage in project head by mifos.

the class AdditionalSavingsAccountTest method savingsAccountsWithDifferentTransactionsOrdering.

//http://mifosforge.jira.com/browse/MIFOSTEST-721
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(groups = "no_db_unit")
public void savingsAccountsWithDifferentTransactionsOrdering() throws Exception {
    //Given
    DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    DateTime targetTime = new DateTime(2011, 2, 10, 13, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    //When
    SavingsProductParameters params = savingsProductHelper.getMandatoryClientsMinimumBalanceSavingsProductParameters(targetTime);
    params.setTypeOfDeposits(SavingsProductParameters.VOLUNTARY);
    DefineNewSavingsProductConfirmationPage confirmationPage = savingsProductHelper.createSavingsProduct(params);
    confirmationPage.navigateToSavingsProductDetails();
    //account1
    SavingsAccountDetailPage savingsAccountDetailPage = createSavingAccountWithCreatedProduct("Stu1233171716380 Client1233171716380", params.getProductInstanceName(), "100000.0");
    String savingsId = savingsAccountDetailPage.getAccountId();
    EditAccountStatusParameters editAccountStatusParameters = new EditAccountStatusParameters();
    editAccountStatusParameters.setAccountStatus(AccountStatus.SAVINGS_ACTIVE);
    editAccountStatusParameters.setNote("change status to active");
    savingsAccountHelper.changeStatus(savingsId, editAccountStatusParameters);
    DepositWithdrawalSavingsParameters depositParams = new DepositWithdrawalSavingsParameters();
    depositParams = makeDefaultDepositWithdrawal(targetTime, depositParams, savingsId, DepositWithdrawalSavingsParameters.DEPOSIT, "100000.0");
    targetTime = new DateTime(2011, 2, 15, 13, 0, 0, 0);
    depositParams = makeDefaultDepositWithdrawal(targetTime, depositParams, savingsId, DepositWithdrawalSavingsParameters.WITHDRAWAL, "100000.0");
    depositParams = makeDefaultDepositWithdrawal(targetTime, depositParams, savingsId, DepositWithdrawalSavingsParameters.DEPOSIT, "100000.0");
    //account2
    targetTime = new DateTime(2011, 2, 10, 13, 0, 0, 0);
    savingsAccountDetailPage = createSavingAccountWithCreatedProduct("Stu1233171716380 Client1233171716380", params.getProductInstanceName(), "100000.0");
    String savingsId2 = savingsAccountDetailPage.getAccountId();
    editAccountStatusParameters = new EditAccountStatusParameters();
    editAccountStatusParameters.setAccountStatus(AccountStatus.SAVINGS_ACTIVE);
    editAccountStatusParameters.setNote("change status to active");
    savingsAccountHelper.changeStatus(savingsId2, editAccountStatusParameters);
    depositParams = new DepositWithdrawalSavingsParameters();
    targetTime = new DateTime(2011, 2, 15, 13, 0, 0, 0);
    depositParams = makeDefaultDepositWithdrawal(targetTime, depositParams, savingsId2, DepositWithdrawalSavingsParameters.DEPOSIT, "100000.0");
    depositParams = makeDefaultDepositWithdrawal(targetTime, depositParams, savingsId2, DepositWithdrawalSavingsParameters.DEPOSIT, "100000.0");
    depositParams = makeDefaultDepositWithdrawal(targetTime, depositParams, savingsId2, DepositWithdrawalSavingsParameters.WITHDRAWAL, "100000.0");
    //Then
    targetTime = new DateTime(2011, 4, 1, 13, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    navigationHelper.navigateToAdminPage();
    runBatchJobsForSavingsIntPostingWithCleanup();
    navigationHelper.navigateToSavingsAccountDetailPage(savingsId);
    Assert.assertEquals(selenium.getTable("recentActivityForDetailPage.1.2"), "48.6");
    navigationHelper.navigateToSavingsAccountDetailPage(savingsId2);
    Assert.assertEquals(selenium.getTable("recentActivityForDetailPage.1.2"), "35.1");
}
Also used : DefineNewSavingsProductConfirmationPage(org.mifos.test.acceptance.framework.savingsproduct.DefineNewSavingsProductConfirmationPage) SavingsAccountDetailPage(org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage) SavingsProductParameters(org.mifos.test.acceptance.framework.savingsproduct.SavingsProductParameters) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DateTime(org.joda.time.DateTime) EditAccountStatusParameters(org.mifos.test.acceptance.framework.account.EditAccountStatusParameters) DepositWithdrawalSavingsParameters(org.mifos.test.acceptance.framework.savings.DepositWithdrawalSavingsParameters) Test(org.testng.annotations.Test)

Example 5 with SavingsAccountDetailPage

use of org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage in project head by mifos.

the class AdditionalSavingsAccountTest method savingsAdjustmentsForDepositsWithdrawals.

//http://mifosforge.jira.com/browse/MIFOSTEST-144
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void savingsAdjustmentsForDepositsWithdrawals() throws Exception {
    //Given
    DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    DateTime targetTime = new DateTime(2011, 1, 1, 13, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, "acceptance_small_008_dbunit.xml", dataSource, selenium);
    //When
    SavingsProductParameters params = getVoluntaryGroupsMonthCalculactionProductParameters(targetTime);
    params.setApplicableFor(SavingsProductParameters.CLIENTS);
    params.setInterestRate("10");
    String savingsId = createSavingsAccount(params);
    DepositWithdrawalSavingsParameters depositParams = new DepositWithdrawalSavingsParameters();
    depositParams = makeDefaultDepositWithdrawal(targetTime, depositParams, savingsId, DepositWithdrawalSavingsParameters.DEPOSIT, "500");
    targetTime = new DateTime(2011, 2, 1, 13, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    depositParams = makeDefaultDepositWithdrawal(targetTime, depositParams, savingsId, DepositWithdrawalSavingsParameters.WITHDRAWAL, "200");
    targetTime = new DateTime(2011, 3, 1, 13, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    navigationHelper.navigateToAdminPage();
    runBatchJobsForSavingsIntPosting();
    navigationHelper.navigateToSavingsAccountDetailPage(savingsId);
    Assert.assertEquals(selenium.getTable("recentActivityForDetailPage.1.2"), "4.1");
    targetTime = new DateTime(2011, 4, 1, 13, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    navigationHelper.navigateToAdminPage();
    runBatchJobsForSavingsIntPosting();
    navigationHelper.navigateToSavingsAccountDetailPage(savingsId);
    Assert.assertEquals(selenium.getTable("recentActivityForDetailPage.1.2"), "2.6");
    SavingsAccountDetailPage savingsAccountDetailPage = new SavingsAccountDetailPage(selenium);
    SavingsApplyAdjustmentPage savingsApplyAdjustmentPage = new SavingsApplyAdjustmentPage(selenium);
    depositParams = makeDefaultDepositWithdrawal(targetTime, depositParams, savingsId, DepositWithdrawalSavingsParameters.DEPOSIT, "123");
    savingsAccountDetailPage = navigationHelper.navigateToSavingsAccountDetailPage(savingsId);
    savingsApplyAdjustmentPage = savingsAccountDetailPage.navigateToApplyAdjustmentPage();
    savingsApplyAdjustmentPage.applyAdjustment("234", "adjustment");
    targetTime = new DateTime(2011, 5, 1, 13, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    navigationHelper.navigateToAdminPage();
    runBatchJobsForSavingsIntPosting();
    navigationHelper.navigateToSavingsAccountDetailPage(savingsId);
    Assert.assertEquals(selenium.getTable("recentActivityForDetailPage.1.2"), "4.4");
    depositParams = makeDefaultDepositWithdrawal(targetTime, depositParams, savingsId, DepositWithdrawalSavingsParameters.WITHDRAWAL, "45");
    savingsAccountDetailPage = navigationHelper.navigateToSavingsAccountDetailPage(savingsId);
    savingsApplyAdjustmentPage = savingsAccountDetailPage.navigateToApplyAdjustmentPage();
    savingsApplyAdjustmentPage.applyAdjustment("55", "adjustment");
    targetTime = new DateTime(2011, 6, 1, 13, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    navigationHelper.navigateToAdminPage();
    runBatchJobsForSavingsIntPosting();
    navigationHelper.navigateToSavingsAccountDetailPage(savingsId);
    Assert.assertEquals(selenium.getTable("recentActivityForDetailPage.1.2"), "4.2");
    depositParams = makeDefaultDepositWithdrawal(targetTime, depositParams, savingsId, DepositWithdrawalSavingsParameters.DEPOSIT, "555");
    savingsAccountDetailPage = navigationHelper.navigateToSavingsAccountDetailPage(savingsId);
    savingsApplyAdjustmentPage = savingsAccountDetailPage.navigateToApplyAdjustmentPage();
    savingsApplyAdjustmentPage.applyAdjustment("444", "adjustment");
    targetTime = new DateTime(2011, 7, 1, 13, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    navigationHelper.navigateToAdminPage();
    runBatchJobsForSavingsIntPosting();
    navigationHelper.navigateToSavingsAccountDetailPage(savingsId);
    Assert.assertEquals(selenium.getTable("recentActivityForDetailPage.1.2"), "7.6");
    //step 12-15
    params = getVoluntaryGroupsMonthCalculactionProductParameters(targetTime);
    params.setApplicableFor(SavingsProductParameters.CLIENTS);
    String savingsId2 = createSavingsAccount(params);
    depositParams = makeDefaultDepositWithdrawal(targetTime, depositParams, savingsId2, DepositWithdrawalSavingsParameters.DEPOSIT, "555");
    depositParams = makeDefaultDepositWithdrawal(targetTime, depositParams, savingsId2, DepositWithdrawalSavingsParameters.WITHDRAWAL, "222");
    // month with last day is a non-working day
    targetTime = new DateTime(2011, 8, 1, 13, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    navigationHelper.navigateToAdminPage();
    runBatchJobsForSavingsIntPosting();
    navigationHelper.navigateToSavingsAccountDetailPage(savingsId2);
    Assert.assertEquals(selenium.getTable("recentActivityForDetailPage.1.2"), "1.4");
}
Also used : SavingsApplyAdjustmentPage(org.mifos.test.acceptance.framework.savings.SavingsApplyAdjustmentPage) SavingsAccountDetailPage(org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage) SavingsProductParameters(org.mifos.test.acceptance.framework.savingsproduct.SavingsProductParameters) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DateTime(org.joda.time.DateTime) DepositWithdrawalSavingsParameters(org.mifos.test.acceptance.framework.savings.DepositWithdrawalSavingsParameters)

Aggregations

SavingsAccountDetailPage (org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage)36 DepositWithdrawalSavingsParameters (org.mifos.test.acceptance.framework.savings.DepositWithdrawalSavingsParameters)10 Test (org.testng.annotations.Test)10 DateTime (org.joda.time.DateTime)9 CreateSavingsAccountSearchParameters (org.mifos.test.acceptance.framework.savings.CreateSavingsAccountSearchParameters)9 CreateSavingsAccountSubmitParameters (org.mifos.test.acceptance.framework.savings.CreateSavingsAccountSubmitParameters)9 DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)9 EditAccountStatusParameters (org.mifos.test.acceptance.framework.account.EditAccountStatusParameters)8 DefineNewSavingsProductConfirmationPage (org.mifos.test.acceptance.framework.savingsproduct.DefineNewSavingsProductConfirmationPage)5 SavingsProductParameters (org.mifos.test.acceptance.framework.savingsproduct.SavingsProductParameters)5 CreateSavingsAccountConfirmationPage (org.mifos.test.acceptance.framework.savings.CreateSavingsAccountConfirmationPage)4 AdminPage (org.mifos.test.acceptance.framework.admin.AdminPage)3 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)3 CreateSavingsAccountEntryPage (org.mifos.test.acceptance.framework.savings.CreateSavingsAccountEntryPage)3 CreateSavingsAccountSearchPage (org.mifos.test.acceptance.framework.savings.CreateSavingsAccountSearchPage)3 ImportTransactionsConfirmationPage (org.mifos.test.acceptance.framework.admin.ImportTransactionsConfirmationPage)2 ImportTransactionsPage (org.mifos.test.acceptance.framework.admin.ImportTransactionsPage)2 ManageRolePage (org.mifos.test.acceptance.framework.admin.ManageRolePage)2 TransactionHistoryPage (org.mifos.test.acceptance.framework.loan.TransactionHistoryPage)2 ViewRepaymentSchedulePage (org.mifos.test.acceptance.framework.loan.ViewRepaymentSchedulePage)2