1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.index.test.po; |
21 |
|
|
22 |
|
import org.openqa.selenium.By; |
23 |
|
import org.openqa.selenium.WebElement; |
24 |
|
import org.openqa.selenium.support.FindBy; |
25 |
|
import org.xwiki.index.tree.test.po.DocumentTreeElement; |
26 |
|
import org.xwiki.test.ui.po.LiveTableElement; |
27 |
|
import org.xwiki.test.ui.po.ViewPage; |
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
@version |
33 |
|
@since |
34 |
|
|
|
|
| 68.8% |
Uncovered Elements: 10 (32) |
Complexity: 9 |
Complexity Density: 0.39 |
|
35 |
|
public class AllDocsPage extends ViewPage |
36 |
|
{ |
37 |
|
@FindBy(xpath = "//li[@id='xwikiindex']/a") |
38 |
|
private WebElement indexTab; |
39 |
|
|
40 |
|
@FindBy(xpath = "//li[@id='xwikitreeview']/a") |
41 |
|
private WebElement treeTab; |
42 |
|
|
43 |
|
@FindBy(xpath = "//li[@id='xwikiattachments']/a") |
44 |
|
private WebElement attachmentsTab; |
45 |
|
|
46 |
|
@FindBy(xpath = "//li[@id='xwikideletedDocs']/a") |
47 |
|
private WebElement deletedDocsTab; |
48 |
|
|
49 |
|
@FindBy(xpath = "//li[@id='xwikideletedAttachments']/a") |
50 |
|
private WebElement deletedAttachmentsTab; |
51 |
|
|
52 |
|
@FindBy(xpath = "//div[contains(@class, 'xwikitabpanescontainer')]/div") |
53 |
|
private WebElement treeElement; |
54 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
55 |
5 |
public static AllDocsPage gotoPage()... |
56 |
|
{ |
57 |
5 |
getUtil().gotoPage("Main", "AllDocs"); |
58 |
5 |
return new AllDocsPage(); |
59 |
|
} |
60 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
61 |
1 |
public static String getURL()... |
62 |
|
{ |
63 |
1 |
return getUtil().getURL("Main", "AllDocs"); |
64 |
|
} |
65 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
66 |
3 |
public LiveTableElement clickIndexTab()... |
67 |
|
{ |
68 |
3 |
this.indexTab.click(); |
69 |
|
|
70 |
3 |
LiveTableElement lt = new LiveTableElement("alldocs"); |
71 |
3 |
lt.waitUntilReady(); |
72 |
|
|
73 |
3 |
return lt; |
74 |
|
} |
75 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
76 |
2 |
public DocumentTreeElement clickTreeTab()... |
77 |
|
{ |
78 |
2 |
this.treeTab.click(); |
79 |
2 |
return new DocumentTreeElement(this.treeElement).waitForIt(); |
80 |
|
} |
81 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
82 |
1 |
public LiveTableElement clickAttachmentsTab()... |
83 |
|
{ |
84 |
1 |
this.attachmentsTab.click(); |
85 |
|
|
86 |
1 |
LiveTableElement lt = new LiveTableElement("allattachments"); |
87 |
1 |
lt.waitUntilReady(); |
88 |
|
|
89 |
1 |
return lt; |
90 |
|
} |
91 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
92 |
2 |
public boolean hasDeletedDocsTab()... |
93 |
|
{ |
94 |
2 |
return getDriver().findElementsWithoutWaiting(By.xpath("//li[@id='xwikideletedDocs']/a")).size() > 0; |
95 |
|
} |
96 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
97 |
2 |
public boolean hasDeletedAttachmentsTab()... |
98 |
|
{ |
99 |
2 |
return getDriver().findElementsWithoutWaiting(By.xpath("//li[@id='xwikideletedAttachments']/a")).size() > 0; |
100 |
|
} |
101 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
102 |
0 |
public LiveTableElement clickDeletedDocsTab()... |
103 |
|
{ |
104 |
0 |
this.deletedDocsTab.click(); |
105 |
|
|
106 |
0 |
LiveTableElement lt = new LiveTableElement("documentsTrash"); |
107 |
0 |
lt.waitUntilReady(); |
108 |
|
|
109 |
0 |
return lt; |
110 |
|
} |
111 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
112 |
0 |
public LiveTableElement clickDeletedAttachmentsTab()... |
113 |
|
{ |
114 |
0 |
this.deletedAttachmentsTab.click(); |
115 |
|
|
116 |
0 |
LiveTableElement lt = new LiveTableElement("attachmentTrash"); |
117 |
0 |
lt.waitUntilReady(); |
118 |
|
|
119 |
0 |
return lt; |
120 |
|
} |
121 |
|
} |