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

File ReleaseHomePage.java

 

Coverage histogram

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

Code metrics

0
11
6
1
86
42
6
0.55
1.83
6
1

Classes

Class Line # Actions
ReleaseHomePage 33 11 0% 6 3
0.823529482.4%
 

Contributing tests

This file is covered by 1 test. .

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.release.test.po;
21   
22    import org.openqa.selenium.WebElement;
23    import org.openqa.selenium.support.FindBy;
24    import org.xwiki.test.ui.po.LiveTableElement;
25    import org.xwiki.test.ui.po.ViewPage;
26   
27    /**
28    * Represents actions that can be done on the Release.WebHome page.
29    *
30    * @version $Id: cec4216f55830fccc1b822810a747c78771df0e1 $
31    * @since 5.0M1
32    */
 
33    public class ReleaseHomePage extends ViewPage
34    {
35    @FindBy(id = "versionid")
36    private WebElement releaseNameField;
37   
38    @FindBy(xpath = "//form[@id = 'newrelease']//input[@class = 'button']")
39    private WebElement releaseNameButton;
40   
41    /**
42    * Opens the home page.
43    */
 
44  0 toggle public static ReleaseHomePage gotoPage()
45    {
46  0 getUtil().gotoPage(getSpace(), getPage());
47  0 return new ReleaseHomePage();
48    }
49   
 
50  1 toggle public static String getSpace()
51    {
52  1 return "Release";
53    }
54   
 
55  1 toggle public static String getPage()
56    {
57  1 return "WebHome";
58    }
59   
60    /**
61    * @param releaseName the name of the Release entry to add
62    * @return the new FAQ entry page
63    */
 
64  1 toggle public ReleaseEntryEditPage addRelease(String releaseName)
65    {
66  1 this.releaseNameField.clear();
67  1 this.releaseNameField.sendKeys(releaseName);
68  1 this.releaseNameButton.click();
69  1 return new ReleaseEntryEditPage();
70    }
71   
72    /**
73    * @return the Release live table element
74    */
 
75  2 toggle public LiveTableElement getReleaseLiveTable()
76    {
77  2 return new LiveTableElement("releases");
78    }
79   
 
80  1 toggle @Override
81    public ReleaseHomePage waitUntilPageIsLoaded()
82    {
83  1 getReleaseLiveTable().waitUntilReady();
84  1 return this;
85    }
86    }