Search in sources :

Example 21 with SavingsProductParameters

use of org.mifos.test.acceptance.framework.savingsproduct.SavingsProductParameters in project head by mifos.

the class DefineNewSavingsProductTest method createMandatorySavingsProductForCenters.

// http://mifosforge.jira.com/browse/MIFOSTEST-1095
public void createMandatorySavingsProductForCenters() throws Exception {
    SavingsProductParameters params = savingsProductHelper.getGenericSavingsProductParameters(new DateTime(), SavingsProductParameters.MANDATORY, SavingsProductParameters.CENTERS);
    params.setShortName("1095");
    DefineNewSavingsProductConfirmationPage confirmationPage = savingsProductHelper.createSavingsProduct(params);
    confirmationPage.navigateToSavingsProductDetails();
    createSavingAccountWithCreatedProduct("DefineNewSavingsProductTestCenter", params.getProductInstanceName(), "7777.8");
}
Also used : DefineNewSavingsProductConfirmationPage(org.mifos.test.acceptance.framework.savingsproduct.DefineNewSavingsProductConfirmationPage) SavingsProductParameters(org.mifos.test.acceptance.framework.savingsproduct.SavingsProductParameters) DateTime(org.joda.time.DateTime)

Example 22 with SavingsProductParameters

use of org.mifos.test.acceptance.framework.savingsproduct.SavingsProductParameters in project head by mifos.

the class DefineNewSavingsProductTest method createSavingsProductWithoutInterestRateDetails.

public void createSavingsProductWithoutInterestRateDetails() throws Exception {
    SavingsProductParameters params = savingsProductHelper.getGenericSavingsProductParameters(new DateTime(), SavingsProductParameters.VOLUNTARY, SavingsProductParameters.CENTERS);
    params.setShortName(StringUtil.getRandomString(3));
    DefineNewSavingsProductPreviewPage savingsProductPreviewPage = savingsProductHelper.getDefineSavingsProductPreviewPageWithoutInterestRateDetails(params);
    savingsProductPreviewPage.verifyAllElementsAreNotPresent("id=interestRateDetails");
    savingsProductPreviewPage.submitAndNavigateToDefineNewSavingsProductConfirmationPage().navigateToSavingsProductDetails().verifyAllElementsAreNotPresent("id=interestRateDetails");
}
Also used : DefineNewSavingsProductPreviewPage(org.mifos.test.acceptance.framework.savingsproduct.DefineNewSavingsProductPreviewPage) SavingsProductParameters(org.mifos.test.acceptance.framework.savingsproduct.SavingsProductParameters) DateTime(org.joda.time.DateTime)

Example 23 with SavingsProductParameters

use of org.mifos.test.acceptance.framework.savingsproduct.SavingsProductParameters in project head by mifos.

the class DefineNewSavingsProductTest method createMandatorySavingsProductForClients.

// http://mifosforge.jira.com/browse/MIFOSTEST-138
public void createMandatorySavingsProductForClients() throws Exception {
    SavingsProductParameters params = savingsProductHelper.getGenericSavingsProductParameters(new DateTime(), SavingsProductParameters.MANDATORY, SavingsProductParameters.CLIENTS);
    params.setShortName("M138");
    DefineNewSavingsProductConfirmationPage confirmationPage = savingsProductHelper.createSavingsProduct(params);
    confirmationPage.navigateToSavingsProductDetails();
    createSavingAccountWithCreatedProduct("DefineNewSavingsProduct TestClient", params.getProductInstanceName(), "248");
}
Also used : DefineNewSavingsProductConfirmationPage(org.mifos.test.acceptance.framework.savingsproduct.DefineNewSavingsProductConfirmationPage) SavingsProductParameters(org.mifos.test.acceptance.framework.savingsproduct.SavingsProductParameters) DateTime(org.joda.time.DateTime)

Example 24 with SavingsProductParameters

use of org.mifos.test.acceptance.framework.savingsproduct.SavingsProductParameters in project head by mifos.

the class DefineNewSavingsProductTest method createMandatorySavingsProductForGroups.

// http://mifosforge.jira.com/browse/MIFOSTEST-1094
public void createMandatorySavingsProductForGroups() throws Exception {
    SavingsProductParameters params = savingsProductHelper.getGenericSavingsProductParameters(new DateTime(), SavingsProductParameters.MANDATORY, SavingsProductParameters.GROUPS);
    params.setShortName("1094");
    DefineNewSavingsProductConfirmationPage confirmationPage = savingsProductHelper.createSavingsProduct(params);
    confirmationPage.navigateToSavingsProductDetails();
    createSavingAccountWithCreatedProduct("DefineNewSavingsProductTestGroup", params.getProductInstanceName(), "534");
}
Also used : DefineNewSavingsProductConfirmationPage(org.mifos.test.acceptance.framework.savingsproduct.DefineNewSavingsProductConfirmationPage) SavingsProductParameters(org.mifos.test.acceptance.framework.savingsproduct.SavingsProductParameters) DateTime(org.joda.time.DateTime)

Example 25 with SavingsProductParameters

use of org.mifos.test.acceptance.framework.savingsproduct.SavingsProductParameters in project head by mifos.

