1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
package org.xwiki.test.ui.po; |
22 |
|
|
23 |
|
import org.openqa.selenium.WebElement; |
24 |
|
import org.openqa.selenium.support.FindBy; |
25 |
|
|
|
|
| 83.8% |
Uncovered Elements: 6 (37) |
Complexity: 15 |
Complexity Density: 0.88 |
|
26 |
|
public class RenamePage extends ViewPage |
27 |
|
{ |
28 |
|
@FindBy(name = "deep") |
29 |
|
private WebElement preserveChildrenCheckbox; |
30 |
|
|
31 |
|
@FindBy(name = "updateLinks") |
32 |
|
private WebElement updateLinksCheckbox; |
33 |
|
|
34 |
|
@FindBy(name = "autoRedirect") |
35 |
|
private WebElement autoRedirectCheckbox; |
36 |
|
|
37 |
|
@FindBy(css = "form#rename .button[value='Rename']") |
38 |
|
private WebElement renameButton; |
39 |
|
|
40 |
|
@FindBy(name = "terminal") |
41 |
|
private WebElement terminalCheckbox; |
42 |
|
|
43 |
|
@FindBy(className = "location-picker") |
44 |
|
private WebElement documentPickerElement; |
45 |
|
|
46 |
|
private DocumentPicker documentPicker; |
47 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
48 |
1 |
public boolean isPreserveChildren()... |
49 |
|
{ |
50 |
1 |
return this.preserveChildrenCheckbox.isSelected(); |
51 |
|
} |
52 |
|
|
|
|
| 50% |
Uncovered Elements: 2 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
53 |
1 |
public void setPreserveChildren(boolean preserveChildren)... |
54 |
|
{ |
55 |
1 |
if (preserveChildren != isPreserveChildren()) { |
56 |
0 |
this.preserveChildrenCheckbox.click(); |
57 |
|
} |
58 |
|
} |
59 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
60 |
1 |
public boolean isUpdateLinks()... |
61 |
|
{ |
62 |
1 |
return this.updateLinksCheckbox.isSelected(); |
63 |
|
} |
64 |
|
|
|
|
| 50% |
Uncovered Elements: 2 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
65 |
1 |
public void setUpdateLinks(boolean updateLinks)... |
66 |
|
{ |
67 |
1 |
if (updateLinks != isUpdateLinks()) { |
68 |
0 |
this.updateLinksCheckbox.click(); |
69 |
|
} |
70 |
|
} |
71 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
72 |
2 |
public boolean isAutoRedirect()... |
73 |
|
{ |
74 |
2 |
return this.autoRedirectCheckbox.isSelected(); |
75 |
|
} |
76 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
77 |
2 |
public void setAutoRedirect(boolean isAutoRedirect)... |
78 |
|
{ |
79 |
2 |
if (isAutoRedirect != isAutoRedirect()) { |
80 |
1 |
this.autoRedirectCheckbox.click(); |
81 |
|
} |
82 |
|
} |
83 |
|
|
|
|
| 80% |
Uncovered Elements: 1 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
84 |
1 |
public DocumentPicker getDocumentPicker()... |
85 |
|
{ |
86 |
1 |
if (this.documentPicker == null) { |
87 |
1 |
this.documentPicker = new DocumentPicker(this.documentPickerElement); |
88 |
|
} |
89 |
1 |
return this.documentPicker; |
90 |
|
} |
91 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
92 |
2 |
public CopyOrRenameStatusPage clickRenameButton()... |
93 |
|
{ |
94 |
2 |
this.renameButton.click(); |
95 |
2 |
return new CopyOrRenameStatusPage(); |
96 |
|
} |
97 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
98 |
1 |
public boolean isTerminal()... |
99 |
|
{ |
100 |
1 |
return this.terminalCheckbox.isSelected(); |
101 |
|
} |
102 |
|
|
|
|
| 75% |
Uncovered Elements: 1 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
103 |
1 |
public void setTerminal(boolean isTerminal)... |
104 |
|
{ |
105 |
1 |
if (isTerminal != isTerminal()) { |
106 |
1 |
this.terminalCheckbox.click(); |
107 |
|
} |
108 |
|
} |
109 |
|
} |