/** Tests that entry name is URL encoded. */
  @Test
  @IgnoreBrowsers({
    @IgnoreBrowser(
        value = "internet.*",
        version = "8\\.*",
        reason = "See http://jira.xwiki.org/browse/XE-1146"),
    @IgnoreBrowser(
        value = "internet.*",
        version = "9\\.*",
        reason = "See http://jira.xwiki.org/browse/XE-1177")
  })
  public void testEntryNameWithURLSpecialCharacters() {
    EntryNamePane entryNamePane = homePage.clickAddNewEntry();
    String entryName = "A?b=c&d#" + RandomStringUtils.randomAlphanumeric(3);
    entryNamePane.setName(entryName);
    EntryEditPage entryEditPage = entryNamePane.clickAdd();
    entryEditPage.setValue("description", "This is a test panel.");
    entryEditPage.clickSaveAndView();

    getUtil().gotoPage(getTestClassName(), getTestMethodName());
    homePage = new ApplicationHomePage();
    LiveTableElement entriesLiveTable = homePage.getEntriesLiveTable();
    entriesLiveTable.waitUntilReady();
    Assert.assertTrue(entriesLiveTable.hasRow("Page name", entryName));
  }
  /**
   * Creates an application and edits it using the Actions column from the applications live table.
   */
  @Test
  @IgnoreBrowsers({
    @IgnoreBrowser(
        value = "internet.*",
        version = "8\\.*",
        reason = "See http://jira.xwiki.org/browse/XE-1146"),
    @IgnoreBrowser(
        value = "internet.*",
        version = "9\\.*",
        reason = "See http://jira.xwiki.org/browse/XE-1177")
  })
  public void testEditApplication() {
    // Create the application.
    String appName = RandomStringUtils.randomAlphabetic(6);
    createApplication(appName);

    // Edit the application.
    ApplicationsLiveTableElement appsLiveTable = homePage.getAppsLiveTable();
    appsLiveTable.waitUntilReady();
    ApplicationClassEditPage classEditor = appsLiveTable.clickEditApplication(appName);

    // Edit the existing class field.
    ClassFieldEditPane fieldEditPane = new ClassFieldEditPane("shortText1");
    fieldEditPane.setPrettyName("City Name");
    fieldEditPane.openConfigPanel();
    fieldEditPane.setName("cityName");

    // Move to the next step.
    ApplicationHomeEditPage homeEditPage = classEditor.clickNextStep();
    homeEditPage.setDescription("demo");

    // Finish editing.
    ApplicationHomePage homePage = homeEditPage.clickFinish();
    Assert.assertTrue(homePage.getContent().contains("demo"));
  }