1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.extension.test.po; |
21 |
|
|
22 |
|
import org.openqa.selenium.WebElement; |
23 |
|
import org.openqa.selenium.support.FindBy; |
24 |
|
import org.xwiki.extension.ExtensionId; |
25 |
|
import org.xwiki.test.ui.po.BaseElement; |
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
@version |
31 |
|
@since |
32 |
|
|
|
|
| 88.2% |
Uncovered Elements: 2 (17) |
Complexity: 6 |
Complexity Density: 0.55 |
|
33 |
|
public class AdvancedSearchPane extends BaseElement |
34 |
|
{ |
35 |
|
|
36 |
|
|
37 |
|
|
38 |
|
@FindBy(id = "advancedExtensionSearch-id") |
39 |
|
private WebElement idInput; |
40 |
|
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
@FindBy(id = "advancedExtensionSearch-version") |
45 |
|
private WebElement versionInput; |
46 |
|
|
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
@FindBy(xpath = "//*[@id = 'extension-search-advanced']//input[@type = 'submit']") |
51 |
|
private WebElement searchButton; |
52 |
|
|
53 |
|
|
54 |
|
|
55 |
|
|
56 |
|
@FindBy(xpath = "//*[@id = 'extension-search-advanced']//a[@href = '#extension-search-simple']") |
57 |
|
private WebElement cancelButton; |
58 |
|
|
59 |
|
|
60 |
|
@return |
61 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
62 |
1 |
public WebElement getIdInput()... |
63 |
|
{ |
64 |
1 |
return idInput; |
65 |
|
} |
66 |
|
|
67 |
|
|
68 |
|
@return |
69 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
70 |
2 |
public WebElement getVersionInput()... |
71 |
|
{ |
72 |
2 |
return versionInput; |
73 |
|
} |
74 |
|
|
75 |
|
|
76 |
|
@return |
77 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
78 |
0 |
public WebElement getSearchButton()... |
79 |
|
{ |
80 |
0 |
return searchButton; |
81 |
|
} |
82 |
|
|
83 |
|
|
84 |
|
@return |
85 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
86 |
1 |
public WebElement getCancelButton()... |
87 |
|
{ |
88 |
1 |
return cancelButton; |
89 |
|
} |
90 |
|
|
91 |
|
|
92 |
|
|
93 |
|
|
94 |
|
@param |
95 |
|
@param |
96 |
|
@return |
97 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
|
98 |
12 |
public SearchResultsPane search(CharSequence extensionId, CharSequence extensionVersion)... |
99 |
|
{ |
100 |
12 |
idInput.clear(); |
101 |
12 |
idInput.sendKeys(extensionId); |
102 |
12 |
versionInput.clear(); |
103 |
12 |
versionInput.sendKeys(extensionVersion); |
104 |
12 |
searchButton.click(); |
105 |
12 |
return new SearchResultsPane(); |
106 |
|
} |
107 |
|
|
108 |
|
|
109 |
|
|
110 |
|
|
111 |
|
@param |
112 |
|
@return |
113 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
114 |
7 |
public SearchResultsPane search(ExtensionId extensionId)... |
115 |
|
{ |
116 |
7 |
return search(extensionId.getId(), extensionId.getVersion().getValue()); |
117 |
|
} |
118 |
|
} |