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

File ExtensionAdministrationPage.java

 

Coverage histogram

../../../../../img/srcFileCovDistChart10.png
0% of files have more coverage

Code metrics

0
10
6
1
111
41
6
0.6
1.67
6
1

Classes

Class Line # Actions
ExtensionAdministrationPage 32 10 0% 6 0
1.0100%
 

Contributing tests

This file is covered by 15 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 org.openqa.selenium.WebElement;
23    import org.openqa.selenium.support.FindBy;
24    import org.xwiki.test.ui.po.ViewPage;
25   
26    /**
27    * The extension administration page.
28    *
29    * @version $Id: 13e6acaf0f6d9a5f419a414034504226a65a1840 $
30    * @since 4.2M1
31    */
 
32    public class ExtensionAdministrationPage extends ViewPage
33    {
34    /**
35    * The link to the administration section from where we can add extensions.
36    */
37    @FindBy(linkText = "Add Extensions")
38    private WebElement addExtensionsLink;
39   
40    /**
41    * The link to the administration section that lists the installed extensions.
42    */
43    @FindBy(linkText = "Installed Extensions")
44    private WebElement installedExtensionsLink;
45   
46    /**
47    * The link to the administration section that lists the core extensions.
48    */
49    @FindBy(linkText = "Core Extensions")
50    private WebElement coreExtensionsLink;
51   
52    /**
53    * Opens the extension manager administration page.
54    *
55    * @return the extension manager administration page
56    */
 
57  20 toggle public static ExtensionAdministrationPage gotoPage()
58    {
59  20 getUtil().gotoPage("XWiki", "XWikiPreferences", "admin");
60  20 return new ExtensionAdministrationPage();
61    }
62   
63    /**
64    * @return the extension search bar
65    */
 
66  23 toggle public SimpleSearchPane getSearchBar()
67    {
68  23 return new SimpleSearchPane();
69    }
70   
71    /**
72    * @return the currently displayed extension search results
73    */
 
74  7 toggle public SearchResultsPane getSearchResults()
75    {
76  7 return new SearchResultsPane();
77    }
78   
79    /**
80    * Clicks on the link to the 'Add Extensions' section.
81    *
82    * @return the newly loaded administration page
83    */
 
84  10 toggle public ExtensionAdministrationPage clickAddExtensionsSection()
85    {
86  10 addExtensionsLink.click();
87  10 return new ExtensionAdministrationPage();
88    }
89   
90    /**
91    * Clicks on the link to the 'Installed Extensions' section.
92    *
93    * @return the newly loaded administration page
94    */
 
95  8 toggle public ExtensionAdministrationPage clickInstalledExtensionsSection()
96    {
97  8 installedExtensionsLink.click();
98  8 return new ExtensionAdministrationPage();
99    }
100   
101    /**
102    * Clicks on the link to the 'Core Extensions' section.
103    *
104    * @return the newly loaded administration page
105    */
 
106  5 toggle public ExtensionAdministrationPage clickCoreExtensionsSection()
107    {
108  5 coreExtensionsLink.click();
109  5 return new ExtensionAdministrationPage();
110    }
111    }