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

File SendMailAdministrationSectionPage.java

 

Coverage histogram

../../../../../img/srcFileCovDistChart0.png
83% of files have more coverage

Code metrics

2
13
9
1
101
56
10
0.77
1.44
9
1.11

Classes

Class Line # Actions
SendMailAdministrationSectionPage 33 13 0% 10 24
0.00%
 

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.mail.test.po;
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.administration.test.po.AdministrationSectionPage;
26   
27    /**
28    * Represents the actions possible on the General Mail Administration Page.
29    *
30    * @version $Id: 89cc7f07795ffa504403e0f10e52f8b537a65c3c $
31    * @since 6.4RC1
32    */
 
33    public class SendMailAdministrationSectionPage extends AdministrationSectionPage
34    {
35    @FindBy(id = "Mail.SendMailConfigClass_0_host")
36    private WebElement host;
37   
38    @FindBy(id = "Mail.SendMailConfigClass_0_port")
39    private WebElement port;
40   
41    @FindBy(id = "Mail.SendMailConfigClass_0_sendWaitTime")
42    private WebElement sendWaitTime;
43   
44    @FindBy(id = "Mail.SendMailConfigClass_0_discardSuccessStatuses")
45    private WebElement discardSuccessStatuses;
46   
 
47  0 toggle public SendMailAdministrationSectionPage()
48    {
49  0 super("Mail Sending");
50    }
51   
 
52  0 toggle public String getHost()
53    {
54  0 return this.host.getAttribute("value");
55    }
56   
 
57  0 toggle public void setHost(String host)
58    {
59  0 this.host.clear();
60  0 this.host.sendKeys(host);
61    }
62   
 
63  0 toggle public String getPort()
64    {
65  0 return this.port.getAttribute("value");
66    }
67   
 
68  0 toggle public void setPort(String port)
69    {
70  0 this.port.clear();
71  0 this.port.sendKeys(port);
72    }
73   
 
74  0 toggle public String getSendWaitTime()
75    {
76  0 return this.sendWaitTime.getAttribute("value");
77    }
78   
 
79  0 toggle public void setSendWaitTime(String sendWaitTime)
80    {
81  0 this.sendWaitTime.clear();
82  0 this.sendWaitTime.sendKeys(sendWaitTime);
83    }
84   
85    /**
86    * @since 6.4.1
87    */
 
88  0 toggle public void setDiscardSuccessStatuses(boolean discardSuccessStatuses)
89    {
90  0 Select select = new Select(this.discardSuccessStatuses);
91  0 select.selectByValue((discardSuccessStatuses) ? "1" : "0");
92    }
93   
94    /**
95    * @since 6.4.1
96    */
 
97  0 toggle public boolean getDiscardSuccessStatuses()
98    {
99  0 return !(new Select(this.discardSuccessStatuses).getFirstSelectedOption().getAttribute("value").equals("0"));
100    }
101    }