1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.panels.test.ui; |
21 |
|
|
22 |
|
import org.junit.Assert; |
23 |
|
import org.junit.Rule; |
24 |
|
import org.junit.Test; |
25 |
|
import org.xwiki.panels.test.po.NewPagePanel; |
26 |
|
import org.xwiki.test.ui.AbstractTest; |
27 |
|
import org.xwiki.test.ui.AuthenticationRule; |
28 |
|
import org.xwiki.test.ui.browser.IgnoreBrowser; |
29 |
|
import org.xwiki.test.ui.browser.IgnoreBrowsers; |
30 |
|
import org.xwiki.test.ui.po.CreatePagePage; |
31 |
|
import org.xwiki.test.ui.po.editor.WYSIWYGEditPage; |
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
@version |
37 |
|
@since |
38 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 1 |
Complexity Density: 0.14 |
|
39 |
|
public class NewPagePanelTest extends AbstractTest |
40 |
|
{ |
41 |
|
@Rule |
42 |
|
public AuthenticationRule authenticationRule = new AuthenticationRule("TestUser", "TestPassword", getUtil()); |
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (7) |
Complexity: 1 |
Complexity Density: 0.14 |
1PASS
|
|
47 |
1 |
@Test... |
48 |
|
@IgnoreBrowsers({ |
49 |
|
@IgnoreBrowser(value = "internet.*", version = "8\\.*", reason="See http://jira.xwiki.org/browse/XE-1146"), |
50 |
|
@IgnoreBrowser(value = "internet.*", version = "9\\.*", reason="See http://jira.xwiki.org/browse/XE-1177") |
51 |
|
}) |
52 |
|
public void testCreatePageFromPanel() |
53 |
|
{ |
54 |
1 |
NewPagePanel newPagePanel = NewPagePanel.gotoPage(); |
55 |
|
|
56 |
1 |
CreatePagePage createPagePage = newPagePanel.createPage(getTestClassName(), getTestMethodName()); |
57 |
1 |
createPagePage.clickCreate(); |
58 |
1 |
WYSIWYGEditPage editPage = new WYSIWYGEditPage(); |
59 |
|
|
60 |
1 |
Assert.assertEquals(getTestMethodName(), editPage.getDocumentTitle()); |
61 |
1 |
Assert.assertEquals("WebHome", editPage.getMetaDataValue("page")); |
62 |
1 |
Assert.assertEquals(getTestClassName() + "." + getTestMethodName(), editPage.getMetaDataValue("space")); |
63 |
|
} |
64 |
|
} |