Search in sources :

Example 1 with CenterTestHelper

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

the class CenterMeetingTest method prepareCenterForTest.

private void prepareCenterForTest(MeetingParameters meeting) {
    OfficeHelper officeHelper = new OfficeHelper(selenium);
    String officeName = "Office" + StringUtil.getRandomString(10);
    OfficeParameters officeParameters = new OfficeParameters();
    officeParameters.setOfficeName(officeName);
    officeParameters.setOfficeType(OfficeParameters.BRANCH_OFFICE);
    officeParameters.setShortName(StringUtil.getRandomString(4));
    officeParameters.setParentOffice("Head Office(Mifos HO )");
    officeHelper.createOffice(officeParameters);
    UserHelper userHelper = new UserHelper(selenium);
    CreateUserParameters userParameters = new CreateUserParameters();
    firstName = StringUtil.getRandomString(6);
    lastName = StringUtil.getRandomString(6);
    userParameters.setFirstName(firstName);
    userParameters.setLastName(lastName);
    userParameters.setDateOfBirthDD("11");
    userParameters.setDateOfBirthMM("11");
    userParameters.setDateOfBirthYYYY("1950");
    String userName = StringUtil.getRandomString(6);
    String password = StringUtil.getRandomString(6);
    userParameters.setPassword(password);
    userParameters.setPasswordRepeat(password);
    userParameters.setUserName(userName);
    userParameters.setUserLevel(CreateUserParameters.LOAN_OFFICER);
    userParameters.setGender(CreateUserParameters.MALE);
    userHelper.createUser(userParameters, officeName);
    CenterTestHelper centerHelper = new CenterTestHelper(selenium);
    CreateCenterEnterDataPage.SubmitFormParameters formParameters = new CreateCenterEnterDataPage.SubmitFormParameters();
    centerName = "Center" + StringUtil.getRandomString(8);
    formParameters.setCenterName(centerName);
    formParameters.setLoanOfficer(firstName + " " + lastName);
    formParameters.setMeeting(meeting);
    centerHelper.createCenter(formParameters, officeName);
}
Also used : CreateCenterEnterDataPage(org.mifos.test.acceptance.framework.center.CreateCenterEnterDataPage) OfficeHelper(org.mifos.test.acceptance.framework.testhelpers.OfficeHelper) OfficeParameters(org.mifos.test.acceptance.framework.office.OfficeParameters) UserHelper(org.mifos.test.acceptance.framework.testhelpers.UserHelper) CreateUserParameters(org.mifos.test.acceptance.framework.user.CreateUserParameters) CenterTestHelper(org.mifos.test.acceptance.framework.testhelpers.CenterTestHelper)

Example 2 with CenterTestHelper

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

the class CenterTest method setUp.

@Override
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// one of the dependent methods throws Exception
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception {
    super.setUp();
    centerTestHelper = new CenterTestHelper(selenium);
    questionTestHelper = new QuestionGroupTestHelper(selenium);
    clientTestHelper = new ClientTestHelper(selenium);
    groupTestHelper = new GroupTestHelper(selenium);
    new InitializeApplicationRemoteTestingService().reinitializeApplication(selenium);
}
Also used : QuestionGroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper) GroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.GroupTestHelper) QuestionGroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper) ClientTestHelper(org.mifos.test.acceptance.framework.testhelpers.ClientTestHelper) InitializeApplicationRemoteTestingService(org.mifos.test.acceptance.remote.InitializeApplicationRemoteTestingService) CenterTestHelper(org.mifos.test.acceptance.framework.testhelpers.CenterTestHelper) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 3 with CenterTestHelper

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

the class AdditionalHolidayTest method setUp.

