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 410ec14ab..5d8c5ee8f 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 @@ -25,7 +25,7 @@ public abstract class AbstractSearchTest //Search public void goToSearchPage() { - if ( !"Apache Archiva \\ Quick Search".equals( getSelenium().getTitle() ) ) + if ( !"Apache Archiva \\ Quick Search".equals( getTitle() ) ) { clickLinkWithText( "Search" ); getSelenium().waitForPageToLoad( maxWaitTimeInMs ); @@ -109,4 +109,4 @@ public abstract class AbstractSearchTest clickSubmitWithLocator( "filteredSearch_0" ); } -} \ No newline at end of file +} 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 2c697d725..cb4fee208 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 @@ -140,14 +140,13 @@ public abstract class AbstractSeleniumTest { public void assertPage( String title ) { - // Collapse spaces - String actualTitle = getSelenium().getTitle().replaceAll( "[ \n\r]+", " " ); - Assert.assertEquals( actualTitle, title ); + Assert.assertEquals( getTitle(), title ); } public String getTitle() { - return getSelenium().getTitle(); + // Collapse spaces + return getSelenium().getTitle().replaceAll( "[ \n\r]+", " " ); } public String getHtmlContent()