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

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


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

Modified:
   branches/Branch_5_1/
   branches/Branch_5_1/tests/func/Search/searchTest.php
Log:
Add testsuite for people searches

Modified: branches/Branch_5_1/tests/func/Search/searchTest.php
===================================================================
--- branches/Branch_5_1/tests/func/Search/searchTest.php	2011-10-05 15:40:03 UTC (rev 14542)
+++ branches/Branch_5_1/tests/func/Search/searchTest.php	2011-10-05 15:40:12 UTC (rev 14543)
@@ -63,5 +63,53 @@
 		$this->assertTrue($this->isTextPresent("public description for projectb"));
 	}
 
+	function testPeopleSearch()
+	{
+		$this->switchUser('admin');
+		$this->createUser('ratatouille');
+		$this->createUser('tartiflette');
+
+		$this->open(ROOT) ;
+		$this->waitForPageToLoad("30000");
+		$this->select("type_of_search", "label=People");
+		$this->type("//input[@name='words']", "tartempion");
+		$this->click("//input[@name='Search']");
+		$this->waitForPageToLoad("30000");
+		$this->assertTrue($this->isTextPresent("No matches found for"));
+		$this->assertFalse($this->isTextPresent("ratatouille Lastname"));
+		$this->assertFalse($this->isTextPresent("tartiflette Lastname"));
+
+		$this->open(ROOT) ;
+		$this->waitForPageToLoad("30000");
+		$this->select("type_of_search", "label=People");
+		$this->type("//input[@name='words']", "ratatouille");
+		$this->click("//input[@name='Search']");
+		$this->waitForPageToLoad("30000");
+		$this->assertFalse($this->isTextPresent("No matches found for"));
+		$this->assertTrue($this->isTextPresent("ratatouille Lastname"));
+		$this->assertFalse($this->isTextPresent("tartiflette Lastname"));
+
+		$this->open(ROOT) ;
+		$this->waitForPageToLoad("30000");
+		$this->select("type_of_search", "label=People");
+		$this->type("//input[@name='words']", "lastname ratatouille");
+		$this->click("//input[@name='Search']");
+		$this->waitForPageToLoad("30000");
+		$this->assertFalse($this->isTextPresent("No matches found for"));
+		$this->assertTrue($this->isTextPresent("ratatouille Lastname"));
+		$this->assertFalse($this->isTextPresent("tartiflette Lastname"));
+
+		$this->open(ROOT) ;
+		$this->waitForPageToLoad("30000");
+		$this->select("type_of_search", "label=People");
+		$this->type("//input[@name='words']", "Lastname");
+		$this->click("//input[@name='Search']");
+		$this->waitForPageToLoad("30000");
+		$this->assertFalse($this->isTextPresent("No matches found for"));
+		$this->assertTrue($this->isTextPresent("ratatouille Lastname"));
+		$this->assertTrue($this->isTextPresent("tartiflette Lastname"));
+
+	}
+
 }
 ?>




More information about the Fusionforge-commits mailing list