make test more resilient to whitespace in titles

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@834410 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2009-11-10 10:12:04 +00:00
parent 737ef89580
commit d6e13a5e3b
1 changed files with 6 additions and 6 deletions

View File

@ -60,8 +60,6 @@ public abstract class AbstractSeleniumTest {
//baseUrl = getProperty( "BASE_URL" );
maxWaitTimeInMs = getProperty( "MAX_WAIT_TIME_IN_MS" );
}
/**
@ -139,10 +137,12 @@ public abstract class AbstractSeleniumTest {
Assert.assertEquals( fieldValue, getSelenium().getValue( fieldName ) );
}
public void assertPage( String title )
{
Assert.assertEquals( getSelenium().getTitle(), title );
}
public void assertPage( String title )
{
// Collapse spaces
String actualTitle = getSelenium().getTitle().replaceAll( "[ \n\r]+", " " );
Assert.assertEquals( actualTitle, title );
}
public String getTitle()
{