Search in sources :

Example 1 with SavingsProductHelper

use of org.mifos.test.acceptance.framework.testhelpers.SavingsProductHelper in project head by mifos.

the class AdditionalSavingsAccountTest method setUp.

@Override
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception {
    super.setUp();
    DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    dateTimeUpdaterRemoteTestingService.resetDateTime();
    savingsProductHelper = new SavingsProductHelper(selenium);
    savingsAccountHelper = new SavingsAccountHelper(selenium);
    navigationHelper = new NavigationHelper(selenium);
}
Also used : SavingsAccountHelper(org.mifos.test.acceptance.framework.testhelpers.SavingsAccountHelper) NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) SavingsProductHelper(org.mifos.test.acceptance.framework.testhelpers.SavingsProductHelper) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 2 with SavingsProductHelper

use of org.mifos.test.acceptance.framework.testhelpers.SavingsProductHelper in project head by mifos.

the class ClientTest method setUp.

@Override
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// one of the dependent methods throws Exception
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception {
    super.setUp();
    navigationHelper = new NavigationHelper(selenium);
    propertiesHelper = new CustomPropertiesHelper(selenium);
    clientTestHelper = new ClientTestHelper(selenium);
    questionGroupTestHelper = new QuestionGroupTestHelper(selenium);
    groupTestHelper = new GroupTestHelper(selenium);
    savingsAccountHelper = new SavingsAccountHelper(selenium);
    savingsProductHelper = new SavingsProductHelper(selenium);
    DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    targetTime = new DateTime(2009, 7, 11, 12, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    TestDataSetup dataSetup = new TestDataSetup(selenium, applicationDatabaseOperation);
    feeTestHelper = new FeeTestHelper(dataSetup, navigationHelper);
    loanTestHelper = new LoanTestHelper(selenium);
}
Also used : QuestionGroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper) TestDataSetup(org.mifos.test.acceptance.util.TestDataSetup) FeeTestHelper(org.mifos.test.acceptance.admin.FeeTestHelper) GroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.GroupTestHelper) QuestionGroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper) SavingsAccountHelper(org.mifos.test.acceptance.framework.testhelpers.SavingsAccountHelper) NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) ClientTestHelper(org.mifos.test.acceptance.framework.testhelpers.ClientTestHelper) CustomPropertiesHelper(org.mifos.test.acceptance.framework.testhelpers.CustomPropertiesHelper) SavingsProductHelper(org.mifos.test.acceptance.framework.testhelpers.SavingsProductHelper) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DateTime(org.joda.time.DateTime) LoanTestHelper(org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 3 with SavingsProductHelper

use of org.mifos.test.acceptance.framework.testhelpers.SavingsProductHelper in project head by mifos.

the class SavingsImportTest method setUp.

@Override
@BeforeMethod
public void setUp() throws Exception {
    super.setUp();
    savingsProductHelper = new SavingsProductHelper(selenium);
    adminTestHelper = new AdminTestHelper(selenium);
    navigationHelper = new NavigationHelper(selenium);
    //changing date so dates in xls spreadsheet will be appropriate
    targetTime = new DateTime(2012, 9, 18, 12, 0, 0, 0);
    DateTimeUpdaterRemoteTestingService dtUpdate = new DateTimeUpdaterRemoteTestingService(selenium);
    dtUpdate.setDateTime(targetTime);
}
Also used : NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) SavingsProductHelper(org.mifos.test.acceptance.framework.testhelpers.SavingsProductHelper) AdminTestHelper(org.mifos.test.acceptance.framework.testhelpers.AdminTestHelper) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DateTime(org.joda.time.DateTime) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 4 with SavingsProductHelper

use of org.mifos.test.acceptance.framework.testhelpers.SavingsProductHelper in project head by mifos.

the class EditLoanProductTest method editExistingLoanAndSavingsProduct.

