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.editor; |
21 |
|
|
22 |
|
import org.openqa.selenium.WebElement; |
23 |
|
import org.openqa.selenium.support.FindBy; |
24 |
|
import org.openqa.selenium.support.ui.Select; |
25 |
|
import org.xwiki.repository.test.po.ExtensionPage; |
26 |
|
import org.xwiki.test.ui.po.InlinePage; |
27 |
|
|
28 |
|
|
29 |
|
@version |
30 |
|
@since |
31 |
|
|
|
|
| 61.1% |
Uncovered Elements: 14 (36) |
Complexity: 13 |
Complexity Density: 0.59 |
|
32 |
|
public class ExtensionInlinePage extends InlinePage |
33 |
|
{ |
34 |
|
@FindBy(id = "ExtensionCode.ExtensionClass_0_name") |
35 |
|
private WebElement nameInput; |
36 |
|
|
37 |
|
@FindBy(id = "ExtensionCode.ExtensionClass_0_type") |
38 |
|
private WebElement typeInput; |
39 |
|
|
40 |
|
@FindBy(id = "ExtensionCode.ExtensionClass_0_summary") |
41 |
|
private WebElement summaryInput; |
42 |
|
|
43 |
|
@FindBy(id = "ExtensionCode.ExtensionClass_0_authors") |
44 |
|
private WebElement authorsInput; |
45 |
|
|
46 |
|
@FindBy(id = "ExtensionCode.ExtensionClass_0_licenseName") |
47 |
|
private WebElement licenseNameList; |
48 |
|
|
49 |
|
@FindBy(id = "ExtensionCode.ExtensionClass_0_source") |
50 |
|
private WebElement sourceInput; |
51 |
|
|
52 |
|
@FindBy(id = "ExtensionCode.ExtensionClass_0_icon") |
53 |
|
private WebElement iconInput; |
54 |
|
|
55 |
|
@FindBy(id = "ExtensionCode.ExtensionClass_0_description") |
56 |
|
private WebElement descriptionInput; |
57 |
|
|
58 |
|
@FindBy(id = "ExtensionCode.ExtensionClass_0_customInstallationOnly") |
59 |
|
private WebElement customInstallationOnlyCheckBox; |
60 |
|
|
61 |
|
@FindBy(id = "ExtensionCode.ExtensionClass_0_installation") |
62 |
|
private WebElement installationInput; |
63 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
64 |
0 |
public void setName(String name)... |
65 |
|
{ |
66 |
0 |
this.nameInput.clear(); |
67 |
0 |
this.nameInput.sendKeys(name); |
68 |
|
} |
69 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
70 |
1 |
public String getName()... |
71 |
|
{ |
72 |
1 |
return this.nameInput.getAttribute("value"); |
73 |
|
} |
74 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
75 |
1 |
public void setType(String type)... |
76 |
|
{ |
77 |
1 |
Select select = new Select(this.typeInput); |
78 |
1 |
select.selectByValue(type); |
79 |
|
} |
80 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
81 |
1 |
public void setSummary(String summary)... |
82 |
|
{ |
83 |
1 |
this.summaryInput.clear(); |
84 |
1 |
this.summaryInput.sendKeys(summary); |
85 |
|
} |
86 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
87 |
0 |
public void setAuthors(String author)... |
88 |
|
{ |
89 |
0 |
this.authorsInput.clear(); |
90 |
0 |
this.authorsInput.sendKeys(author); |
91 |
|
} |
92 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
93 |
1 |
public void setLicenseName(String licenseName)... |
94 |
|
{ |
95 |
1 |
Select select = new Select(this.licenseNameList); |
96 |
1 |
select.selectByValue(licenseName); |
97 |
|
} |
98 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
99 |
1 |
public void setSource(String source)... |
100 |
|
{ |
101 |
1 |
this.sourceInput.clear(); |
102 |
1 |
this.sourceInput.sendKeys(source); |
103 |
|
} |
104 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
105 |
0 |
public void setIcon(String icon)... |
106 |
|
{ |
107 |
0 |
this.iconInput.clear(); |
108 |
0 |
this.iconInput.sendKeys(icon); |
109 |
|
} |
110 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
111 |
1 |
public void setDescription(String description)... |
112 |
|
{ |
113 |
1 |
this.descriptionInput.clear(); |
114 |
1 |
this.descriptionInput.sendKeys(description); |
115 |
|
} |
116 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
117 |
0 |
public void setCustomInstallationOnly(boolean customInstallationOnly)... |
118 |
|
{ |
119 |
0 |
Select select = new Select(this.customInstallationOnlyCheckBox); |
120 |
0 |
select.selectByValue(customInstallationOnly ? "1" : "0"); |
121 |
|
} |
122 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
123 |
1 |
public void setInstallation(String installation)... |
124 |
|
{ |
125 |
1 |
this.installationInput.clear(); |
126 |
1 |
this.installationInput.sendKeys(installation); |
127 |
|
} |
128 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
129 |
1 |
@Override... |
130 |
|
protected ExtensionPage createViewPage() |
131 |
|
{ |
132 |
1 |
return new ExtensionPage(); |
133 |
|
} |
134 |
|
} |