<cargo.wait>false</cargo.wait>
<cargo.timeout>600000</cargo.timeout>
<cargo.install.dir>${project.build.directory}/cargo/installs</cargo.install.dir>
- <maxWaitTimeInMs>30000</maxWaitTimeInMs>
+ <maxWaitTimeInMs>10000</maxWaitTimeInMs>
<!-- TODO: review how appropriate the memory settings are - should work with less -->
<cargo.jvm.args>-Xmx512m -XX:MaxPermSize=256m</cargo.jvm.args>
<seleniumPluginVersion>2.0</seleniumPluginVersion>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
- <version>5.9</version>
+ <version>6.2.1</version>
<scope>test</scope>
- <classifier>jdk15</classifier>
</dependency>
<dependency>
<groupId>commons-io</groupId>
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
-@Test( groups = { "about" }, alwaysRun = true )
public class ArchivaAdminTest
extends AbstractArchivaTest
{
super.open( baseUrl, browser, seleniumHost, seleniumPort, Integer.toString( maxWaitTimeInMs ) );
getSelenium().open( baseUrl );
- String title = getSelenium().getTitle();
// if not admin user created create one
if ( isElementPresent( "adminCreateForm" ) )
{
// take care about repositories : internal
}
+ @Test( groups = { "about" }, alwaysRun = true )
+ public void testHome()
+ {
+ getSelenium().open( baseUrl );
+ assertPage( "Apache Archiva \\ Quick Search" );
+ }
}
\ No newline at end of file
+ "' was successfully deployed to repository 'internal'" );
}
- @Test( groups = "requiresUpload" )
+ @Test( groups = "requiresUpload", enabled = false )
public void testDotNetTypes()
{
String groupId = getProperty( "GROUPID_DOTNETARTIFACT" );
String artifactId = getProperty( "ARTIFACTID_DOTNETARTIFACT" );
String packaging = getProperty( "PACKAGING_DOTNETARTIFACT" );
- addArtifact( groupId, artifactId, getVersion(), packaging, getArtifactFilePath(), getRepositoryId(), false );
+ addArtifact( groupId, artifactId, getVersion(), packaging, getArtifactFilePath(), getRepositoryId(), true );
assertTextPresent( "Artifact '" + groupId + ":" + artifactId + ":" + getVersion()
+ "' was successfully deployed to repository 'internal'" );
getSelenium().open( baseUrl + "/browse/" + groupId + "/" + artifactId + "/" + getVersion() );
String basePath =
"/archiva/repository/internal/" + groupId + "/" + artifactId + "/" + getVersion() + "/" + artifactId + "-"
+ getVersion();
+ // FIXME: currently broken - is dotnet-library
assertLinkPresent( ".NET Library" );
assertElementPresent( "//a[@href='" + basePath + ".dll']" );
assertElementPresent( "//a[@href='" + basePath + ".pom']" );
public void testAddArtifactBlockRedeployments()
{
addArtifact( getGroupId(), getArtifactId(), getVersion(), getPackaging(), getArtifactFilePath(),
- getRepositoryId(), false );
+ getRepositoryId(), true );
assertTextPresent( "Overwriting released artifacts in repository '" + getRepositoryId() + "' is not allowed." );
}
String packaging = getProperty( "PACKAGING1" );
String repositoryId = getProperty( "REPOSITORYID1" );
// TODO: do this differently as it only works in Firefox's chrome mode
- addArtifact( groupId, artifactId, version, packaging, getArtifactFilePath(), repositoryId, false );
+ addArtifact( groupId, artifactId, version, packaging, getArtifactFilePath(), repositoryId, true );
assertTextPresent( "Artifact 'delete:delete:1.0' was successfully deployed to repository 'internal'" );
- deleteArtifact( "delete", "delete", "1.0", "internal" );
+ deleteArtifact( "delete", "delete", "1.0", "internal", true );
assertTextPresent( "Artifact 'delete:delete:1.0' was successfully deleted from repository 'internal'" );
}
addMetadataProperty();
}
- @Test( dependsOnMethods = { "testAddMetadataProperty" } )
+ @Test( dependsOnMethods = { "testAddMetadataProperty", "testWithCorrectUsernamePassword" } )
public void testDeleteMetadataProperty()
{
deleteMetadataProperty();
}
// change the configuaration first and try to upload existing artifact to the repository
+ @Test(dependsOnMethods = {"testAddArtifactToStagingRepository"})
public void testConfigurationChangesOfStagingRepository()
{
editManagedRepository();
assertTextPresent( "Unable to process blank pattern." );
}
- @Test( dependsOnMethods = { "testAddArtifactFileType_NullValue" } )
+ @Test
public void testAddArtifactFileType()
{
+ goToRepositoryScanningPage();
setFieldValue( "newpattern_0", "**/*.dll" );
clickAddIcon( "newpattern_0" );
Assert.assertEquals( getSelenium().getTable( "//div[@id='contentArea']/div/div[1]/table.13.0" ), "**/*.dll" );
@Test( dependsOnMethods = { "testAddArtifactFileType" } )
public void testDeleteArtifactFileType()
{
+ goToRepositoryScanningPage();
String path = "//div[@id='contentArea']/div/div/table/tbody/tr[14]/td/code";
assertElementPresent( path );
Assert.assertEquals( getSelenium().getText( path ), "**/*.dll" );
@Test( dependsOnMethods = { "testDeleteArtifactFileType" } )
public void testAddAutoRemove_NullValue()
{
+ goToRepositoryScanningPage();
setFieldValue( "newpattern_1", "" );
clickAddIcon( "newpattern_1" );
assertTextPresent( "Unable to process blank pattern." );
@Test( dependsOnMethods = { "testAddAutoRemove_NullValue" } )
public void testAddAutoRemove()
{
+ goToRepositoryScanningPage();
setFieldValue( "newpattern_1", "**/*.test" );
clickAddIcon( "newpattern_1" );
Assert.assertEquals( getSelenium().getTable( "//div[@id='contentArea']/div/div[2]/table.3.0" ), "**/*.test" );
@Test( dependsOnMethods = { "testAddAutoRemove" } )
public void testDeleteAutoRemove()
{
+ goToRepositoryScanningPage();
String path = "//div[@id='contentArea']/div/div[2]/table/tbody/tr[4]/td/code";
assertElementPresent( path );
Assert.assertEquals( getSelenium().getText( path ), "**/*.test" );
@Test( dependsOnMethods = { "testDeleteAutoRemove" } )
public void testAddIgnoredArtifacts_NullValue()
{
+ goToRepositoryScanningPage();
setFieldValue( "newpattern_2", "" );
clickAddIcon( "newpattern_2" );
Assert.assertEquals( getErrorMessageText(),
@Test( dependsOnMethods = { "testAddIgnoredArtifacts" } )
public void testDeleteIgnoredArtifacts()
{
+ goToRepositoryScanningPage();
String pattern = "**/*.log";
String path = "//div[@id='contentArea']/div/div[3]/table/tbody/tr[7]/td/code";
assertElementPresent( path );
@Test( dependsOnMethods = { "testDeleteIgnoredArtifacts" } )
public void testAddIndexableContent_NullValue()
{
+ goToRepositoryScanningPage();
setFieldValue( "newpattern_3", "" );
clickAddIcon( "newpattern_3" );
Assert.assertEquals( getErrorMessageText(),
@Test( dependsOnMethods = { "testAddIndexableContent" } )
public void testDeleteIndexableContent()
{
+ goToRepositoryScanningPage();
String pattern = "**/*.html";
String path = "//div[@id='contentArea']/div/div[4]/table/tbody/tr[10]/td/code";
assertElementPresent( path );
@Test( dependsOnMethods = { "testDeleteIndexableContent" } )
public void testUpdateConsumers()
{
+ goToRepositoryScanningPage();
checkField( "enabledKnownContentConsumers" );
checkField( "//input[@name='enabledKnownContentConsumers' and @value='auto-rename']" );
clickButtonWithValue( "Update Consumers" );
@Test( dependsOnMethods = { "testUpdateConsumers" } )
public void testUpdateConsumers_UnsetAll()
{
+ goToRepositoryScanningPage();
getSelenium().uncheck( "enabledKnownContentConsumers" );
getSelenium().uncheck( "//input[@name='enabledKnownContentConsumers' and @value='auto-rename']" );
getSelenium().uncheck( "//input[@name='enabledKnownContentConsumers' and @value='create-missing-checksums']" );
assertTextPresent( "You must enter a repository name." );
}
- @Test( dependsOnMethods = { "testAddRemoteRepoNullName" } )
+ @Test
public void testAddRemoteRepoNullURL()
{
+ getSelenium().open( "/archiva/admin/addRemoteRepository.action" );
addRemoteRepository( "remoterepo", "Remote Repository Sample", "", "", "", "", "Maven 2.x Repository", false );
assertTextPresent( "You must enter a url." );
}
@Test( dependsOnMethods = { "testDeleteRepositoryOfRepositoryGroup" } )
public void testDeleteRepositoryGroup()
{
- assertRepositoryGroupsPage();
+ goToRepositoryGroupsPage();
deleteRepositoryGroup( "testing" );
assertTextPresent( "No Repository Groups Defined." );
}