1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.annotation.test.po; |
21 |
|
|
22 |
|
import org.openqa.selenium.By; |
23 |
|
import org.openqa.selenium.WebElement; |
24 |
|
import org.openqa.selenium.support.FindBy; |
25 |
|
import org.xwiki.test.ui.po.BaseElement; |
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
@version |
31 |
|
@since |
32 |
|
|
|
|
| 83.3% |
Uncovered Elements: 2 (12) |
Complexity: 5 |
Complexity Density: 0.71 |
|
33 |
|
public class AnnotationsWindow extends BaseElement |
34 |
|
{ |
35 |
|
@FindBy(xpath = "//div[contains(@class, 'annotation-box')]//input[@type='submit']") |
36 |
|
private WebElement submitButton; |
37 |
|
|
38 |
|
@FindBy(xpath = "//div[contains(@class, 'annotation-box')]//input[@type='reset']") |
39 |
|
private WebElement cancelButton; |
40 |
|
|
41 |
|
@FindBy(xpath = "//textarea[@id='comment']") |
42 |
|
private WebElement inputText; |
43 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
44 |
2 |
public AnnotationsWindow()... |
45 |
|
{ |
46 |
2 |
super(); |
47 |
|
} |
48 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
49 |
4 |
public void enterAnnotationText(String annotationText)... |
50 |
|
{ |
51 |
4 |
getDriver().waitUntilElementIsVisible(By.className("annotation-box-create")); |
52 |
4 |
this.inputText.sendKeys(annotationText); |
53 |
|
} |
54 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
55 |
4 |
public void clickSaveAnnotation()... |
56 |
|
{ |
57 |
4 |
this.submitButton.click(); |
58 |
|
} |
59 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
60 |
0 |
public void clickCancelAnnotation()... |
61 |
|
{ |
62 |
0 |
this.cancelButton.click(); |
63 |
|
} |
64 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
65 |
4 |
public void addAnnotation(String annotationText)... |
66 |
|
{ |
67 |
4 |
enterAnnotationText(annotationText); |
68 |
4 |
clickSaveAnnotation(); |
69 |
|
} |
70 |
|
} |