@Override
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// one of the dependent methods throws Exception
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception {
    super.setUp();
    dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    appLauncher = new AppLauncher(selenium);
    holidayTestHelper = new HolidayTestHelper(selenium);
    centerTestHelper = new CenterTestHelper(selenium);
    groupTestHelper = new GroupTestHelper(selenium);
    clientTestHelper = new ClientTestHelper(selenium);
    loanTestHelper = new LoanTestHelper(selenium);
    navigationHelper = new NavigationHelper(selenium);
}
Also used : GroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.GroupTestHelper) ClientTestHelper(org.mifos.test.acceptance.framework.testhelpers.ClientTestHelper) NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) CenterTestHelper(org.mifos.test.acceptance.framework.testhelpers.CenterTestHelper) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) AppLauncher(org.mifos.test.acceptance.framework.AppLauncher) HolidayTestHelper(org.mifos.test.acceptance.framework.testhelpers.HolidayTestHelper) LoanTestHelper(org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 4 with CenterTestHelper

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

the class UpdateCustomPropertiesTest method setUp.

@Override
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// one of the dependent methods throws Exception
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception {
    navigationHelper = new NavigationHelper(selenium);
    propertiesHelper = new CustomPropertiesHelper(selenium);
    savingsAccountHelper = new SavingsAccountHelper(selenium);
    centerTestHelper = new CenterTestHelper(selenium);
    clientTestHelper = new ClientTestHelper(selenium);
    super.setUp();
}
Also used : 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) CenterTestHelper(org.mifos.test.acceptance.framework.testhelpers.CenterTestHelper) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 5 with CenterTestHelper

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

the class CreateMultipleLoanAccountTest method setUp.

@Override
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@BeforeMethod
public void setUp() throws Exception {
    super.setUp();
    officeHelper = new OfficeHelper(selenium);
    userHelper = new UserHelper(selenium);
    centerTestHelper = new CenterTestHelper(selenium);
    navigationHelper = new NavigationHelper(selenium);
    loanProductTestHelper = new LoanProductTestHelper(selenium);
}
Also used : OfficeHelper(org.mifos.test.acceptance.framework.testhelpers.OfficeHelper) NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) UserHelper(org.mifos.test.acceptance.framework.testhelpers.UserHelper) LoanProductTestHelper(org.mifos.test.acceptance.loanproduct.LoanProductTestHelper) CenterTestHelper(org.mifos.test.acceptance.framework.testhelpers.CenterTestHelper) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

CenterTestHelper (org.mifos.test.acceptance.framework.testhelpers.CenterTestHelper)5 BeforeMethod (org.testng.annotations.BeforeMethod)4 ClientTestHelper (org.mifos.test.acceptance.framework.testhelpers.ClientTestHelper)3 NavigationHelper (org.mifos.test.acceptance.framework.testhelpers.NavigationHelper)3 GroupTestHelper (org.mifos.test.acceptance.framework.testhelpers.GroupTestHelper)2 OfficeHelper (org.mifos.test.acceptance.framework.testhelpers.OfficeHelper)2 UserHelper (org.mifos.test.acceptance.framework.testhelpers.UserHelper)2 AppLauncher (org.mifos.test.acceptance.framework.AppLauncher)1 CreateCenterEnterDataPage (org.mifos.test.acceptance.framework.center.CreateCenterEnterDataPage)1 OfficeParameters (org.mifos.test.acceptance.framework.office.OfficeParameters)1 CustomPropertiesHelper (org.mifos.test.acceptance.framework.testhelpers.CustomPropertiesHelper)1 HolidayTestHelper (org.mifos.test.acceptance.framework.testhelpers.HolidayTestHelper)1 LoanTestHelper (org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper)1 QuestionGroupTestHelper (org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper)1 SavingsAccountHelper (org.mifos.test.acceptance.framework.testhelpers.SavingsAccountHelper)1 CreateUserParameters (org.mifos.test.acceptance.framework.user.CreateUserParameters)1 LoanProductTestHelper (org.mifos.test.acceptance.loanproduct.LoanProductTestHelper)1 DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)1 InitializeApplicationRemoteTestingService (org.mifos.test.acceptance.remote.InitializeApplicationRemoteTestingService)1