1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.watchlist.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.test.ui.po.editor.EditPage; |
26 |
|
|
27 |
|
|
|
|
| 44.4% |
Uncovered Elements: 15 (27) |
Complexity: 9 |
Complexity Density: 0.5 |
|
28 |
|
public class WatchlistPreferencesEditPage extends EditPage |
29 |
|
{ |
30 |
|
public static final String AUTOMATICWATCH_DEFAULT = "default"; |
31 |
|
|
32 |
|
public static final String AUTOMATICWATCH_NONE = "NONE"; |
33 |
|
|
34 |
|
public static final String AUTOMATICWATCH_ALL = "ALL"; |
35 |
|
|
36 |
|
public static final String AUTOMATICWATCH_MAJOR = "MAJOR"; |
37 |
|
|
38 |
|
public static final String AUTOMATICWATCH_NEW = "NEW"; |
39 |
|
|
40 |
|
public static final String NOTIFIER_REALTIME = "realtime"; |
41 |
|
|
42 |
|
public static final String NOTIFIER_HOURLY = "Scheduler.WatchListHourlyNotifier"; |
43 |
|
|
44 |
|
public static final String NOTIFIER_DAILY = "Scheduler.WatchListDailyNotifier"; |
45 |
|
|
46 |
|
public static final String NOTIFIER_WEEKLY = "Scheduler.WatchListWeeklyNotifier"; |
47 |
|
|
48 |
|
@FindBy(name = "XWiki.WatchListClass_0_interval") |
49 |
|
private WebElement notifier; |
50 |
|
|
51 |
|
@FindBy(id = "XWiki.WatchListClass_0_automaticwatch") |
52 |
|
private WebElement automaticwatch; |
53 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
54 |
1 |
public void setAutomaticWatchDefault()... |
55 |
|
{ |
56 |
1 |
Select select = new Select(this.automaticwatch); |
57 |
1 |
select.selectByValue(AUTOMATICWATCH_DEFAULT); |
58 |
|
} |
59 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
60 |
2 |
public void setAutomaticWatchNone()... |
61 |
|
{ |
62 |
2 |
Select select = new Select(this.automaticwatch); |
63 |
2 |
select.selectByValue(AUTOMATICWATCH_NONE); |
64 |
|
} |
65 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
66 |
0 |
public void setAutomaticWatchAll()... |
67 |
|
{ |
68 |
0 |
Select select = new Select(this.automaticwatch); |
69 |
0 |
select.selectByValue(AUTOMATICWATCH_ALL); |
70 |
|
} |
71 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
72 |
0 |
public void setAutomaticWatchMajor()... |
73 |
|
{ |
74 |
0 |
Select select = new Select(this.automaticwatch); |
75 |
0 |
select.selectByValue(AUTOMATICWATCH_MAJOR); |
76 |
|
} |
77 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
78 |
0 |
public void setAutomaticWatchNew()... |
79 |
|
{ |
80 |
0 |
Select select = new Select(this.automaticwatch); |
81 |
0 |
select.selectByValue(AUTOMATICWATCH_NEW); |
82 |
|
} |
83 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
84 |
1 |
public void setNotifierRealtime()... |
85 |
|
{ |
86 |
1 |
Select select = new Select(this.notifier); |
87 |
1 |
select.selectByValue(NOTIFIER_REALTIME); |
88 |
|
} |
89 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
90 |
0 |
public void setNotifierHourly()... |
91 |
|
{ |
92 |
0 |
Select select = new Select(this.notifier); |
93 |
0 |
select.selectByValue(NOTIFIER_HOURLY); |
94 |
|
} |
95 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
96 |
1 |
public void setNotifierDaily()... |
97 |
|
{ |
98 |
1 |
Select select = new Select(this.notifier); |
99 |
1 |
select.selectByValue(NOTIFIER_DAILY); |
100 |
|
} |
101 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
102 |
0 |
public void setNotifierWeekly()... |
103 |
|
{ |
104 |
0 |
Select select = new Select(this.notifier); |
105 |
0 |
select.selectByValue(NOTIFIER_WEEKLY); |
106 |
|
} |
107 |
|
} |