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

File ExtensionInlinePage.java

 

Coverage histogram

../../../../../../img/srcFileCovDistChart7.png
64% of files have more coverage

Code metrics

2
22
12
1
134
88
13
0.59
1.83
12
1.08

Classes

Class Line # Actions
ExtensionInlinePage 32 22 0% 13 14
0.611111161.1%
 

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.repository.test.po.editor;
21   
22    import org.openqa.selenium.WebElement;
23    import org.openqa.selenium.support.FindBy;
24    import org.openqa.selenium.support.ui.Select;
25    import org.xwiki.repository.test.po.ExtensionPage;
26    import org.xwiki.test.ui.po.InlinePage;
27   
28    /**
29    * @version $Id: e8a603bdd3ef049fcbdb3fe2b2c23ca45caf0650 $
30    * @since 4.2M1
31    */
 
32    public class ExtensionInlinePage extends InlinePage
33    {
34    @FindBy(id = "ExtensionCode.ExtensionClass_0_name")
35    private WebElement nameInput;
36   
37    @FindBy(id = "ExtensionCode.ExtensionClass_0_type")
38    private WebElement typeInput;
39   
40    @FindBy(id = "ExtensionCode.ExtensionClass_0_summary")
41    private WebElement summaryInput;
42   
43    @FindBy(id = "ExtensionCode.ExtensionClass_0_authors")
44    private WebElement authorsInput;
45   
46    @FindBy(id = "ExtensionCode.ExtensionClass_0_licenseName")
47    private WebElement licenseNameList;
48   
49    @FindBy(id = "ExtensionCode.ExtensionClass_0_source")
50    private WebElement sourceInput;
51   
52    @FindBy(id = "ExtensionCode.ExtensionClass_0_icon")
53    private WebElement iconInput;
54   
55    @FindBy(id = "ExtensionCode.ExtensionClass_0_description")
56    private WebElement descriptionInput;
57   
58    @FindBy(id = "ExtensionCode.ExtensionClass_0_customInstallationOnly")
59    private WebElement customInstallationOnlyCheckBox;
60   
61    @FindBy(id = "ExtensionCode.ExtensionClass_0_installation")
62    private WebElement installationInput;
63   
 
64  0 toggle public void setName(String name)
65    {
66  0 this.nameInput.clear();
67  0 this.nameInput.sendKeys(name);
68    }
69   
 
70  1 toggle public String getName()
71    {
72  1 return this.nameInput.getAttribute("value");
73    }
74   
 
75  1 toggle public void setType(String type)
76    {
77  1 Select select = new Select(this.typeInput);
78  1 select.selectByValue(type);
79    }
80   
 
81  1 toggle public void setSummary(String summary)
82    {
83  1 this.summaryInput.clear();
84  1 this.summaryInput.sendKeys(summary);
85    }
86   
 
87  0 toggle public void setAuthors(String author)
88    {
89  0 this.authorsInput.clear();
90  0 this.authorsInput.sendKeys(author);
91    }
92   
 
93  1 toggle public void setLicenseName(String licenseName)
94    {
95  1 Select select = new Select(this.licenseNameList);
96  1 select.selectByValue(licenseName);
97    }
98   
 
99  1 toggle public void setSource(String source)
100    {
101  1 this.sourceInput.clear();
102  1 this.sourceInput.sendKeys(source);
103    }
104   
 
105  0 toggle public void setIcon(String icon)
106    {
107  0 this.iconInput.clear();
108  0 this.iconInput.sendKeys(icon);
109    }
110   
 
111  1 toggle public void setDescription(String description)
112    {
113  1 this.descriptionInput.clear();
114  1 this.descriptionInput.sendKeys(description);
115    }
116   
 
117  0 toggle public void setCustomInstallationOnly(boolean customInstallationOnly)
118    {
119  0 Select select = new Select(this.customInstallationOnlyCheckBox);
120  0 select.selectByValue(customInstallationOnly ? "1" : "0");
121    }
122   
 
123  1 toggle public void setInstallation(String installation)
124    {
125  1 this.installationInput.clear();
126  1 this.installationInput.sendKeys(installation);
127    }
128   
 
129  1 toggle @Override
130    protected ExtensionPage createViewPage()
131    {
132  1 return new ExtensionPage();
133    }
134    }