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; |
21 |
|
|
22 |
|
import org.openqa.selenium.WebElement; |
23 |
|
import org.openqa.selenium.support.FindBy; |
24 |
|
import org.xwiki.user.test.po.AbstractUserProfilePage; |
25 |
|
import org.xwiki.watchlist.test.po.editor.WatchlistPreferencesEditPage; |
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
@version |
31 |
|
|
|
|
| 77.8% |
Uncovered Elements: 4 (18) |
Complexity: 7 |
Complexity Density: 0.64 |
|
32 |
|
public class WatchlistUserProfilePage extends AbstractUserProfilePage |
33 |
|
{ |
34 |
|
@FindBy(xpath = "//a[@href='?category=watchlist']") |
35 |
|
private WebElement watchlistCategory; |
36 |
|
|
37 |
|
@FindBy(xpath = "//div[@id='watchlistPane']//div[@class='editProfileCategory']/a") |
38 |
|
private WebElement editPreferences; |
39 |
|
|
40 |
|
@FindBy(xpath = "//div[@class='watchlistManagement']/dl[1]/dd[1]") |
41 |
|
private WebElement notifier; |
42 |
|
|
43 |
|
@FindBy(xpath = "//div[@class='watchlistManagement']/dl[1]/dd[2]") |
44 |
|
private WebElement automaticwatch; |
45 |
|
|
46 |
|
private WatchlistMacro watchlistMacro = new WatchlistMacro(); |
47 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
48 |
6 |
public static WatchlistUserProfilePage gotoPage(String username)... |
49 |
|
{ |
50 |
6 |
getUtil().gotoPage("XWiki", username, "view", "category=watchlist"); |
51 |
6 |
WatchlistUserProfilePage page = new WatchlistUserProfilePage(username); |
52 |
6 |
return page; |
53 |
|
} |
54 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
55 |
7 |
public WatchlistUserProfilePage(String username)... |
56 |
|
{ |
57 |
7 |
super(username); |
58 |
|
} |
59 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
60 |
1 |
public WatchlistUserProfilePage switchToWatchlist()... |
61 |
|
{ |
62 |
1 |
this.watchlistCategory.click(); |
63 |
1 |
return new WatchlistUserProfilePage(getUsername()); |
64 |
|
} |
65 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
66 |
0 |
public String getNotifier()... |
67 |
|
{ |
68 |
0 |
return this.notifier.getText(); |
69 |
|
} |
70 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
71 |
0 |
public String getAutomaticWatch()... |
72 |
|
{ |
73 |
0 |
return this.automaticwatch.getText(); |
74 |
|
} |
75 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
76 |
5 |
public WatchlistPreferencesEditPage editPreferences()... |
77 |
|
{ |
78 |
5 |
this.editPreferences.click(); |
79 |
5 |
return new WatchlistPreferencesEditPage(); |
80 |
|
} |
81 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
82 |
11 |
public WatchlistMacro getWatchlistMacro()... |
83 |
|
{ |
84 |
11 |
return this.watchlistMacro; |
85 |
|
} |
86 |
|
|
87 |
|
} |