]> source.dussan.org Git - archiva.git/blob
e026f78057a52f041c371b26bb843a65010b4915
[archiva.git] /
1 package org.apache.archiva.web.test.parent;
2
3 /*
4  * Licensed to the Apache Software Foundation (ASF) under one
5  * or more contributor license agreements.  See the NOTICE file
6  * distributed with this work for additional information
7  * regarding copyright ownership.  The ASF licenses this file
8  * to you under the Apache License, Version 2.0 (the
9  * "License"); you may not use this file except in compliance
10  * with the License.  You may obtain a copy of the License at
11  *
12  *   http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing,
15  * software distributed under the License is distributed on an
16  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17  * KIND, either express or implied.  See the License for the
18  * specific language governing permissions and limitations
19  * under the License.
20  */
21
22 public abstract class AbstractArtifactReportsTest
23     extends AbstractArchivaTest
24 {
25
26     // Reports
27     public void goToReportsPage()
28     {
29         getSelenium().open( "/archiva/report/pickReport.action" );
30         assertReportsPage();
31     }
32
33     public void assertReportsPage()
34     {
35         assertPage( "Apache Archiva \\ Reports" );
36         assertTextPresent( "Reports" );
37         assertTextPresent( "Repository Statistics" );
38         assertTextPresent( "Repositories To Be Compared" );
39         assertElementPresent( "availableRepositories" );
40         assertButtonWithValuePresent( "v" );
41         assertButtonWithValuePresent( "^" );
42         assertButtonWithValuePresent( "<-" );
43         assertButtonWithValuePresent( "->" );
44         assertButtonWithValuePresent( "<<--" );
45         assertButtonWithValuePresent( "-->>" );
46         assertButtonWithValuePresent( "<*>" );
47         assertElementPresent( "selectedRepositories" );
48         assertButtonWithValuePresent( "v" );
49         assertButtonWithValuePresent( "^" );
50         assertTextPresent( "Row Count" );
51         assertElementPresent( "rowCount" );
52         assertTextPresent( "Start Date" );
53         assertElementPresent( "startDate" );
54         assertTextPresent( "End Date" );
55         assertElementPresent( "endDate" );
56         assertButtonWithValuePresent( "View Statistics" );
57         assertTextPresent( "Repository Health" );
58         assertTextPresent( "Row Count" );
59         assertElementPresent( "rowCount" );
60         assertTextPresent( "Group ID" );
61         assertElementPresent( "groupId" );
62         assertTextPresent( "Repository ID" );
63         assertElementPresent( "repositoryId" );
64         assertButtonWithValuePresent( "Show Report" );
65     }
66
67     public void compareRepositories( String labelSelected, String startDate, String endDate )
68     {
69         goToReportsPage();
70         getSelenium().removeSelection( "generateStatisticsReport_availableRepositories", labelSelected );
71         clickButtonWithValue( "->", false );
72         getSelenium().type( "startDate", startDate );
73         // clickLinkWithLocator( "1" , false );
74         // getSelenium().click( "endDate" );
75         getSelenium().type( "endDate", endDate );
76         // clickLinkWithLocator( "30" , false );
77         clickButtonWithValue( "View Statistics" );
78     }
79
80 }