From: Brett Porter Date: Thu, 14 Jan 2010 04:27:07 +0000 (+0000) Subject: fix the search test X-Git-Tag: archiva-1.3.1~37 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4457762692ea2ead16f2c29565fa32cb4f76a140;p=archiva.git fix the search test git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@899055 13f79535-47bb-0310-9956-ffa450edef68 --- 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()