1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.user.test.po; |
21 |
|
|
22 |
|
import org.openqa.selenium.WebElement; |
23 |
|
import org.openqa.selenium.support.FindBy; |
24 |
|
import org.xwiki.test.ui.po.ViewPage; |
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
@version |
30 |
|
@since |
31 |
|
|
|
|
| 70% |
Uncovered Elements: 3 (10) |
Complexity: 4 |
Complexity Density: 0.67 |
|
32 |
|
public class AbstractUserProfilePage extends ViewPage |
33 |
|
{ |
34 |
|
@FindBy(xpath = "//a[@href='?category=profile']") |
35 |
|
private WebElement profileCategory; |
36 |
|
|
37 |
|
@FindBy(xpath = "//a[@href='?category=preferences']") |
38 |
|
private WebElement preferencesCategory; |
39 |
|
|
40 |
|
private final String username; |
41 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
42 |
38 |
public AbstractUserProfilePage(String username)... |
43 |
|
{ |
44 |
38 |
this.username = username; |
45 |
|
} |
46 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
47 |
19 |
public String getUsername()... |
48 |
|
{ |
49 |
19 |
return this.username; |
50 |
|
} |
51 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
52 |
0 |
public ProfileUserProfilePage switchToProfile()... |
53 |
|
{ |
54 |
0 |
this.profileCategory.click(); |
55 |
0 |
return new ProfileUserProfilePage(getUsername()); |
56 |
|
} |
57 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
58 |
15 |
public PreferencesUserProfilePage switchToPreferences()... |
59 |
|
{ |
60 |
15 |
this.preferencesCategory.click(); |
61 |
15 |
return new PreferencesUserProfilePage(getUsername()); |
62 |
|
} |
63 |
|
} |