use of org.mifos.test.acceptance.framework.admin.CustomizeTextEditPage in project head by mifos.
the class CustomizeTextTest method addEditRemoveCustomizedText.
@Test
public void addEditRemoveCustomizedText() {
String originalText = "Client";
String customText = "Person";
// try some Chinese
String newCustomText = "有";
CustomizeTextViewPage customizeTextViewPage = adminTestHelper.addCustomizedText(originalText, customText);
// verify that it shows up
customizeTextViewPage.verifyCustomTextIsPresent(originalText, customText);
verifyClientsAndAccountsTabIsUpdated(customText, customizeTextViewPage);
// edit the custom text
CustomizeTextEditPage customizeTextEditPage = customizeTextViewPage.navigateToCustomizeTextEditPage(originalText);
customizeTextEditPage.setCustomText(newCustomText);
customizeTextViewPage = customizeTextEditPage.submit();
// verify that it shows up
customizeTextViewPage.verifyCustomTextIsPresent(originalText, newCustomText);
verifyClientsAndAccountsTabIsUpdated(newCustomText, customizeTextViewPage);
// remove the custom text
customizeTextViewPage.removeCustomizedText(originalText);
// verify that custom text is gone
Assert.assertThat(customizeTextViewPage.getCustomizedTextCount(), is(0));
}
use of org.mifos.test.acceptance.framework.admin.CustomizeTextEditPage in project head by mifos.
the class CustomizeTextTest method verifyDefineCustomizedTextPage.
/*
* http://mifosforge.jira.com/browse/MIFOSTEST-1172
* Verify 'Define customized text' page
*/
@Test
public void verifyDefineCustomizedTextPage() {
String originalText = "Client";
String customText = "Person";
verifyErrors();
CustomizeTextViewPage customizeTextViewPage = adminTestHelper.addCustomizedText(originalText, customText);
customizeTextViewPage.verifyCustomTextIsPresent(originalText, customText);
verifyEditRemove();
customizeTextViewPage = navigationHelper.navigateToAdminPage().navigateToCustomizeTextViewPage().navigateToCustomizeTextAddPage().cancel();
customizeTextViewPage.verifyPage();
CustomizeTextEditPage customizeTextEditPage = customizeTextViewPage.navigateToCustomizeTextEditPage("Client");
customizeTextEditPage.verifyOriginalTextInput();
customizeTextEditPage.setCustomText("");
customizeTextEditPage.trySubmit();
String error = "Please specify Custom Text";
String errorMessage = "No text <" + error + "> present on the page";
customizeTextEditPage.verifyTextPresent(error, errorMessage);
customizeTextViewPage = customizeTextEditPage.cancel();
customizeTextViewPage.verifyPage();
customizeTextViewPage.done().verifyPage();
navigationHelper.navigateToAdminPage().navigateToCustomizeTextViewPage().removeCustomizedText(originalText);
}
Aggregations