]> source.dussan.org Git - archiva.git/commitdiff
fix some test : with struts we cannot have both client and server side validation
authorOlivier Lamy <olamy@apache.org>
Mon, 19 Sep 2011 10:09:53 +0000 (10:09 +0000)
committerOlivier Lamy <olamy@apache.org>
Mon, 19 Sep 2011 10:09:53 +0000 (10:09 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1172553 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/ArtifactManagementTest.java
archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArtifactManagementTest.java
archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java

index 67c323527cb0d46a553eac4903cc1fee4613e56b..33aab3c9ca19272b8ed3875254054d86a94c373b 100644 (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." );
     }
 
index 1b373f650beb9fa084fd4acc53e8078369a1d607..c126d7fd63d1de37fe44582215abc0a0f857196a 100644 (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 );
index c30fba72fe2bea63934aca396719c26a25cca978..f855b5332dfc7e529537162bf3cf1c29ebb48d21 100644 (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 );
     }