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

File WatchlistUserProfilePage.java

 

Coverage histogram

../../../../../img/srcFileCovDistChart8.png
54% of files have more coverage

Code metrics

0
11
7
1
87
49
7
0.64
1.57
7
1

Classes

Class Line # Actions
WatchlistUserProfilePage 32 11 0% 7 4
0.777777877.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    package org.xwiki.watchlist.test.po;
21   
22    import org.openqa.selenium.WebElement;
23    import org.openqa.selenium.support.FindBy;
24    import org.xwiki.user.test.po.AbstractUserProfilePage;
25    import org.xwiki.watchlist.test.po.editor.WatchlistPreferencesEditPage;
26   
27    /**
28    * Represents the User Profile Watchlist Tab.
29    *
30    * @version $Id: 48286186b09d741a605da0599b78d58933771e09 $
31    */
 
32    public class WatchlistUserProfilePage extends AbstractUserProfilePage
33    {
34    @FindBy(xpath = "//a[@href='?category=watchlist']")
35    private WebElement watchlistCategory;
36   
37    @FindBy(xpath = "//div[@id='watchlistPane']//div[@class='editProfileCategory']/a")
38    private WebElement editPreferences;
39   
40    @FindBy(xpath = "//div[@class='watchlistManagement']/dl[1]/dd[1]")
41    private WebElement notifier;
42   
43    @FindBy(xpath = "//div[@class='watchlistManagement']/dl[1]/dd[2]")
44    private WebElement automaticwatch;
45   
46    private WatchlistMacro watchlistMacro = new WatchlistMacro();
47   
 
48  6 toggle public static WatchlistUserProfilePage gotoPage(String username)
49    {
50  6 getUtil().gotoPage("XWiki", username, "view", "category=watchlist");
51  6 WatchlistUserProfilePage page = new WatchlistUserProfilePage(username);
52  6 return page;
53    }
54   
 
55  7 toggle public WatchlistUserProfilePage(String username)
56    {
57  7 super(username);
58    }
59   
 
60  1 toggle public WatchlistUserProfilePage switchToWatchlist()
61    {
62  1 this.watchlistCategory.click();
63  1 return new WatchlistUserProfilePage(getUsername());
64    }
65   
 
66  0 toggle public String getNotifier()
67    {
68  0 return this.notifier.getText();
69    }
70   
 
71  0 toggle public String getAutomaticWatch()
72    {
73  0 return this.automaticwatch.getText();
74    }
75   
 
76  5 toggle public WatchlistPreferencesEditPage editPreferences()
77    {
78  5 this.editPreferences.click();
79  5 return new WatchlistPreferencesEditPage();
80    }
81   
 
82  11 toggle public WatchlistMacro getWatchlistMacro()
83    {
84  11 return this.watchlistMacro;
85    }
86   
87    }