git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1172592 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2011-09-19 12:40:46 +00:00
parent 22870274ca
commit 035ed200ac
3 changed files with 16 additions and 4 deletions

View File

@ -587,7 +587,7 @@ public abstract class AbstractArchivaTest
} }
public void addManagedRepository( String identifier, String name, String directory, String indexDirectory, 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(); // goToRepositoriesPage();
// clickLinkWithText( "Add" ); // clickLinkWithText( "Add" );
@ -600,7 +600,7 @@ public abstract class AbstractArchivaTest
setFieldValue( "repository.daysOlder", daysOlder ); setFieldValue( "repository.daysOlder", daysOlder );
setFieldValue( "repository.retentionCount", retentionCount ); setFieldValue( "repository.retentionCount", retentionCount );
// TODO // TODO
clickButtonWithValue( "Add Repository" ); clickButtonWithValue( "Add Repository", wait );
} }
// artifact management // artifact management

View File

@ -29,7 +29,8 @@ public abstract class AbstractSearchTest
if (!isElementPresent( "quickSearchBox" ) ) if (!isElementPresent( "quickSearchBox" ) )
{ {
getSelenium().open( "/index.action"); getSelenium().open( "/index.action");
getSelenium().waitForPageToLoad( maxWaitTimeInMs ); //getSelenium().waitForPageToLoad( maxWaitTimeInMs );
waitPage();
assertElementPresent( "quickSearchSubmit" ); assertElementPresent( "quickSearchSubmit" );
} }
} }

View File

@ -237,7 +237,18 @@ public abstract class AbstractSeleniumTest
public void waitPage() public void waitPage()
{ {
// TODO define a smaller maxWaitTimeJsInMs for wait javascript response for browser side validation // 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 ) public String getFieldValue( String fieldName )