Search in sources :

Example 1 with NewPagePanel

use of org.xwiki.panels.test.po.NewPagePanel in project xwiki-platform by xwiki.

the class NewPagePanelTest method testCreatePageFromPanel.

/**
 * Tests if a new page can be created using the create page panel.
 */
@Test
@IgnoreBrowsers({ @IgnoreBrowser(value = "internet.*", version = "8\\.*", reason = "See https://jira.xwiki.org/browse/XE-1146"), @IgnoreBrowser(value = "internet.*", version = "9\\.*", reason = "See https://jira.xwiki.org/browse/XE-1177") })
public void testCreatePageFromPanel() {
    NewPagePanel newPagePanel = NewPagePanel.gotoPage();
    CreatePagePage createPagePage = newPagePanel.createPage(getTestClassName(), getTestMethodName());
    createPagePage.clickCreate();
    WikiEditPage editPage = new WikiEditPage();
    Assert.assertEquals(getTestMethodName(), editPage.getDocumentTitle());
    Assert.assertEquals("WebHome", editPage.getMetaDataValue("page"));
    Assert.assertEquals(getTestClassName() + "." + getTestMethodName(), editPage.getMetaDataValue("space"));
}
Also used : NewPagePanel(org.xwiki.panels.test.po.NewPagePanel) CreatePagePage(org.xwiki.test.ui.po.CreatePagePage) WikiEditPage(org.xwiki.test.ui.po.editor.WikiEditPage) IgnoreBrowsers(org.xwiki.test.ui.browser.IgnoreBrowsers) AbstractTest(org.xwiki.test.ui.AbstractTest) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 NewPagePanel (org.xwiki.panels.test.po.NewPagePanel)1 AbstractTest (org.xwiki.test.ui.AbstractTest)1 IgnoreBrowsers (org.xwiki.test.ui.browser.IgnoreBrowsers)1 CreatePagePage (org.xwiki.test.ui.po.CreatePagePage)1 WikiEditPage (org.xwiki.test.ui.po.editor.WikiEditPage)1