use of org.mifos.test.acceptance.framework.admin.CreateNewFundConfirmationPage 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);
}
Aggregations