remove dependencies on artifact upload functionality, add test fixture data. Temporarily disable tests that don't work on Safari

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@899031 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2010-01-14 02:15:09 +00:00
parent bc8f42601c
commit edf6aa2ced
14 changed files with 58 additions and 15 deletions

View File

@ -0,0 +1,24 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>test</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<name>test</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<distributionManagement>
<repository>
<id>test</id>
<url>file://localhost/Users/brett/scm/archiva/archiva/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal</url>
</repository>
</distributionManagement>
</project>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>test</groupId>
<artifactId>test</artifactId>
<version>1.0</version>
<versioning>
<versions>
<version>1.0</version>
</versions>
<lastUpdated>20100114015837</lastUpdated>
</versioning>
</metadata>

View File

@ -83,15 +83,16 @@ public class ArtifactManagementTest
assertTextPresent( "Please add a file to upload." );
}
@Test( enabled = false )
public void testAddArtifactValidValues()
{
// TODO: disable test on non *chrome browsers, there is no way to do file uploads (SEL-63)
addArtifact( getGroupId() , getArtifactId(), getVersion(), getPackaging() , getArtifactFilePath(), getRepositoryId() );
addArtifact( getGroupId() , "testAddArtifactValidValues", getVersion(), getPackaging() , getArtifactFilePath(), getRepositoryId() );
assertTextPresent( "Artifact 'test:test:1.0' was successfully deployed to repository 'internal'" );
}
//MRM-747
@Test(dependsOnMethods = { "testAddArtifactValidValues" } )
@Test( enabled = false )
public void testAddArtifactBlockRedeployments()
{
// TODO: disable test on non *chrome browsers, there is no way to do file uploads (SEL-63)
@ -99,6 +100,7 @@ public class ArtifactManagementTest
assertTextPresent( "Overwriting released artifacts in repository '" + getRepositoryId() + "' is not allowed." );
}
@Test( enabled = false )
public void testDeleteArtifact()
{
//prep

View File

@ -67,7 +67,9 @@ public class AuditLogsReportTest
assertTextPresent( "No audit logs found." );
}
@Test (dependsOnMethods = { "testAddArtifactValidValues" } )
// TODO: add test for adding via WebDAV
// TODO: disable if not running on *chrome
@Test (dependsOnMethods = { "testAddArtifactValidValues" }, enabled = false )
public void testViewAuditLogsDataFound()
{
goToAuditLogReports();
@ -86,7 +88,9 @@ public class AuditLogsReportTest
assertTextPresent( "admin" );
}
@Test (dependsOnMethods = { "testViewAuditLogsDataFound" } )
// TODO: add test for adding via WebDAV
// TODO: disable if not running on *chrome
@Test (dependsOnMethods = { "testAddArtifactValidValues" }, enabled = false )
public void testViewAuditLogsOnlyArtifactIdIsSpecified()
{
goToAuditLogReports();
@ -105,7 +109,9 @@ public class AuditLogsReportTest
assertTextPresent( "admin" );
}
@Test (dependsOnMethods = { "testViewAuditLogsOnlyArtifactIdIsSpecified" } )
// TODO: add test for adding via WebDAV
// TODO: disable if not running on *chrome
@Test (dependsOnMethods = { "testAddArtifactValidValues" }, enabled = false )
public void testViewAuditLogsForAllRepositories()
{
goToAuditLogReports();

View File

@ -45,6 +45,7 @@ public class BrowseTest
}
// MRM-1278
@Test( enabled = false )
public void testCorrectRepositoryInBrowse()
{
File artifact =

View File

@ -22,13 +22,12 @@ package org.apache.archiva.web.test;
import org.apache.archiva.web.test.parent.AbstractArtifactReportsTest;
import org.testng.annotations.Test;
@Test( groups = { "reports" }, dependsOnMethods = { "testAddArtifactValidValues" } )
@Test( groups = { "reports" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
public class ReportsTest
extends AbstractArtifactReportsTest
{
//TODO Tests for repository with defects
// @Test(dependsOnMethods = { "testAddArtifactValidValues" } )
public void testRepoStatisticsWithoutRepoCompared()
{
goToReportsPage();
@ -57,7 +56,6 @@ public class ReportsTest
assertTextPresent( "Start Date must be earlier than the End Date" );
}
@Test(dependsOnMethods = { "testAddArtifactValidValues" } )
public void testRepositoryStatistics()
{
String repositoryName = getProperty( "REPOSITORY_NAME" ) ;
@ -78,7 +76,6 @@ public class ReportsTest
assertTextPresent( "Statistics Report" );
}
@Test(dependsOnMethods = { "testAddArtifactValidValues" } )
public void testRepositoryHealthWithoutDefect()
{
goToReportsPage();
@ -89,7 +86,6 @@ public class ReportsTest
assertTextPresent( "The operation generated an empty report." );
}
@Test(dependsOnMethods = { "testAddArtifactValidValues" } )
public void testRepositoryHealthWithoutGroupId()
{
goToReportsPage();

View File

@ -34,7 +34,6 @@ public class SearchTest
assertTextPresent( "No results found" );
}
@Test (dependsOnMethods = { "testAddArtifactValidValues" } )
public void testSearchExistingArtifact()
{
searchForArtifact( getProperty( "ARTIFACT_ARTIFACTID" ) );
@ -43,7 +42,6 @@ public class SearchTest
assertLinkPresent( "test" );
}
@Test (dependsOnMethods = { "testAddArtifactValidValues" } )
public void testViewSearchedArtifact()
{
searchForArtifact( getProperty( "ARTIFACT_ARTIFACTID" ) );
@ -66,7 +64,6 @@ public class SearchTest
assertTextPresent( "Advanced Search - At least one search criteria must be provided." );
}
@Test (dependsOnMethods = { "testAddArtifactValidValues" } )
public void testSearchExistingArtifactUsingAdvancedSearchArtifactId()
{
searchForArtifactAdvancedSearch( null, getProperty( "ARTIFACT_ARTIFACTID" ), null, getProperty( "REPOSITORYID" ), null, null );
@ -75,7 +72,6 @@ public class SearchTest
assertLinkPresent( "test" );
}
@Test (dependsOnMethods = { "testAddArtifactValidValues" } )
public void testSearchExistingArtifactUsingAdvancedSearchGroupId()
{
searchForArtifactAdvancedSearch( getProperty( "GROUPID" ), null, null, getProperty( "REPOSITORYID" ), null, null );
@ -84,7 +80,7 @@ public class SearchTest
assertLinkPresent( "test" );
}
@Test (dependsOnMethods = { "testAddManagedRepoValidValues", "testAddArtifactValidValues" } )
@Test (dependsOnMethods = { "testAddManagedRepoValidValues" } )
public void testSearchExistingArtifactUsingAdvancedSearchNoAccessToRepository()
{
searchForArtifactAdvancedSearch( null, getProperty( "ARTIFACT_ARTIFACTID" ), null, "managedrepo1", null, null );