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

File RenamePage.java

 

Coverage histogram

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

Code metrics

10
17
10
1
109
71
15
0.88
1.7
10
1.5

Classes

Class Line # Actions
RenamePage 26 17 0% 15 6
0.837837883.8%
 

Contributing tests

This file is covered by 2 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   
21    package org.xwiki.test.ui.po;
22   
23    import org.openqa.selenium.WebElement;
24    import org.openqa.selenium.support.FindBy;
25   
 
26    public class RenamePage extends ViewPage
27    {
28    @FindBy(name = "deep")
29    private WebElement preserveChildrenCheckbox;
30   
31    @FindBy(name = "updateLinks")
32    private WebElement updateLinksCheckbox;
33   
34    @FindBy(name = "autoRedirect")
35    private WebElement autoRedirectCheckbox;
36   
37    @FindBy(css = "form#rename .button[value='Rename']")
38    private WebElement renameButton;
39   
40    @FindBy(name = "terminal")
41    private WebElement terminalCheckbox;
42   
43    @FindBy(className = "location-picker")
44    private WebElement documentPickerElement;
45   
46    private DocumentPicker documentPicker;
47   
 
48  1 toggle public boolean isPreserveChildren()
49    {
50  1 return this.preserveChildrenCheckbox.isSelected();
51    }
52   
 
53  1 toggle public void setPreserveChildren(boolean preserveChildren)
54    {
55  1 if (preserveChildren != isPreserveChildren()) {
56  0 this.preserveChildrenCheckbox.click();
57    }
58    }
59   
 
60  1 toggle public boolean isUpdateLinks()
61    {
62  1 return this.updateLinksCheckbox.isSelected();
63    }
64   
 
65  1 toggle public void setUpdateLinks(boolean updateLinks)
66    {
67  1 if (updateLinks != isUpdateLinks()) {
68  0 this.updateLinksCheckbox.click();
69    }
70    }
71   
 
72  2 toggle public boolean isAutoRedirect()
73    {
74  2 return this.autoRedirectCheckbox.isSelected();
75    }
76   
 
77  2 toggle public void setAutoRedirect(boolean isAutoRedirect)
78    {
79  2 if (isAutoRedirect != isAutoRedirect()) {
80  1 this.autoRedirectCheckbox.click();
81    }
82    }
83   
 
84  1 toggle public DocumentPicker getDocumentPicker()
85    {
86  1 if (this.documentPicker == null) {
87  1 this.documentPicker = new DocumentPicker(this.documentPickerElement);
88    }
89  1 return this.documentPicker;
90    }
91   
 
92  2 toggle public CopyOrRenameStatusPage clickRenameButton()
93    {
94  2 this.renameButton.click();
95  2 return new CopyOrRenameStatusPage();
96    }
97   
 
98  1 toggle public boolean isTerminal()
99    {
100  1 return this.terminalCheckbox.isSelected();
101    }
102   
 
103  1 toggle public void setTerminal(boolean isTerminal)
104    {
105  1 if (isTerminal != isTerminal()) {
106  1 this.terminalCheckbox.click();
107    }
108    }
109    }