[Fusionforge-commits] r14542 - in branches/Branch_5_1: . tests/func/Search

Roland Mas lolando at fusionforge.org
Wed Oct 5 17:40:03 CEST 2011


Author: lolando
Date: 2011-10-05 17:40:03 +0200 (Wed, 05 Oct 2011)
New Revision: 14542

Modified:
   branches/Branch_5_1/
   branches/Branch_5_1/tests/func/Search/searchTest.php
Log:
Extend testsuite for project searches

Modified: branches/Branch_5_1/tests/func/Search/searchTest.php
===================================================================
--- branches/Branch_5_1/tests/func/Search/searchTest.php	2011-10-05 11:36:23 UTC (rev 14541)
+++ branches/Branch_5_1/tests/func/Search/searchTest.php	2011-10-05 15:40:03 UTC (rev 14542)
@@ -26,16 +26,41 @@
 	function testProjectSearch()
 	{
 		$this->init();
+		$this->createProject('projectb');
+
 		$this->open(ROOT) ;
 		$this->waitForPageToLoad("30000");
 		$this->type("//input[@name='words']", "XXXXXXXXXXXXXXXXXXXXXXXXXX");
 		$this->click("//input[@name='Search']");
 		$this->waitForPageToLoad("30000");
 		$this->assertTrue($this->isTextPresent("No matches found for"));
+
+		$this->open(ROOT) ;
+		$this->waitForPageToLoad("30000");
 		$this->type("//input[@name='words']", "projecta");
 		$this->click("//input[@name='Search']");
 		$this->waitForPageToLoad("30000");
 		$this->assertFalse($this->isTextPresent("No matches found for"));
+		$this->assertTrue($this->isTextPresent("public description for ProjectA"));
+		$this->assertFalse($this->isTextPresent("public description for projectb"));
+
+		$this->open(ROOT) ;
+		$this->waitForPageToLoad("30000");
+		$this->type("//input[@name='words']", "description projecta");
+		$this->click("//input[@name='Search']");
+		$this->waitForPageToLoad("30000");
+		$this->assertFalse($this->isTextPresent("No matches found for"));
+		$this->assertTrue($this->isTextPresent("public description for ProjectA"));
+		$this->assertFalse($this->isTextPresent("public description for projectb"));
+
+		$this->open(ROOT) ;
+		$this->waitForPageToLoad("30000");
+		$this->type("//input[@name='words']", "public description");
+		$this->click("//input[@name='Search']");
+		$this->waitForPageToLoad("30000");
+		$this->assertFalse($this->isTextPresent("No matches found for"));
+		$this->assertTrue($this->isTextPresent("public description for ProjectA"));
+		$this->assertTrue($this->isTextPresent("public description for projectb"));
 	}
 
 }




More information about the Fusionforge-commits mailing list