Search in sources :

Example 1 with CustomizeTextEditPage

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));
}
Also used : CustomizeTextViewPage(org.mifos.test.acceptance.framework.admin.CustomizeTextViewPage) CustomizeTextEditPage(org.mifos.test.acceptance.framework.admin.CustomizeTextEditPage) Test(org.testng.annotations.Test)

Example 2 with CustomizeTextEditPage

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);
}
Also used : CustomizeTextViewPage(org.mifos.test.acceptance.framework.admin.CustomizeTextViewPage) CustomizeTextEditPage(org.mifos.test.acceptance.framework.admin.CustomizeTextEditPage) Test(org.testng.annotations.Test)

Aggregations

CustomizeTextEditPage (org.mifos.test.acceptance.framework.admin.CustomizeTextEditPage)2 CustomizeTextViewPage (org.mifos.test.acceptance.framework.admin.CustomizeTextViewPage)2 Test (org.testng.annotations.Test)2