1 package org.apache.archiva.web.test.parent;
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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
22 public abstract class AbstractArtifactReportsTest
23 extends AbstractArchivaTest
27 public void goToReportsPage()
29 clickLinkWithText( "Reports" );
33 public void assertReportsPage()
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" );
67 public void compareRepositories( String labelSelected, String startDate, String endDate )
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" );