aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web/archiva-webapp-test/src
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2011-09-19 10:09:53 +0000
committerOlivier Lamy <olamy@apache.org>2011-09-19 10:09:53 +0000
commitb2837be655860c80da1137a86b9f16788ba4eff7 (patch)
tree2a386eac9ea6cad550eb3a3135d0aedbfe98c919 /archiva-modules/archiva-web/archiva-webapp-test/src
parentb296aef2e45b585fb42c333e34759458c4a99187 (diff)
downloadarchiva-b2837be655860c80da1137a86b9f16788ba4eff7.tar.gz
archiva-b2837be655860c80da1137a86b9f16788ba4eff7.zip
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
Diffstat (limited to 'archiva-modules/archiva-web/archiva-webapp-test/src')
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/ArtifactManagementTest.java6
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArtifactManagementTest.java5
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java1
3 files changed, 8 insertions, 4 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/ArtifactManagementTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/ArtifactManagementTest.java
index 67c323527..33aab3c9c 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/ArtifactManagementTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/ArtifactManagementTest.java
@@ -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." );
}
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArtifactManagementTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArtifactManagementTest.java
index 1b373f650..c126d7fd6 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArtifactManagementTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArtifactManagementTest.java
@@ -67,6 +67,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 );
setFieldValue( "artifactId", artifactId );
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
index c30fba72f..f855b5332 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
@@ -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 );
}