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 AbstractArtifactManagementTest
23 extends AbstractArchivaTest
26 public String getGroupId()
28 String groupId = getProperty( "GROUPID" );
32 public String getArtifactId()
34 String artifactId = getProperty( "ARTIFACTID" );
38 public String getVersion()
40 String version = getProperty( "VERSION" );
44 public String getPackaging()
46 String packaging = getProperty( "PACKAGING" );
50 public String getArtifactFilePath()
52 return "src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar";
55 public String getRepositoryId()
57 String repositoryId = getProperty( "REPOSITORYID" );
61 public void goToDeleteArtifactPage()
63 login( getProperty( "ADMIN_USERNAME" ), getProperty( "ADMIN_PASSWORD" ) );
64 getSelenium().open( "/archiva/deleteArtifact.action" );
65 assertDeleteArtifactPage();
68 public void deleteArtifact( String groupId, String artifactId, String version, String repositoryId )
70 deleteArtifact( groupId, artifactId, version, repositoryId, false );
73 public void deleteArtifact( String groupId, String artifactId, String version, String repositoryId, boolean wait )
75 goToDeleteArtifactPage();
76 setFieldValue( "groupId", groupId );
77 setFieldValue( "artifactId", artifactId );
78 setFieldValue( "version", version );
79 selectValue( "repositoryId", repositoryId );
80 clickButtonWithValue( "Submit", wait );