the class ClientTest method addClientWithSavingToGroupWithSavingsCheckGroupCalculation.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
//blocked by http://mifosforge.jira.com/browse/MIFOS-4272 - ldomzalski
@Test(enabled = false)
public void addClientWithSavingToGroupWithSavingsCheckGroupCalculation() throws Exception {
    String groupName = "group1";
    CreateSavingsAccountSearchParameters searchParameters = new CreateSavingsAccountSearchParameters();
    CreateSavingsAccountSubmitParameters submitAccountParameters = new CreateSavingsAccountSubmitParameters();
    submitAccountParameters.setAmount("240.0");
    EditAccountStatusParameters editAccountStatusParameters = new EditAccountStatusParameters();
    editAccountStatusParameters.setAccountStatus(AccountStatus.SAVINGS_ACTIVE);
    editAccountStatusParameters.setNote("change status to active");
    // When
    ClientViewDetailsPage clientDetailsPage = clientTestHelper.createClientAndVerify("loan officer", "MyOfficeDHMFT");
    clientTestHelper.changeCustomerStatus(clientDetailsPage, ClientStatus.ACTIVE);
    String clientName = clientDetailsPage.getHeading();
    searchParameters.setSavingsProduct("MonthlyClientSavingsAccount");
    searchParameters.setSearchString(clientName);
    String savingsId = savingsAccountHelper.createSavingsAccount(searchParameters, submitAccountParameters).getAccountId();
    savingsAccountHelper.changeStatus(savingsId, editAccountStatusParameters);
    SavingsProductParameters savingsProductParameters = savingsProductHelper.getGenericSavingsProductParameters(new DateTime(2009, 7, 13, 12, 0, 0, 0), SavingsProductParameters.MANDATORY, SavingsProductParameters.GROUPS);
    savingsProductParameters.setShortName("M-45");
    savingsProductParameters.setAmountAppliesTo(SavingsProductParameters.PER_INDIVIDUAL);
    savingsProductHelper.createSavingsProduct(savingsProductParameters);
    searchParameters.setSavingsProduct(savingsProductParameters.getProductInstanceName());
    searchParameters.setSearchString(groupName);
    savingsId = savingsAccountHelper.createSavingsAccount(searchParameters, submitAccountParameters).getAccountId();
    savingsAccountHelper.changeStatus(savingsId, editAccountStatusParameters);
    clientTestHelper.addClientToGroup(clientName, groupName);
    // Then
    Integer numberOfGroupMembers = Integer.parseInt(navigationHelper.navigateToGroupViewDetailsPage(groupName).getNumberOfClientsInGroup());
    savingsAccountHelper.verifyTotalAmountDue(savingsId, numberOfGroupMembers, Float.parseFloat(submitAccountParameters.getAmount()));
}
Also used : CreateSavingsAccountSearchParameters(org.mifos.test.acceptance.framework.savings.CreateSavingsAccountSearchParameters) ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage) SavingsProductParameters(org.mifos.test.acceptance.framework.savingsproduct.SavingsProductParameters) DateTime(org.joda.time.DateTime) CreateSavingsAccountSubmitParameters(org.mifos.test.acceptance.framework.savings.CreateSavingsAccountSubmitParameters) EditAccountStatusParameters(org.mifos.test.acceptance.framework.account.EditAccountStatusParameters) Test(org.testng.annotations.Test)

Aggregations

SavingsProductParameters (org.mifos.test.acceptance.framework.savingsproduct.SavingsProductParameters)27 DateTime (org.joda.time.DateTime)20 DefineNewSavingsProductConfirmationPage (org.mifos.test.acceptance.framework.savingsproduct.DefineNewSavingsProductConfirmationPage)12 DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)8 EditAccountStatusParameters (org.mifos.test.acceptance.framework.account.EditAccountStatusParameters)7 Test (org.testng.annotations.Test)7 DepositWithdrawalSavingsParameters (org.mifos.test.acceptance.framework.savings.DepositWithdrawalSavingsParameters)6 SavingsAccountDetailPage (org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage)5 CreateSavingsAccountSearchParameters (org.mifos.test.acceptance.framework.savings.CreateSavingsAccountSearchParameters)3 CreateSavingsAccountSubmitParameters (org.mifos.test.acceptance.framework.savings.CreateSavingsAccountSubmitParameters)3 DefineNewSavingsProductPage (org.mifos.test.acceptance.framework.savingsproduct.DefineNewSavingsProductPage)2 EditSavingsProductPage (org.mifos.test.acceptance.framework.savingsproduct.EditSavingsProductPage)2 EditSavingsProductPreviewPage (org.mifos.test.acceptance.framework.savingsproduct.EditSavingsProductPreviewPage)2 SavingsProductDetailsPage (org.mifos.test.acceptance.framework.savingsproduct.SavingsProductDetailsPage)2 AdminPage (org.mifos.test.acceptance.framework.admin.AdminPage)1 ImportSavingsReviewPage (org.mifos.test.acceptance.framework.admin.ImportSavingsReviewPage)1 ImportSavingsSaveSummaryPage (org.mifos.test.acceptance.framework.admin.ImportSavingsSaveSummaryPage)1 ManageRolePage (org.mifos.test.acceptance.framework.admin.ManageRolePage)1 ClientViewDetailsPage (org.mifos.test.acceptance.framework.client.ClientViewDetailsPage)1 CreateLoanAccountSearchParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters)1