fix some test : with struts we cannot have both client and server side validation

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1172553 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2011-09-19 10:09:53 +00:00
parent b296aef2e4
commit b2837be655
3 changed files with 8 additions and 4 deletions

View File

@ -51,7 +51,6 @@ public class ArtifactManagementTest
@Test( dependsOnMethods = { "testAddArtifactNoGroupId" }, alwaysRun = true )
public void testAddArtifactNoArtifactId()
{
addArtifact( getGroupId(), " ", getVersion(), getPackaging(), getArtifactFilePath(), getRepositoryId(), false );
assertTextPresent( "You must enter an artifactId." );
}
@ -164,15 +163,14 @@ public class ArtifactManagementTest
@Test( alwaysRun = true, dependsOnMethods = { "testAddArtifactNullValues" } )
public void testDeleteArtifactNoVersion()
{
deleteArtifact( "delete", "delete", " ", "internal" );
assertTextPresent( "Invalid version." );
deleteArtifact( "delete", "delete", " ", "internal", true );
assertTextPresent( "You must enter a version." );
}
@Test( alwaysRun = true, dependsOnMethods = { "testAddArtifactNullValues" } )
public void testDeleteArtifactInvalidVersion()
{
deleteArtifact( "delete", "delete", "asdf", "internal" );
deleteArtifact( "delete", "delete", "asdf", "internal", true );
assertTextPresent( "Invalid version." );
}

View File

@ -66,6 +66,11 @@ public abstract class AbstractArtifactManagementTest
}
public void deleteArtifact( String groupId, String artifactId, String version, String repositoryId )
{
deleteArtifact( groupId, artifactId, version, repositoryId, false );
}
public void deleteArtifact( String groupId, String artifactId, String version, String repositoryId, boolean wait )
{
goToDeleteArtifactPage();
setFieldValue( "groupId", groupId );

View File

@ -236,6 +236,7 @@ public abstract class AbstractSeleniumTest
public void waitPage()
{
// TODO define a smaller maxWaitTimeJsInMs for wait javascript response for browser side validation
getSelenium().waitForPageToLoad( maxWaitTimeInMs );
}