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

Roland Mas lolando at fusionforge.org
Fri Aug 12 17:30:57 CEST 2011


Author: lolando
Date: 2011-08-12 17:30:57 +0200 (Fri, 12 Aug 2011)
New Revision: 14116

Added:
   branches/Branch_5_1/tests/func/Search/
   branches/Branch_5_1/tests/func/Search/searchTest.php
Modified:
   branches/Branch_5_1/
   branches/Branch_5_1/tests/SeleniumTests.php
Log:
Added minimal testsuite for searches

Modified: branches/Branch_5_1/tests/SeleniumTests.php
===================================================================
--- branches/Branch_5_1/tests/SeleniumTests.php	2011-08-12 15:30:50 UTC (rev 14115)
+++ branches/Branch_5_1/tests/SeleniumTests.php	2011-08-12 15:30:57 UTC (rev 14116)
@@ -28,6 +28,7 @@
 		$suite->addTestFiles(glob("func/PluginsOnlineHelp/*Test.php"));
 		$suite->addTestFiles(glob("func/PluginsSvnTracker/*Test.php"));
 		$suite->addTestFiles(glob("func/RBAC/*Test.php"));
+		$suite->addTestFiles(glob("func/Search/*Test.php"));
 		$suite->addTestFiles(glob("func/Surveys/*Test.php"));
 
 		// Run any func tests available in the plugins

Added: branches/Branch_5_1/tests/func/Search/searchTest.php
===================================================================
--- branches/Branch_5_1/tests/func/Search/searchTest.php	                        (rev 0)
+++ branches/Branch_5_1/tests/func/Search/searchTest.php	2011-08-12 15:30:57 UTC (rev 14116)
@@ -0,0 +1,42 @@
+<?php
+/*
+ * Copyright 2011, Roland Mas
+ *
+ * This file is part of FusionForge.
+ *
+ * FusionForge is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; either version 2 of the License,
+ * or (at your option) any later version.
+ * 
+ * FusionForge is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+require_once dirname(dirname(__FILE__)).'/Testing/SeleniumGforge.php';
+
+class Search extends FForge_SeleniumTestCase
+{
+	function testProjectSearch()
+	{
+		$this->init();
+		$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->type("//input[@name='words']", "projecta");
+		$this->click("//input[@name='Search']");
+		$this->waitForPageToLoad("30000");
+		$this->assertFalse($this->isTextPresent("No matches found for"));
+	}
+
+}
+?>




More information about the Fusionforge-commits mailing list