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

View File

@ -66,6 +66,11 @@ public abstract class AbstractArtifactManagementTest
} }
public void deleteArtifact( String groupId, String artifactId, String version, String repositoryId ) 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(); goToDeleteArtifactPage();
setFieldValue( "groupId", groupId ); setFieldValue( "groupId", groupId );

View File

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