//http://mifosforge.jira.com/browse/MIFOSTEST-312
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void editExistingLoanAndSavingsProduct() throws Exception {
    DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    DateTime targetTime = new DateTime(2011, 2, 2, 13, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    EditLoanProductPage editLoanProductPage = createNewLoanProductAndNavigateToEditLoanPage();
    editLoanProductPage.verifyPage();
    SubmitFormParameters formParameters = new SubmitFormParameters();
    formParameters = cleanFormParameters(formParameters);
    EditLoanProductPreviewPage editLoanProductPreviewPage = editLoanProductPage.submitRequiredDescriptionAndInterestChanges(formParameters);
    String error = selenium.getText("EditLoanProduct.error.message");
    verifyError(error, "Please specify the Product instance name.", "Please specify the Short name.", "Please select the Product category.", "Please specify the Applicable for.", "Please select the Interest rate type.", "Please select the Status.", "Please specify the Min Interest rate.", "Please specify the Max Interest rate.", "Please select the Status.", "Please specify the Min Interest rate.", "Please specify the Default Interest rate.");
    //TODO js - missing error msg
    //Assert.assertEquals(error.contains("Please specify the Start date."), true);
    formParameters = setFormParameters(formParameters);
    editLoanProductPreviewPage = editLoanProductPage.submitRequiredDescriptionAndInterestChanges(formParameters);
    error = selenium.getText("EditLoanProduct.error.message");
    //TODO js - missing error msg
    //Assert.assertEquals(error.contains("The Start date cannot be changed because either the product is active or the date specified is invalid."), true);
    Assert.assertEquals(error.contains("Please specify a valid Max Interest rate. Max Interest rate should be greater than or equal to Min Interest rate."), true);
    Assert.assertEquals(error.contains("Please specify valid Default Interest rate. Default Interest rate should be between the Min and Max Interest rate, inclusive of the two."), true);
    formParameters = setCorrectFormParameters(formParameters);
    editLoanProductPreviewPage = editLoanProductPage.submitRequiredDescriptionAndInterestChanges(formParameters);
    LoanProductDetailsPage loanProductDetailsPage = editLoanProductPreviewPage.submit();
    loanProductDetailsPage.verifyPage();
    loanProductDetailsPage.editLoanProduct();
    editLoanProductPage.verifyPage();
    editLoanProductPage.verifyModifiedLoanProduct(formParameters);
    ///////////////////////SAVINGS////////////////////
    SavingsProductHelper savingsProductHelper = new SavingsProductHelper(selenium);
    SavingsProductParameters params = savingsProductHelper.getGenericSavingsProductParameters(new DateTime(2011, 2, 2, 12, 0, 0, 0), SavingsProductParameters.VOLUNTARY, SavingsProductParameters.CENTERS);
    DefineNewSavingsProductConfirmationPage confirmationPage = savingsProductHelper.createSavingsProduct(params);
    EditSavingsProductPage editSavingsProductPage = confirmationPage.navigateToSavingsProductDetails().editSavingsProduct();
    DefineNewSavingsProductPage.SubmitSavingsFormParameters formSavingsParameters = new DefineNewSavingsProductPage.SubmitSavingsFormParameters();
    formSavingsParameters = cleanFormSavingsParameters(formSavingsParameters);
    EditSavingsProductPreviewPage editSavingsProductPreviewPage = editSavingsProductPage.submitRequiredDescriptionAndInterestChanges(formSavingsParameters);
    error = selenium.getText("error.messages");
    verifyError(error, "Please specify the Product instance name.", "Please specify the Short name.", "Please select the Product category.", "Please specify the Start date. Day must be in range (1-31).", "Please specify the Start date. Month must be in range (1-12).", "The Start date can be anything between current date and 1 year from the current date.", "Please select the Applicable for.", "Please select the Type of deposits.", "Please specify the Interest rate. Interest must be in range (0-100).", "Please select the Balance used for Interest calculation.", "Please specify the Time period for Interest calculation.", "Please specify the Frequency of Interest posting to accounts.");
    formSavingsParameters = setFormSavingsParameters(formSavingsParameters);
    editSavingsProductPreviewPage = editSavingsProductPage.submitRequiredDescriptionAndInterestChanges(formSavingsParameters);
    SavingsProductDetailsPage savingsProductDetailsPage = editSavingsProductPreviewPage.submit();
    savingsProductDetailsPage.editSavingsProduct();
    editSavingsProductPage.verifyModifiedSavingsProduct(formSavingsParameters);
}
Also used : EditLoanProductPreviewPage(org.mifos.test.acceptance.framework.loanproduct.EditLoanProductPreviewPage) SavingsProductDetailsPage(org.mifos.test.acceptance.framework.savingsproduct.SavingsProductDetailsPage) DateTime(org.joda.time.DateTime) EditLoanProductPage(org.mifos.test.acceptance.framework.loanproduct.EditLoanProductPage) DefineNewSavingsProductConfirmationPage(org.mifos.test.acceptance.framework.savingsproduct.DefineNewSavingsProductConfirmationPage) LoanProductDetailsPage(org.mifos.test.acceptance.framework.loanproduct.LoanProductDetailsPage) SavingsProductHelper(org.mifos.test.acceptance.framework.testhelpers.SavingsProductHelper) EditSavingsProductPage(org.mifos.test.acceptance.framework.savingsproduct.EditSavingsProductPage) SubmitFormParameters(org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage.SubmitFormParameters) SavingsProductParameters(org.mifos.test.acceptance.framework.savingsproduct.SavingsProductParameters) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DefineNewSavingsProductPage(org.mifos.test.acceptance.framework.savingsproduct.DefineNewSavingsProductPage) EditSavingsProductPreviewPage(org.mifos.test.acceptance.framework.savingsproduct.EditSavingsProductPreviewPage)

Example 5 with SavingsProductHelper

use of org.mifos.test.acceptance.framework.testhelpers.SavingsProductHelper in project head by mifos.

the class DefineNewSavingsProductTest method setUp.

@Override
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception {
    super.setUp();
    DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    dateTimeUpdaterRemoteTestingService.resetDateTime();
    savingsProductHelper = new SavingsProductHelper(selenium);
    savingsAccountHelper = new SavingsAccountHelper(selenium);
}
Also used : SavingsAccountHelper(org.mifos.test.acceptance.framework.testhelpers.SavingsAccountHelper) SavingsProductHelper(org.mifos.test.acceptance.framework.testhelpers.SavingsProductHelper) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

SavingsProductHelper (org.mifos.test.acceptance.framework.testhelpers.SavingsProductHelper)5 DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)5 BeforeMethod (org.testng.annotations.BeforeMethod)4 DateTime (org.joda.time.DateTime)3 NavigationHelper (org.mifos.test.acceptance.framework.testhelpers.NavigationHelper)3 SavingsAccountHelper (org.mifos.test.acceptance.framework.testhelpers.SavingsAccountHelper)3 FeeTestHelper (org.mifos.test.acceptance.admin.FeeTestHelper)1 SubmitFormParameters (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage.SubmitFormParameters)1 EditLoanProductPage (org.mifos.test.acceptance.framework.loanproduct.EditLoanProductPage)1 EditLoanProductPreviewPage (org.mifos.test.acceptance.framework.loanproduct.EditLoanProductPreviewPage)1 LoanProductDetailsPage (org.mifos.test.acceptance.framework.loanproduct.LoanProductDetailsPage)1 DefineNewSavingsProductConfirmationPage (org.mifos.test.acceptance.framework.savingsproduct.DefineNewSavingsProductConfirmationPage)1 DefineNewSavingsProductPage (org.mifos.test.acceptance.framework.savingsproduct.DefineNewSavingsProductPage)1 EditSavingsProductPage (org.mifos.test.acceptance.framework.savingsproduct.EditSavingsProductPage)1 EditSavingsProductPreviewPage (org.mifos.test.acceptance.framework.savingsproduct.EditSavingsProductPreviewPage)1 SavingsProductDetailsPage (org.mifos.test.acceptance.framework.savingsproduct.SavingsProductDetailsPage)1 SavingsProductParameters (org.mifos.test.acceptance.framework.savingsproduct.SavingsProductParameters)1 AdminTestHelper (org.mifos.test.acceptance.framework.testhelpers.AdminTestHelper)1 ClientTestHelper (org.mifos.test.acceptance.framework.testhelpers.ClientTestHelper)1 CustomPropertiesHelper (org.mifos.test.acceptance.framework.testhelpers.CustomPropertiesHelper)1