1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.test.ui.administration; |
21 |
|
|
22 |
|
import org.junit.Assert; |
23 |
|
|
24 |
|
import org.apache.commons.lang3.RandomStringUtils; |
25 |
|
import org.junit.Before; |
26 |
|
import org.junit.Rule; |
27 |
|
import org.junit.Test; |
28 |
|
import org.xwiki.administration.test.po.AdministrationPage; |
29 |
|
import org.xwiki.administration.test.po.WYSIWYGEditorAdministrationSectionPage; |
30 |
|
import org.xwiki.test.ui.AbstractTest; |
31 |
|
import org.xwiki.test.ui.AdminAuthenticationRule; |
32 |
|
import org.xwiki.test.ui.browser.IgnoreBrowser; |
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
|
37 |
|
@version |
38 |
|
@since |
39 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 2 |
Complexity Density: 0.25 |
|
40 |
|
public class WYSIWYGEditorConfigTest extends AbstractTest |
41 |
|
{ |
42 |
|
@Rule |
43 |
|
public AdminAuthenticationRule adminAuthenticationRule = new AdminAuthenticationRule(getUtil()); |
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
|
48 |
|
private WYSIWYGEditorAdministrationSectionPage wysiwygSection; |
49 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
50 |
1 |
@Before... |
51 |
|
public void setUp() throws Exception |
52 |
|
{ |
53 |
1 |
wysiwygSection = AdministrationPage.gotoPage().clickWYSIWYGEditorSection(); |
54 |
|
} |
55 |
|
|
56 |
|
|
57 |
|
|
58 |
|
|
59 |
|
@since |
60 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (7) |
Complexity: 1 |
Complexity Density: 0.14 |
1PASS
|
|
61 |
1 |
@Test... |
62 |
|
@IgnoreBrowser(value = "internet.*", version = "8\\.*", reason="See http://jira.xwiki.org/browse/XE-1146") |
63 |
|
public void testEnablePlugin() |
64 |
|
{ |
65 |
1 |
String pluginName = RandomStringUtils.randomAlphabetic(5); |
66 |
1 |
Assert.assertFalse(wysiwygSection.getEnabledPlugins().contains(pluginName)); |
67 |
1 |
wysiwygSection.enablePlugin(pluginName); |
68 |
1 |
wysiwygSection.clickSave(); |
69 |
|
|
70 |
1 |
getDriver().navigate().refresh(); |
71 |
1 |
wysiwygSection = new WYSIWYGEditorAdministrationSectionPage(); |
72 |
1 |
Assert.assertTrue(wysiwygSection.getEnabledPlugins().contains(pluginName)); |
73 |
|
} |
74 |
|
} |