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);
}
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);
}
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);
}
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);
}
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);
}
Aggregations