1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.repository.test.po; |
21 |
|
|
22 |
|
import org.openqa.selenium.WebElement; |
23 |
|
import org.openqa.selenium.support.FindBy; |
24 |
|
import org.xwiki.repository.test.po.editor.ExtensionInlinePage; |
25 |
|
import org.xwiki.test.ui.po.ViewPage; |
26 |
|
|
27 |
|
|
28 |
|
@version |
29 |
|
@since |
30 |
|
|
|
|
| 95.2% |
Uncovered Elements: 1 (21) |
Complexity: 6 |
Complexity Density: 0.43 |
|
31 |
|
public class ExtensionsPage extends ViewPage |
32 |
|
{ |
33 |
|
@FindBy(id = "browseSubmit") |
34 |
|
private WebElement browseSubmit; |
35 |
|
|
36 |
|
@FindBy(id = "searchTextInput") |
37 |
|
private WebElement searchInput; |
38 |
|
|
39 |
|
@FindBy(id = "contributeNameInput") |
40 |
|
private WebElement contributeNameInput; |
41 |
|
|
42 |
|
@FindBy(id = "contributeSubmit") |
43 |
|
private WebElement contributeSubmit; |
44 |
|
|
45 |
|
@FindBy(linkText = "Import") |
46 |
|
private WebElement contributeImportLink; |
47 |
|
|
48 |
|
private ExtensionsLiveTableElement liveTable; |
49 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
50 |
4 |
public static ExtensionsPage gotoPage()... |
51 |
|
{ |
52 |
4 |
getUtil().gotoPage("Extension", "WebHome"); |
53 |
4 |
return new ExtensionsPage(); |
54 |
|
} |
55 |
|
|
|
|
| 83.3% |
Uncovered Elements: 1 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
56 |
5 |
public ExtensionsLiveTableElement getLiveTable()... |
57 |
|
{ |
58 |
5 |
if (this.liveTable == null) { |
59 |
5 |
this.liveTable = new ExtensionsLiveTableElement(); |
60 |
5 |
this.liveTable.waitUntilReady(); |
61 |
|
|
62 |
|
} |
63 |
|
|
64 |
5 |
return this.liveTable; |
65 |
|
} |
66 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
67 |
1 |
public ExtensionInlinePage contributeExtension(String extensionName)... |
68 |
|
{ |
69 |
1 |
this.contributeNameInput.clear(); |
70 |
1 |
this.contributeNameInput.sendKeys(extensionName); |
71 |
1 |
this.contributeSubmit.click(); |
72 |
|
|
73 |
1 |
return new ExtensionInlinePage(); |
74 |
|
} |
75 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
76 |
1 |
public ExtensionImportPage clickImport()... |
77 |
|
{ |
78 |
1 |
this.contributeImportLink.click(); |
79 |
|
|
80 |
1 |
return new ExtensionImportPage(); |
81 |
|
} |
82 |
|
|
83 |
|
|
84 |
|
@since |
85 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
86 |
2 |
public ExtensionsPage clickBrowse()... |
87 |
|
{ |
88 |
2 |
this.browseSubmit.click(); |
89 |
|
|
90 |
2 |
return new ExtensionsPage(); |
91 |
|
} |
92 |
|
} |