aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2011-09-19 12:40:46 +0000
committerOlivier Lamy <olamy@apache.org>2011-09-19 12:40:46 +0000
commit035ed200acd4898f788be3f5ed79651593d728ea (patch)
tree2b3c6c946e92ea0ffcf7d9e8889ee7057f155e4a
parent22870274cabecdad7570b4bd866f4b38ea35bea2 (diff)
downloadarchiva-035ed200acd4898f788be3f5ed79651593d728ea.tar.gz
archiva-035ed200acd4898f788be3f5ed79651593d728ea.zip
add a hack for selenium issue http://jira.openqa.org/browse/SRC-302
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1172592 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java4
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSearchTest.java3
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java13
3 files changed, 16 insertions, 4 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java
index e838e0b27..ca5fe6334 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java
@@ -587,7 +587,7 @@ public abstract class AbstractArchivaTest
}
public void addManagedRepository( String identifier, String name, String directory, String indexDirectory,
- String type, String cron, String daysOlder, String retentionCount )
+ String type, String cron, String daysOlder, String retentionCount, boolean wait)
{
// goToRepositoriesPage();
// clickLinkWithText( "Add" );
@@ -600,7 +600,7 @@ public abstract class AbstractArchivaTest
setFieldValue( "repository.daysOlder", daysOlder );
setFieldValue( "repository.retentionCount", retentionCount );
// TODO
- clickButtonWithValue( "Add Repository" );
+ clickButtonWithValue( "Add Repository", wait );
}
// artifact management
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSearchTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSearchTest.java
index e2223dabe..33b12be0a 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSearchTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSearchTest.java
@@ -29,7 +29,8 @@ public abstract class AbstractSearchTest
if (!isElementPresent( "quickSearchBox" ) )
{
getSelenium().open( "/index.action");
- getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+ //getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+ waitPage();
assertElementPresent( "quickSearchSubmit" );
}
}
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 a36db0234..76c025a37 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
@@ -237,7 +237,18 @@ public abstract class AbstractSeleniumTest
public void waitPage()
{
// TODO define a smaller maxWaitTimeJsInMs for wait javascript response for browser side validation
- getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+ //getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+ // http://jira.openqa.org/browse/SRC-302
+ getSelenium().waitForCondition( "selenium.isElementPresent('document.body');", maxWaitTimeInMs );
+ /*
+ try
+ {
+ Thread.sleep( 1000 );
+ }
+ catch ( InterruptedException e )
+ {
+ throw new RuntimeException( "issue on Thread.sleep : " + e.getMessage(), e );
+ }*/
}
public String getFieldValue( String fieldName )