| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
|
| 20 |
|
package org.xwiki.extension.test.po; |
| 21 |
|
|
| 22 |
|
import java.util.ArrayList; |
| 23 |
|
import java.util.List; |
| 24 |
|
|
| 25 |
|
import org.openqa.selenium.By; |
| 26 |
|
import org.openqa.selenium.WebElement; |
| 27 |
|
import org.xwiki.test.ui.po.BaseElement; |
| 28 |
|
|
| 29 |
|
|
| 30 |
|
|
| 31 |
|
|
| 32 |
|
@version |
| 33 |
|
@since |
| 34 |
|
|
| |
|
| 90% |
Uncovered Elements: 2 (20) |
Complexity: 7 |
Complexity Density: 0.58 |
|
| 35 |
|
public class ExtensionProgressPane extends BaseElement |
| 36 |
|
{ |
| 37 |
|
|
| 38 |
|
|
| 39 |
|
|
| 40 |
|
private final WebElement container; |
| 41 |
|
|
| 42 |
|
|
| 43 |
|
|
| 44 |
|
|
| 45 |
|
@param |
| 46 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 47 |
15 |
public ExtensionProgressPane(WebElement container)... |
| 48 |
|
{ |
| 49 |
15 |
this.container = container; |
| 50 |
|
} |
| 51 |
|
|
| 52 |
|
|
| 53 |
|
@return |
| 54 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 55 |
5 |
public List<DependencyPane> getJobPlan()... |
| 56 |
|
{ |
| 57 |
5 |
return new ExtensionDependenciesPane(container).getDependenciesAfter("The following "); |
| 58 |
|
} |
| 59 |
|
|
| 60 |
|
|
| 61 |
|
@return |
| 62 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 63 |
1 |
public WebElement getJobLogLabel()... |
| 64 |
|
{ |
| 65 |
1 |
String xpath = "//*[@class = 'log']/parent::dd/preceding-sibling::dt[last()]/label"; |
| 66 |
1 |
return getDriver().findElementWithoutWaiting(container, By.xpath(xpath)); |
| 67 |
|
} |
| 68 |
|
|
| 69 |
|
|
| 70 |
|
@return |
| 71 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 72 |
8 |
public List<LogItemPane> getJobLog()... |
| 73 |
|
{ |
| 74 |
8 |
List<LogItemPane> log = new ArrayList<LogItemPane>(); |
| 75 |
8 |
for (WebElement element : getDriver().findElementsWithoutWaiting(container, By.className("log-item"))) { |
| 76 |
113 |
log.add(new LogItemPane(element)); |
| 77 |
|
} |
| 78 |
8 |
return log; |
| 79 |
|
} |
| 80 |
|
|
| 81 |
|
|
| 82 |
|
@return |
| 83 |
|
|
| |
|
| 60% |
Uncovered Elements: 2 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 84 |
1 |
public MergeConflictPane getMergeConflict()... |
| 85 |
|
{ |
| 86 |
1 |
if (getDriver().findElementsWithoutWaiting(container, By.name("versionToKeep")).size() > 0) { |
| 87 |
1 |
return new MergeConflictPane(); |
| 88 |
|
} |
| 89 |
0 |
return null; |
| 90 |
|
} |
| 91 |
|
|
| 92 |
|
|
| 93 |
|
@return |
| 94 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 95 |
2 |
public UnusedPagesPane getUnusedPages()... |
| 96 |
|
{ |
| 97 |
2 |
return new UnusedPagesPane(getDriver().findElementWithoutWaiting(container, |
| 98 |
|
By.className("extension-question"))); |
| 99 |
|
} |
| 100 |
|
} |