[Fusionforge-commits] r14662 - in trunk: . tests/func/Search

Roland Mas lolando at fusionforge.org
Sat Oct 15 21:43:24 CEST 2011


Author: lolando
Date: 2011-10-15 21:43:24 +0200 (Sat, 15 Oct 2011)
New Revision: 14662

Modified:
   trunk/
   trunk/tests/func/Search/searchTest.php
Log:
Avoid two unneeded database reloads in search testsuite

Modified: trunk/tests/func/Search/searchTest.php
===================================================================
--- trunk/tests/func/Search/searchTest.php	2011-10-15 18:55:23 UTC (rev 14661)
+++ trunk/tests/func/Search/searchTest.php	2011-10-15 19:43:24 UTC (rev 14662)
@@ -23,9 +23,14 @@
 
 class Search extends FForge_SeleniumTestCase
 {
-	function testProjectSearch()
+	function testSearch()
 	{
-		$this->init();
+		/*
+		 * Search for projects
+		 */
+
+		$this->populateStandardTemplate();
+		$this->createProject('projecta');
 		$this->createProject('projectb');
 
 		$this->open(ROOT) ;
@@ -88,11 +93,11 @@
 		$this->assertFalse($this->isTextPresent("No matches found for"));
 		$this->assertTrue($this->isTextPresent("public description for ProjectA"));
 		$this->assertTrue($this->isTextPresent("public description for projectb"));
-	}
 
-	function testPeopleSearch()
-	{
-		$this->switchUser(FORGE_ADMIN_USERNAME);
+		/*
+		 * Search for people
+		 */
+
 		$this->createUser('ratatouille');
 		$this->createUser('tartiflette');
 
@@ -136,18 +141,10 @@
 		$this->assertTrue($this->isTextPresent("ratatouille Lastname"));
 		$this->assertTrue($this->isTextPresent("tartiflette Lastname"));
 
-	}
-	
-	function testSearchInTools()
-	{
-		$this->populateStandardTemplate();
-		$this->createProject('projecta');
+		/*
+		 * Search inside a project
+		 */
 
-		// TODO: check that search results vary according to what items are visible to the user
-		// $this->createProject('projectb');
-		// $this->createUser('piperade');
-		// $this->createUser('cassoulet');
-
 		// Prepare some tracker items
 
 		$this->gotoProject('projecta');
@@ -442,6 +439,7 @@
 		$this->assertTrue($this->isTextPresent("News2"));
 
 		// Advanced search
+
 		$this->gotoProject('projecta');
 		$this->clickAndWait('Link=Advanced search');
 		$this->click("//a[contains(@href,'short_forum') and .='all']");




More information about the Fusionforge-commits mailing list