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

File WatchlistPreferencesEditPage.java

 

Coverage histogram

../../../../../../img/srcFileCovDistChart5.png
74% of files have more coverage

Code metrics

0
18
9
1
107
66
9
0.5
2
9
1

Classes

Class Line # Actions
WatchlistPreferencesEditPage 28 18 0% 9 15
0.4444444544.4%
 

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    package org.xwiki.watchlist.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.test.ui.po.editor.EditPage;
26   
27    /** User profile, the watchlist pane, edit mode. */
 
28    public class WatchlistPreferencesEditPage extends EditPage
29    {
30    public static final String AUTOMATICWATCH_DEFAULT = "default";
31   
32    public static final String AUTOMATICWATCH_NONE = "NONE";
33   
34    public static final String AUTOMATICWATCH_ALL = "ALL";
35   
36    public static final String AUTOMATICWATCH_MAJOR = "MAJOR";
37   
38    public static final String AUTOMATICWATCH_NEW = "NEW";
39   
40    public static final String NOTIFIER_REALTIME = "realtime";
41   
42    public static final String NOTIFIER_HOURLY = "Scheduler.WatchListHourlyNotifier";
43   
44    public static final String NOTIFIER_DAILY = "Scheduler.WatchListDailyNotifier";
45   
46    public static final String NOTIFIER_WEEKLY = "Scheduler.WatchListWeeklyNotifier";
47   
48    @FindBy(name = "XWiki.WatchListClass_0_interval")
49    private WebElement notifier;
50   
51    @FindBy(id = "XWiki.WatchListClass_0_automaticwatch")
52    private WebElement automaticwatch;
53   
 
54  1 toggle public void setAutomaticWatchDefault()
55    {
56  1 Select select = new Select(this.automaticwatch);
57  1 select.selectByValue(AUTOMATICWATCH_DEFAULT);
58    }
59   
 
60  2 toggle public void setAutomaticWatchNone()
61    {
62  2 Select select = new Select(this.automaticwatch);
63  2 select.selectByValue(AUTOMATICWATCH_NONE);
64    }
65   
 
66  0 toggle public void setAutomaticWatchAll()
67    {
68  0 Select select = new Select(this.automaticwatch);
69  0 select.selectByValue(AUTOMATICWATCH_ALL);
70    }
71   
 
72  0 toggle public void setAutomaticWatchMajor()
73    {
74  0 Select select = new Select(this.automaticwatch);
75  0 select.selectByValue(AUTOMATICWATCH_MAJOR);
76    }
77   
 
78  0 toggle public void setAutomaticWatchNew()
79    {
80  0 Select select = new Select(this.automaticwatch);
81  0 select.selectByValue(AUTOMATICWATCH_NEW);
82    }
83   
 
84  1 toggle public void setNotifierRealtime()
85    {
86  1 Select select = new Select(this.notifier);
87  1 select.selectByValue(NOTIFIER_REALTIME);
88    }
89   
 
90  0 toggle public void setNotifierHourly()
91    {
92  0 Select select = new Select(this.notifier);
93  0 select.selectByValue(NOTIFIER_HOURLY);
94    }
95   
 
96  1 toggle public void setNotifierDaily()
97    {
98  1 Select select = new Select(this.notifier);
99  1 select.selectByValue(NOTIFIER_DAILY);
100    }
101   
 
102  0 toggle public void setNotifierWeekly()
103    {
104  0 Select select = new Select(this.notifier);
105  0 select.selectByValue(NOTIFIER_WEEKLY);
106    }
107    }