Search in sources :

Example 1 with FundCreatePage

use of org.mifos.test.acceptance.framework.admin.FundCreatePage in project head by mifos.

the class FundTest method createViewAndEditFundTest.

// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public //http://mifosforge.jira.com/browse/MIFOSTEST-703
void createViewAndEditFundTest() throws Exception {
    //When
    AdminPage adminPage = loginAndNavigateToAdminPage();
    adminPage.verifyPage();
    FundCreatePage fundCreatePage = adminPage.navigateToFundCreatePage();
    CreateFundSubmitParameters submitParameters = new CreateFundSubmitParameters();
    submitParameters.setFundCode("01");
    submitParameters.setFundName("aaa");
    CreateNewFundConfirmationPage confirmationPage = fundCreatePage.submitAndNavigateToNewFundConfirmationPage(submitParameters);
    confirmationPage.submitAndNavigateToAdminPage();
    ViewFundsPage fundsPage = adminPage.navigateToViewFundsPage();
    String[] expectedFundNames = new String[] { "Non Donor", "Funding Org A", "Funding Org B", "Funding Org C", "Funding Org D", "aaa" };
    String[] expectedFundCodes = new String[] { "00", "00", "00", "00", "00", "01" };
    //Then
    fundsPage.verifyFundNameAndCode(expectedFundNames, expectedFundCodes);
    //When
    String arabic = "الإدارة";
    String chinese = "贷款";
    EditFundSubmitParameters editSubmitParameters = new EditFundSubmitParameters();
    editSubmitParameters.setFundName("aaa" + arabic + chinese);
    EditFundPage editFundPage = fundsPage.editAndNavigateToEditFundPage();
    EditFundConfirmationPage editFundConfirmationPage = editFundPage.submitAndNavigateToEditFundConfirmationPage(editSubmitParameters);
    adminPage = editFundConfirmationPage.submitAndNavigateToAdminPage();
    fundsPage = adminPage.navigateToViewFundsPage();
    String[] expectedFundNamesSpecial = new String[] { "Non Donor", "Funding Org A", "Funding Org B", "Funding Org C", "Funding Org D", "aaa" + arabic + chinese };
    //Then
    fundsPage.verifyFundNameAndCode(expectedFundNamesSpecial, expectedFundCodes);
}
Also used : AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) CreateFundSubmitParameters(org.mifos.test.acceptance.framework.admin.FundCreatePage.CreateFundSubmitParameters) ViewFundsPage(org.mifos.test.acceptance.framework.admin.ViewFundsPage) EditFundSubmitParameters(org.mifos.test.acceptance.admin.EditFundPage.EditFundSubmitParameters) EditFundConfirmationPage(org.mifos.test.acceptance.framework.admin.EditFundConfirmationPage) FundCreatePage(org.mifos.test.acceptance.framework.admin.FundCreatePage) CreateNewFundConfirmationPage(org.mifos.test.acceptance.framework.admin.CreateNewFundConfirmationPage)

Aggregations

EditFundSubmitParameters (org.mifos.test.acceptance.admin.EditFundPage.EditFundSubmitParameters)1 AdminPage (org.mifos.test.acceptance.framework.admin.AdminPage)1 CreateNewFundConfirmationPage (org.mifos.test.acceptance.framework.admin.CreateNewFundConfirmationPage)1 EditFundConfirmationPage (org.mifos.test.acceptance.framework.admin.EditFundConfirmationPage)1 FundCreatePage (org.mifos.test.acceptance.framework.admin.FundCreatePage)1 CreateFundSubmitParameters (org.mifos.test.acceptance.framework.admin.FundCreatePage.CreateFundSubmitParameters)1 ViewFundsPage (org.mifos.test.acceptance.framework.admin.ViewFundsPage)1