1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.xclass.test.po; |
21 |
|
|
22 |
|
import org.openqa.selenium.WebElement; |
23 |
|
import org.openqa.selenium.support.FindBy; |
24 |
|
import org.xwiki.test.ui.po.DocumentPicker; |
25 |
|
import org.xwiki.test.ui.po.LiveTableElement; |
26 |
|
import org.xwiki.test.ui.po.ViewPage; |
27 |
|
import org.xwiki.test.ui.po.editor.WikiEditPage; |
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
@version |
33 |
|
@since |
34 |
|
|
|
|
| 88.9% |
Uncovered Elements: 2 (18) |
Complexity: 5 |
Complexity Density: 0.38 |
|
35 |
|
public class DataTypesPage extends ViewPage |
36 |
|
{ |
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
private DocumentPicker documentPicker = new DocumentPicker(); |
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
@FindBy(xpath = "//*[@class = 'button' and @value = 'Create this Class']") |
46 |
|
private WebElement createClassButton; |
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
private LiveTableElement classesLiveTable = new LiveTableElement("classes"); |
52 |
|
|
53 |
|
|
54 |
|
|
55 |
|
|
56 |
|
@return |
57 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
58 |
1 |
public static DataTypesPage gotoPage()... |
59 |
|
{ |
60 |
1 |
getUtil().gotoPage("XWiki", "XWikiClasses"); |
61 |
1 |
return new DataTypesPage(); |
62 |
|
} |
63 |
|
|
64 |
|
|
65 |
|
|
66 |
|
|
67 |
|
@param |
68 |
|
@param |
69 |
|
@return |
70 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
|
71 |
1 |
public ClassSheetPage createClass(String spaceName, String className)... |
72 |
|
{ |
73 |
1 |
this.documentPicker.setParent(spaceName); |
74 |
1 |
this.documentPicker.setName(className); |
75 |
1 |
this.createClassButton.click(); |
76 |
1 |
new WikiEditPage().clickSaveAndView(); |
77 |
1 |
return new ClassSheetPage(); |
78 |
|
} |
79 |
|
|
80 |
|
|
81 |
|
@return |
82 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
83 |
0 |
public WebElement getCreateClassButton()... |
84 |
|
{ |
85 |
0 |
return createClassButton; |
86 |
|
} |
87 |
|
|
88 |
|
|
89 |
|
@param |
90 |
|
@param |
91 |
|
@return |
92 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
93 |
2 |
public boolean isClassListed(String spaceName, String className)... |
94 |
|
{ |
95 |
2 |
String classReference = spaceName + "." + className; |
96 |
2 |
this.classesLiveTable.filterColumn("xwiki-livetable-classes-filter-2", classReference); |
97 |
2 |
return this.classesLiveTable.getRowCount() > 0; |
98 |
|
} |
99 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
100 |
1 |
@Override... |
101 |
|
public DataTypesPage waitUntilPageIsLoaded() |
102 |
|
{ |
103 |
1 |
this.classesLiveTable.waitUntilReady(); |
104 |
1 |
return this; |
105 |
|
} |
106 |
|
} |