Search in sources :

Example 1 with OfficeHelper

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

the class DefineAndViewOfficeTest method setUp.

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

Example 2 with OfficeHelper

use of org.mifos.test.acceptance.framework.testhelpers.OfficeHelper 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 3 with OfficeHelper

use of org.mifos.test.acceptance.framework.testhelpers.OfficeHelper 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)

Example 4 with OfficeHelper

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

the class QuestionGroupTest method setUp.

@Override
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception {
    super.setUp();
    officeHelper = new OfficeHelper(selenium);
    appLauncher = new AppLauncher(selenium);
    loanTestHelper = new LoanTestHelper(selenium);
    questionGroupTestHelper = new QuestionGroupTestHelper(selenium);
    clientTestHelper = new ClientTestHelper(selenium);
    questionGroupInstancesOfClient = new HashMap<Integer, QuestionGroup>();
    qgTitle1 = "QuestionGroup1";
    qgTitle2 = "QuestionGroup2";
    qgTitle3 = "QuestionGroup3";
    qgTitle4 = "QuestionGroup4";
    qTitle1 = "Question1";
    qTitle2 = "Question2";
    qTitle3 = "Question3";
    qTitle4 = "Question4";
    qTitle5 = "Question5";
    QUESTIONS.put("TextQuestionTest", CreateQuestionParameters.TYPE_FREE_TEXT);
    QUESTIONS.put("DateQuestionTest", CreateQuestionParameters.TYPE_DATE);
    QUESTIONS.put("NumberQuestionTest", CreateQuestionParameters.TYPE_NUMBER);
    QUESTIONS.put("MultiSelectQuestionTest", CreateQuestionParameters.TYPE_MULTI_SELECT);
    QUESTIONS.put("SingleSelectQuestionTest", CreateQuestionParameters.TYPE_SINGLE_SELECT);
    QUESTIONS.put("SmartSelectQuestionTest", CreateQuestionParameters.TYPE_SMART_SELECT);
}
Also used : QuestionGroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper) OfficeHelper(org.mifos.test.acceptance.framework.testhelpers.OfficeHelper) ClientTestHelper(org.mifos.test.acceptance.framework.testhelpers.ClientTestHelper) QuestionGroup(org.mifos.test.acceptance.framework.client.QuestionGroup) AppLauncher(org.mifos.test.acceptance.framework.AppLauncher) LoanTestHelper(org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 5 with OfficeHelper

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

the class TestDataSetup method createBranch.

public void createBranch(int officeType, String officeName, String shortName) throws SQLException {
    if (applicationDatabaseOperation.doesBranchOfficeExist(officeName, officeType, shortName)) {
        return;
    }
    OfficeHelper officeHelper = new OfficeHelper(selenium);
    OfficeParameters officeParameters = new OfficeParameters();
    officeParameters.setOfficeType(officeType);
    officeParameters.setOfficeName(officeName);
    officeParameters.setShortName(shortName);
    officeParameters.setParentOffice("Head Office(Mifos HO )");
    officeHelper.createOffice(officeParameters);
}
Also used : OfficeHelper(org.mifos.test.acceptance.framework.testhelpers.OfficeHelper) OfficeParameters(org.mifos.test.acceptance.framework.office.OfficeParameters)

Aggregations

OfficeHelper (org.mifos.test.acceptance.framework.testhelpers.OfficeHelper)5 BeforeMethod (org.testng.annotations.BeforeMethod)3 OfficeParameters (org.mifos.test.acceptance.framework.office.OfficeParameters)2 CenterTestHelper (org.mifos.test.acceptance.framework.testhelpers.CenterTestHelper)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 QuestionGroup (org.mifos.test.acceptance.framework.client.QuestionGroup)1 ClientTestHelper (org.mifos.test.acceptance.framework.testhelpers.ClientTestHelper)1 LoanTestHelper (org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper)1 NavigationHelper (org.mifos.test.acceptance.framework.testhelpers.NavigationHelper)1 QuestionGroupTestHelper (org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper)1 CreateUserParameters (org.mifos.test.acceptance.framework.user.CreateUserParameters)1 LoanProductTestHelper (org.mifos.test.acceptance.loanproduct.LoanProductTestHelper)1