1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.administration.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.AbstractRegistrationPage; |
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
@version |
31 |
|
@since |
32 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 3 |
Complexity Density: 0.43 |
|
33 |
|
public class LightBoxRegistrationPage extends AbstractRegistrationPage |
34 |
|
{ |
35 |
|
@FindBy(xpath = "//div/form[@id='register']/div/span[1]/input[@value='Save']") |
36 |
|
private WebElement submitButton; |
37 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
|
38 |
8 |
public static LightBoxRegistrationPage gotoPage()... |
39 |
|
{ |
40 |
8 |
UsersAdministrationSectionPage sectionPage = UsersAdministrationSectionPage.gotoPage(); |
41 |
8 |
sectionPage.getUsersLiveTable().waitUntilReady(); |
42 |
8 |
LightBoxRegistrationPage registrationPage = sectionPage.clickAddNewUser(); |
43 |
8 |
registrationPage.getDriver().waitUntilElementIsVisible(By.id("register_first_name")); |
44 |
8 |
return registrationPage; |
45 |
|
} |
46 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
47 |
2 |
@Override... |
48 |
|
public void clickRegister() |
49 |
|
{ |
50 |
2 |
this.submitButton.click(); |
51 |
|
} |
52 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
53 |
8 |
@Override... |
54 |
|
public boolean isLiveValidationEnabled() |
55 |
|
{ |
56 |
8 |
return !getDriver().findElements(By.xpath("//div[@id='lb']/div[@id='lb-content']/script[3]")).isEmpty(); |
57 |
|
} |
58 |
|
} |