[Fusionforge-commits] r11571 - in trunk/tests: . func func/Docs

Alain Peyrat aljeux at libremir.placard.fr.eu.org
Thu Nov 18 21:31:12 CET 2010


Author: aljeux
Date: 2010-11-18 21:31:12 +0100 (Thu, 18 Nov 2010)
New Revision: 11571

Added:
   trunk/tests/func/Docs/
   trunk/tests/func/Docs/createDocURLTest.php
Modified:
   trunk/tests/DEBDebian60Tests.php
   trunk/tests/RPMCentos52Tests.php
   trunk/tests/SeleniumTests.php
   trunk/tests/TarCentos52Tests.php
Log:
Tests: Add one basic test about adding & removing an URL in docman.

Modified: trunk/tests/DEBDebian60Tests.php
===================================================================
--- trunk/tests/DEBDebian60Tests.php	2010-11-18 20:31:04 UTC (rev 11570)
+++ trunk/tests/DEBDebian60Tests.php	2010-11-18 20:31:12 UTC (rev 11571)
@@ -23,6 +23,7 @@
 		if (!defined('DB_INIT_CMD')) { define('PROJECTA','true'); }
 		$suite->addTestFiles(glob("func/Trackers/*Test.php"));
 		$suite->addTestFiles(glob("func/Tasks/*Test.php"));
+		$suite->addTestFiles(glob("func/Docs/*Test.php"));
 		$suite->addTestFiles(glob("func/Forums/*Test.php"));
 		$suite->addTestFiles(glob("func/News/*Test.php"));
 		$suite->addTestFiles(glob("func/PluginsBlocks/*Test.php"));

Modified: trunk/tests/RPMCentos52Tests.php
===================================================================
--- trunk/tests/RPMCentos52Tests.php	2010-11-18 20:31:04 UTC (rev 11570)
+++ trunk/tests/RPMCentos52Tests.php	2010-11-18 20:31:12 UTC (rev 11571)
@@ -22,6 +22,7 @@
 		$suite->addTestFiles(glob("func/Site/*Test.php"));
 		$suite->addTestFiles(glob("func/Trackers/*Test.php"));
 		$suite->addTestFiles(glob("func/Tasks/*Test.php"));
+		$suite->addTestFiles(glob("func/Docs/*Test.php"));
 		$suite->addTestFiles(glob("func/Forums/*Test.php"));
 		$suite->addTestFiles(glob("func/News/*Test.php"));
 		$suite->addTestFiles(glob("func/PluginsBlocks/*Test.php"));

Modified: trunk/tests/SeleniumTests.php
===================================================================
--- trunk/tests/SeleniumTests.php	2010-11-18 20:31:04 UTC (rev 11570)
+++ trunk/tests/SeleniumTests.php	2010-11-18 20:31:12 UTC (rev 11571)
@@ -21,6 +21,7 @@
 		$suite->addTestFiles(glob("func/Site/*Test.php"));
 		$suite->addTestFiles(glob("func/Trackers/*Test.php"));
 		$suite->addTestFiles(glob("func/Tasks/*Test.php"));
+		$suite->addTestFiles(glob("func/Docs/*Test.php"));
 		$suite->addTestFiles(glob("func/Forums/*Test.php"));
 		$suite->addTestFiles(glob("func/News/*Test.php"));
 		$suite->addTestFiles(glob("func/PluginsBlocks/*Test.php"));

Modified: trunk/tests/TarCentos52Tests.php
===================================================================
--- trunk/tests/TarCentos52Tests.php	2010-11-18 20:31:04 UTC (rev 11570)
+++ trunk/tests/TarCentos52Tests.php	2010-11-18 20:31:12 UTC (rev 11571)
@@ -22,6 +22,7 @@
 		$suite->addTestFiles(glob("func/Site/*Test.php"));
 		$suite->addTestFiles(glob("func/Trackers/*Test.php"));
 		$suite->addTestFiles(glob("func/Tasks/*Test.php"));
+		$suite->addTestFiles(glob("func/Docs/*Test.php"));
 		$suite->addTestFiles(glob("func/Forums/*Test.php"));
 		$suite->addTestFiles(glob("func/News/*Test.php"));
 		$suite->addTestFiles(glob("func/PluginsBlocks/*Test.php"));

Added: trunk/tests/func/Docs/createDocURLTest.php
===================================================================
--- trunk/tests/func/Docs/createDocURLTest.php	                        (rev 0)
+++ trunk/tests/func/Docs/createDocURLTest.php	2010-11-18 20:31:12 UTC (rev 11571)
@@ -0,0 +1,73 @@
+<?php
+/*
+ * Copyright (C) 2010 Alcatel-Lucent
+ *
+ * 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 FusionForge; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */             
+
+/*              
+ * Standard Alcatel-Lucent disclaimer for contributing to open source
+ *              
+ * "The test suite ("Contribution") has not been tested and/or
+ * validated for release as or in products, combinations with products or
+ * other commercial use. Any use of the Contribution is entirely made at
+ * the user's own responsibility and the user can not rely on any features,
+ * functionalities or performances Alcatel-Lucent has attributed to the
+ * Contribution.
+ *              
+ * THE CONTRIBUTION BY ALCATEL-LUCENT IS PROVIDED AS IS, WITHOUT WARRANTY
+ * OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, COMPLIANCE,
+ * NON-INTERFERENCE AND/OR INTERWORKING WITH THE SOFTWARE TO WHICH THE
+ * CONTRIBUTION HAS BEEN MADE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * ALCATEL-LUCENT BE LIABLE FOR ANY DAMAGES OR OTHER LIABLITY, WHETHER IN
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * CONTRIBUTION OR THE USE OR OTHER DEALINGS IN THE CONTRIBUTION, WHETHER
+ * TOGETHER WITH THE SOFTWARE TO WHICH THE CONTRIBUTION RELATES OR ON A STAND
+ * ALONE BASIS."
+ */
+
+require_once dirname(dirname(__FILE__)).'/Testing/SeleniumGforge.php';
+
+class CreateDocURL extends FForge_SeleniumTestCase
+{
+	function testCreateDocURL()
+	{
+		$this->init();
+		$this->clickAndWait("link=Docs");
+		$this->clickAndWait("link=Submit new documentation");
+		$this->type("title", "My document");
+		$this->type("description", "L'année dernière à Noël, 3 < 4, 中国 \" <em>, père & fils");
+		$this->click("//input[@name='type' and @value='pasteurl']");
+		$this->type("file_url", "http://buildbot.fusionforge.org/");
+		$this->clickAndWait("submit");
+		$this->assertTextPresent("Document submitted successfully");
+		$this->assertTextPresent("My document");
+		$this->assertTextPresent("L'année dernière à Noël, 3 < 4, 中国 \" <em>, père & fils");
+//		$this->clickAndWait("link=My document");
+//		$this->assertEquals("fusionforge.org [Hudson]", $this->getTitle());
+
+		$this->gotoProject('ProjectA');
+		$this->clickAndWait("link=Docs");
+		$this->clickAndWait("link=Uncategorized Submissions");
+		$this->clickAndWait("//img[@alt='Move to trash this document']");
+		$this->assertTextPresent("Document moved to trash successfully");
+//		$this->assertTextPresent("This project has no visible documents");
+	}
+}
+?>




More information about the Fusionforge-commits mailing list