fix the search test

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@899055 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2010-01-14 04:27:07 +00:00
parent f6a631b7d5
commit 4457762692
2 changed files with 5 additions and 6 deletions

View File

@ -25,7 +25,7 @@ public abstract class AbstractSearchTest
//Search //Search
public void goToSearchPage() public void goToSearchPage()
{ {
if ( !"Apache Archiva \\ Quick Search".equals( getSelenium().getTitle() ) ) if ( !"Apache Archiva \\ Quick Search".equals( getTitle() ) )
{ {
clickLinkWithText( "Search" ); clickLinkWithText( "Search" );
getSelenium().waitForPageToLoad( maxWaitTimeInMs ); getSelenium().waitForPageToLoad( maxWaitTimeInMs );

View File

@ -140,14 +140,13 @@ public abstract class AbstractSeleniumTest {
public void assertPage( String title ) public void assertPage( String title )
{ {
// Collapse spaces Assert.assertEquals( getTitle(), title );
String actualTitle = getSelenium().getTitle().replaceAll( "[ \n\r]+", " " );
Assert.assertEquals( actualTitle, title );
} }
public String getTitle() public String getTitle()
{ {
return getSelenium().getTitle(); // Collapse spaces
return getSelenium().getTitle().replaceAll( "[ \n\r]+", " " );
} }
public String getHtmlContent() public String getHtmlContent()