1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package org.xwiki.extension.test.po

File ExtensionProgressPane.java

 

Coverage histogram

../../../../../img/srcFileCovDistChart9.png
38% of files have more coverage

Code metrics

2
12
6
1
100
43
7
0.58
2
6
1.17

Classes

Class Line # Actions
ExtensionProgressPane 35 12 0% 7 2
0.990%
 

Contributing tests

This file is covered by 5 tests. .

Source view

1    /*
2    * See the NOTICE file distributed with this work for additional
3    * information regarding copyright ownership.
4    *
5    * This is free software; you can redistribute it and/or modify it
6    * under the terms of the GNU Lesser General Public License as
7    * published by the Free Software Foundation; either version 2.1 of
8    * the License, or (at your option) any later version.
9    *
10    * This software is distributed in the hope that it will be useful,
11    * but WITHOUT ANY WARRANTY; without even the implied warranty of
12    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13    * Lesser General Public License for more details.
14    *
15    * You should have received a copy of the GNU Lesser General Public
16    * License along with this software; if not, write to the Free
17    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
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    * The section that displays the extension progress log.
31    *
32    * @version $Id: ef1b8795d15da5ea77d6540d9f77c10f0daa0067 $
33    * @since 4.2M1
34    */
 
35    public class ExtensionProgressPane extends BaseElement
36    {
37    /**
38    * The section container.
39    */
40    private final WebElement container;
41   
42    /**
43    * Creates a new instance.
44    *
45    * @param container the section container
46    */
 
47  15 toggle public ExtensionProgressPane(WebElement container)
48    {
49  15 this.container = container;
50    }
51   
52    /**
53    * @return the list of extension that will be affected by the current job
54    */
 
55  5 toggle public List<DependencyPane> getJobPlan()
56    {
57  5 return new ExtensionDependenciesPane(container).getDependenciesAfter("The following ");
58    }
59   
60    /**
61    * @return the element that displays the job log label, which is also used to collapse / expand the job log
62    */
 
63  1 toggle 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 the lines of job log
71    */
 
72  8 toggle 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 the pane that displays the merge conflict resolution UI
83    */
 
84  1 toggle 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 the confirmation to delete the unused wiki pages after uninstalling or upgrading a XAR extension
94    */
 
95  2 toggle public UnusedPagesPane getUnusedPages()
96    {
97  2 return new UnusedPagesPane(getDriver().findElementWithoutWaiting(container,
98    By.className("extension-question")));
99    }
100    }