]> source.dussan.org Git - archiva.git/commitdiff
fix the search test
authorBrett Porter <brett@apache.org>
Thu, 14 Jan 2010 04:27:07 +0000 (04:27 +0000)
committerBrett Porter <brett@apache.org>
Thu, 14 Jan 2010 04:27:07 +0000 (04:27 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@899055 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSearchTest.java
archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java

index 410ec14ab3a2d97ce667694f1c5b36b9162acbc1..5d8c5ee8f1c5d47c8085538da27db22370cdb8f0 100644 (file)
@@ -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
+}
index 2c697d7256a3d518d5bface23a928352d496c00a..cb4fee20815a695f83e2fa96815d42a0345c9fd9 100644 (file)
@@ -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()