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 java.net.URL; |
23 |
|
|
24 |
|
import org.openqa.selenium.WebElement; |
25 |
|
import org.openqa.selenium.support.FindBy; |
26 |
|
import org.xwiki.test.ui.po.BasePage; |
27 |
|
|
28 |
|
|
|
|
| 71.4% |
Uncovered Elements: 2 (7) |
Complexity: 3 |
Complexity Density: 0.75 |
|
29 |
|
public class ChangeAvatarPage extends BasePage |
30 |
|
{ |
31 |
|
@FindBy(xpath = "//input[@id='attachfile']") |
32 |
|
private WebElement avatarInput; |
33 |
|
|
34 |
|
@FindBy(xpath = "//*[@id='uploadAttachment']//input[@type='submit']") |
35 |
|
private WebElement submitButton; |
36 |
|
|
37 |
|
@FindBy(xpath = "//*[@id='attachment-picker-close']") |
38 |
|
private WebElement cancelButton; |
39 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
40 |
1 |
public void setAvatarImage(String imageName)... |
41 |
|
{ |
42 |
1 |
URL fileUrl = this.getClass().getResource("/" + imageName); |
43 |
1 |
this.avatarInput.sendKeys(fileUrl.getPath()); |
44 |
|
} |
45 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
46 |
1 |
public void submit()... |
47 |
|
{ |
48 |
1 |
this.submitButton.click(); |
49 |
|
} |
50 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
51 |
0 |
public void cancel()... |
52 |
|
{ |
53 |
0 |
this.cancelButton.click(); |
54 |
|
} |
55 |
|
} |