[Fusionforge-commits] r9174 - in trunk/tests: . func/Forums func/News func/Site func/Tasks func/Trackers
Alain Peyrat
aljeux at libremir.placard.fr.eu.org
Sat Mar 20 15:29:23 CET 2010
Author: aljeux
Date: 2010-03-20 15:29:23 +0100 (Sat, 20 Mar 2010)
New Revision: 9174
Added:
trunk/tests/func/Forums/forumsTest.php
trunk/tests/func/News/newsTest.php
trunk/tests/func/Site/loginTest.php
trunk/tests/func/Site/projectsTest.php
trunk/tests/func/Site/troveTest.php
trunk/tests/func/Tasks/createTaskTest.php
trunk/tests/func/Trackers/relationTest.php
trunk/tests/func/Trackers/trackersTest.php
trunk/tests/func/Trackers/workflowTest.php
Removed:
trunk/tests/func/Forums/AllTests.php
trunk/tests/func/Forums/forums.php
trunk/tests/func/News/AllTests.php
trunk/tests/func/News/news.php
trunk/tests/func/Site/AllTests.php
trunk/tests/func/Site/login.php
trunk/tests/func/Site/projects.php
trunk/tests/func/Site/trove.php
trunk/tests/func/Tasks/AllTests.php
trunk/tests/func/Tasks/createTask.php
trunk/tests/func/Trackers/AllTests.php
trunk/tests/func/Trackers/relation.php
trunk/tests/func/Trackers/trackers.php
trunk/tests/func/Trackers/workflow.php
Modified:
trunk/tests/SeleniumTests.php
Log:
Use new filesystem based layout to simplify test suite (done for func)
Modified: trunk/tests/SeleniumTests.php
===================================================================
--- trunk/tests/SeleniumTests.php 2010-03-20 14:29:16 UTC (rev 9173)
+++ trunk/tests/SeleniumTests.php 2010-03-20 14:29:23 UTC (rev 9174)
@@ -6,17 +6,6 @@
require_once 'PHPUnit/Framework.php';
require_once 'PHPUnit/TextUI/TestRunner.php';
-// Selenium based tests
-require_once 'func/Site/AllTests.php';
-require_once 'func/Trackers/AllTests.php';
-require_once 'func/Tasks/AllTests.php';
-require_once 'func/Forums/AllTests.php';
-//require_once 'PluginsWiki/AllTests.php';
-//require_once 'PluginsWebSvn/AllTests.php';
-require_once 'func/News/AllTests.php';
-//require_once 'scm/AllTests.php';
-//require_once 'docs/AllTests.php';
-
class SeleniumTests
{
public static function main()
@@ -28,16 +17,12 @@
{
$suite = new PHPUnit_Framework_TestSuite('PHPUnit');
- // Integration tests (Selenium).
- $suite->addTest(Site_AllTests::suite());
- $suite->addTest(Trackers_AllTests::suite());
- $suite->addTest(Tasks_AllTests::suite());
- $suite->addTest(Forums_AllTests::suite());
- $suite->addTest(News_AllTests::suite());
-// $suite->addTest(PluginsWiki_AllTests::suite());
-// $suite->addTest(PluginsWebSvn_AllTests::suite());
-// $suite->addTest(Scm_AllTests::suite());
-// $suite->addTest(Docs_AllTests::suite());
+ // Selenium tests
+ $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/Forums/*Test.php"));
+ $suite->addTestFiles(glob("func/News/*Test.php"));
return $suite;
}
Deleted: trunk/tests/func/Forums/AllTests.php
===================================================================
--- trunk/tests/func/Forums/AllTests.php 2010-03-20 14:29:16 UTC (rev 9173)
+++ trunk/tests/func/Forums/AllTests.php 2010-03-20 14:29:23 UTC (rev 9174)
@@ -1,76 +0,0 @@
-<?php
-/*
- * Copyright (C) 2008 Alain Peyrat <aljeux at free.fr>
- * Copyright (C) 2009 Alain Peyrat, 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."
- */
-
-if (!defined('PHPUnit_MAIN_METHOD')) {
- define('PHPUnit_MAIN_METHOD', 'Forums_AllTests::main');
-}
-
-require_once 'PHPUnit/Framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
-
-require_once dirname(__FILE__).'/forums.php';
-
-class Forums_AllTests
-{
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- $suite = new PHPUnit_Framework_TestSuite('PHPUnit Framework');
-
- $suite->addTestSuite('CreateForum');
- // ...
-
- return $suite;
- }
-}
-
-if (PHPUnit_MAIN_METHOD == 'Forums_AllTests::main') {
- Framework_AllTests::main();
-}
-?>
Deleted: trunk/tests/func/Forums/forums.php
===================================================================
--- trunk/tests/func/Forums/forums.php 2010-03-20 14:29:16 UTC (rev 9173)
+++ trunk/tests/func/Forums/forums.php 2010-03-20 14:29:23 UTC (rev 9174)
@@ -1,163 +0,0 @@
-<?php
-/*
- * Copyright (C) 2008 Alain Peyrat <aljeux at free.fr>
- * Copyright (C) 2009 Alain Peyrat, 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 'func/Testing/SeleniumGforge.php';
-
-class CreateForum extends FForge_SeleniumTestCase
-{
- function testSimplePost()
- {
- // Create the first message (Message1/Text1).
- $this->init();
- $this->click("link=Forums");
- $this->waitForPageToLoad("30000");
- $this->assertFalse($this->isTextPresent("Permission denied."));
- $this->assertTrue($this->isTextPresent("open-discussion"));
- $this->click("link=open-discussion");
- $this->waitForPageToLoad("30000");
- $this->click("link=Start New Thread");
- $this->waitForPageToLoad("30000");
- $this->type("subject", "Message1");
- $this->type("body", "Text1");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Message Posted Successfully"));
- $this->click("link=Forums");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("open-discussion"));
- $this->click("link=open-discussion");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Message1"));
- }
-
- /*
- * Simulate a click on the link from a mail.
- * As the forum is private, the users should be
- * redirected to the login prompt saying that he has
- * to login to get access to the message. Once logged,
- * he should be redirected to the given forum.
- */
- function testSimpleAccessWhenPrivate()
- {
- $this->init();
- $this->logout();
-
- $this->open( ROOT.'/forum/message.php?msg_id=3' );
- $this->waitForPageToLoad("30000");
- $this->type("form_loginname", 'admin');
- $this->type("form_pw", 'myadmin');
- $this->click("login");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Welcome to Developers"));
- }
-
- /*
- * Simulate a user non logged that will reply
- * to a message in a forum. He will be redirected
- * to the login page, then will reply and then
- * we check that his reply is present in the thread.
- */
- function testReplyToMessage()
- {
- $this->init();
- $this->logout();
-
- $this->open("/projects/projecta/");
- $this->click("link=Forums");
- $this->waitForPageToLoad("30000");
- $this->click("link=open-discussion");
- $this->waitForPageToLoad("30000");
- $this->click("link=Welcome to Open-Discussion");
- $this->waitForPageToLoad("30000");
- $this->click("link=[ reply ]");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Cookies must be enabled past this point."));
-// $this->assertEquals("ACOS Forge - Login", $this->getTitle());
- $this->type("form_loginname", "admin");
- $this->type("form_pw", 'myadmin');
- $this->click("login");
- $this->waitForPageToLoad("30000");
- $this->type("body", "Here is my 19823 reply");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Message Posted Successfully"));
- $this->click("link=Welcome to Open-Discussion");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Here is my 19823 reply"));
-
- }
-
- /*
- * Verify that it is imposible to use name already used by a mailing list
- */
- function testEmailAddressNotAlreadyUsed() {
- $this->init();
- $this->click("link=Mailing Lists");
- $this->waitForPageToLoad("30000");
- $this->click("//body/div[@id='maindiv']/p[1]/strong/a");
- $this->waitForPageToLoad("30000");
- $this->click("link=Add Mailing List");
- $this->waitForPageToLoad("30000");
- $this->type("list_name", "toto");
- $this->type("description", "Toto mailing list");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("List Added"));
- $this->click("link=Forums");
- $this->waitForPageToLoad("30000");
- $this->click("link=open-discussion");
- $this->waitForPageToLoad("30000");
- $this->click("//body/div[@id='maindiv']/p[1]/strong/a[2]");
- $this->waitForPageToLoad("30000");
- $this->click("link=Add forum");
- $this->waitForPageToLoad("30000");
- $this->type("forum_name", "toto");
- $this->type("description", "Toto forum");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Error: a mailing list with the same email address already exists"));
- }
-}
-?>
Copied: trunk/tests/func/Forums/forumsTest.php (from rev 9173, trunk/tests/func/Forums/forums.php)
===================================================================
--- trunk/tests/func/Forums/forumsTest.php (rev 0)
+++ trunk/tests/func/Forums/forumsTest.php 2010-03-20 14:29:23 UTC (rev 9174)
@@ -0,0 +1,163 @@
+<?php
+/*
+ * Copyright (C) 2008 Alain Peyrat <aljeux at free.fr>
+ * Copyright (C) 2009 Alain Peyrat, 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 'func/Testing/SeleniumGforge.php';
+
+class CreateForum extends FForge_SeleniumTestCase
+{
+ function testSimplePost()
+ {
+ // Create the first message (Message1/Text1).
+ $this->init();
+ $this->click("link=Forums");
+ $this->waitForPageToLoad("30000");
+ $this->assertFalse($this->isTextPresent("Permission denied."));
+ $this->assertTrue($this->isTextPresent("open-discussion"));
+ $this->click("link=open-discussion");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Start New Thread");
+ $this->waitForPageToLoad("30000");
+ $this->type("subject", "Message1");
+ $this->type("body", "Text1");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Message Posted Successfully"));
+ $this->click("link=Forums");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("open-discussion"));
+ $this->click("link=open-discussion");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Message1"));
+ }
+
+ /*
+ * Simulate a click on the link from a mail.
+ * As the forum is private, the users should be
+ * redirected to the login prompt saying that he has
+ * to login to get access to the message. Once logged,
+ * he should be redirected to the given forum.
+ */
+ function testSimpleAccessWhenPrivate()
+ {
+ $this->init();
+ $this->logout();
+
+ $this->open( ROOT.'/forum/message.php?msg_id=3' );
+ $this->waitForPageToLoad("30000");
+ $this->type("form_loginname", 'admin');
+ $this->type("form_pw", 'myadmin');
+ $this->click("login");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Welcome to Developers"));
+ }
+
+ /*
+ * Simulate a user non logged that will reply
+ * to a message in a forum. He will be redirected
+ * to the login page, then will reply and then
+ * we check that his reply is present in the thread.
+ */
+ function testReplyToMessage()
+ {
+ $this->init();
+ $this->logout();
+
+ $this->open("/projects/projecta/");
+ $this->click("link=Forums");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=open-discussion");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Welcome to Open-Discussion");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=[ reply ]");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Cookies must be enabled past this point."));
+// $this->assertEquals("ACOS Forge - Login", $this->getTitle());
+ $this->type("form_loginname", "admin");
+ $this->type("form_pw", 'myadmin');
+ $this->click("login");
+ $this->waitForPageToLoad("30000");
+ $this->type("body", "Here is my 19823 reply");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Message Posted Successfully"));
+ $this->click("link=Welcome to Open-Discussion");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Here is my 19823 reply"));
+
+ }
+
+ /*
+ * Verify that it is imposible to use name already used by a mailing list
+ */
+ function testEmailAddressNotAlreadyUsed() {
+ $this->init();
+ $this->click("link=Mailing Lists");
+ $this->waitForPageToLoad("30000");
+ $this->click("//body/div[@id='maindiv']/p[1]/strong/a");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Add Mailing List");
+ $this->waitForPageToLoad("30000");
+ $this->type("list_name", "toto");
+ $this->type("description", "Toto mailing list");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("List Added"));
+ $this->click("link=Forums");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=open-discussion");
+ $this->waitForPageToLoad("30000");
+ $this->click("//body/div[@id='maindiv']/p[1]/strong/a[2]");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Add forum");
+ $this->waitForPageToLoad("30000");
+ $this->type("forum_name", "toto");
+ $this->type("description", "Toto forum");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Error: a mailing list with the same email address already exists"));
+ }
+}
+?>
Deleted: trunk/tests/func/News/AllTests.php
===================================================================
--- trunk/tests/func/News/AllTests.php 2010-03-20 14:29:16 UTC (rev 9173)
+++ trunk/tests/func/News/AllTests.php 2010-03-20 14:29:23 UTC (rev 9174)
@@ -1,75 +0,0 @@
-<?php
-/*
- * Copyright (C) 2008 Alain Peyrat <aljeux at free.fr>
- * Copyright (C) 2009 Alain Peyrat, 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."
- */
-
-if (!defined('PHPUnit_MAIN_METHOD')) {
- define('PHPUnit_MAIN_METHOD', 'News_AllTests::main');
-}
-
-require_once 'PHPUnit/Framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
-
-require_once dirname(__FILE__).'/news.php';
-
-class News_AllTests
-{
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- $suite = new PHPUnit_Framework_TestSuite('PHPUnit Framework');
-
- $suite->addTestSuite('CreateNews');
-
- return $suite;
- }
-}
-
-if (PHPUnit_MAIN_METHOD == 'News_AllTests::main') {
- Framework_AllTests::main();
-}
-?>
Deleted: trunk/tests/func/News/news.php
===================================================================
--- trunk/tests/func/News/news.php 2010-03-20 14:29:16 UTC (rev 9173)
+++ trunk/tests/func/News/news.php 2010-03-20 14:29:23 UTC (rev 9174)
@@ -1,197 +0,0 @@
-<?php
-/*
- * Copyright (C) 2008 Alain Peyrat <aljeux at free.fr>
- * Copyright (C) 2009 Alain Peyrat, 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 'func/Testing/SeleniumGforge.php';
-
-class CreateNews extends FForge_SeleniumTestCase
-{
- function testMyTestCase()
- {
- $this->createProject('ProjectA');
-
- // Create a simple news.
- $this->click("link=News");
- $this->waitForPageToLoad("30000");
- $this->click("link=Submit");
- $this->waitForPageToLoad("30000");
- $this->type("summary", "First news");
- $this->type("details", "This is a simple news.");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->click("link=News");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("First news"));
- $this->click("link=First news");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("First news"));
- $this->assertTrue($this->isTextPresent("This is a simple news."));
-
- // Create a second news.
- $this->click("link=News");
- $this->waitForPageToLoad("30000");
- $this->click("link=Submit");
- $this->waitForPageToLoad("30000");
- $this->type("summary", "Second news");
- $this->type("details", "This is another text");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->click("link=News");
- $this->waitForPageToLoad("30000");
- $this->click("link=Second news");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Second news"));
- $this->assertTrue($this->isTextPresent("This is another text"));
-
- // Check that news are visible in the activity
- // TODO: Not implemented in gforge-4.6
-// $this->click("link=Activity");
-// $this->waitForPageToLoad("30000");
-// $this->assertTrue($this->isTextPresent("First news"));
-// $this->assertTrue($this->isTextPresent("Second news"));
-
- // Check modification of a news.
- $this->click("link=News");
- $this->waitForPageToLoad("30000");
- $this->click("//a[contains(@href, '" . BASE . "/news/admin/?group_id=6')]");
- $this->waitForPageToLoad("30000");
- $this->click("link=Second news");
- $this->waitForPageToLoad("30000");
- $this->type("details", "This is another text (corrected)");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->click("link=Second news");
- $this->waitForPageToLoad("30000");
- $this->click("link=News");
- $this->waitForPageToLoad("30000");
- $this->click("link=Second news");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("This is another text (corrected)"));
- $this->click("link=News");
- $this->waitForPageToLoad("30000");
- $this->click("link=Submit");
- $this->waitForPageToLoad("30000");
- $this->type("summary", "Test3");
- $this->type("details", "Special ' chars \"");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->click("link=News");
- $this->waitForPageToLoad("30000");
- $this->click("link=Test3");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Special ' chars \""));
- $this->click("link=News");
- $this->waitForPageToLoad("30000");
- $this->click("//a[contains(@href, '". BASE . "/news/admin/?group_id=6')]");
- $this->waitForPageToLoad("30000");
- $this->click("link=Test3");
- $this->waitForPageToLoad("30000");
- $this->click("document.forms[2].status[1]");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
-
- }
-
- /*
- * Test multilines news formated in HTML.
- */
- function testAcBug4100()
- {
- $this->createProject('ProjectA');
-
- // Create a simple news.
- $this->click("link=News");
- $this->waitForPageToLoad("30000");
- $this->click("link=Submit");
- $this->waitForPageToLoad("30000");
- $this->type("summary", "Multi line news");
- $this->type("details", "<p>line1</p><p>line2</p><p>line3</p><br />hello<p>line5</p>\n");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->click("link=News");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Multi line news"));
- $this->assertTrue($this->isTextPresent("line1"));
- $this->assertTrue($this->isTextPresent("line2"));
- $this->assertTrue($this->isTextPresent("line3"));
- $this->assertTrue($this->isTextPresent("hello"));
- // $this->assertFalse($this->isTextPresent("line5"));
- $this->click("link=Multi line news");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Multi line news"));
- $this->assertTrue($this->isTextPresent("line1"));
- $this->assertTrue($this->isTextPresent("line2"));
- $this->assertTrue($this->isTextPresent("line3"));
- $this->assertTrue($this->isTextPresent("hello"));
- $this->assertTrue($this->isTextPresent("line5"));
- }
-
- /*
- * Test multiple post of the news (reload).
- * Test skipped due to manual intervention required.
- */
- function skiptestPreventMultiplePost()
- {
- $this->createProject('ProjectA');
-
- // Create a simple news.
- $this->click("link=News");
- $this->waitForPageToLoad("30000");
- $this->click("link=Submit");
- $this->waitForPageToLoad("30000");
- $this->type("summary", "My ABC news");
- $this->type("details", "hello DEF with a long detail.\n");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("News Added."));
- $this->chooseOkOnNextConfirmation();
- // Problem, a confirmation window is displayed and I didn't found
- // the way to automatically click on the Ok button.
- $this->refresh();
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Error - double submit"));
- }
-
-}
-?>
Copied: trunk/tests/func/News/newsTest.php (from rev 9173, trunk/tests/func/News/news.php)
===================================================================
--- trunk/tests/func/News/newsTest.php (rev 0)
+++ trunk/tests/func/News/newsTest.php 2010-03-20 14:29:23 UTC (rev 9174)
@@ -0,0 +1,197 @@
+<?php
+/*
+ * Copyright (C) 2008 Alain Peyrat <aljeux at free.fr>
+ * Copyright (C) 2009 Alain Peyrat, 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 'func/Testing/SeleniumGforge.php';
+
+class CreateNews extends FForge_SeleniumTestCase
+{
+ function testMyTestCase()
+ {
+ $this->createProject('ProjectA');
+
+ // Create a simple news.
+ $this->click("link=News");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Submit");
+ $this->waitForPageToLoad("30000");
+ $this->type("summary", "First news");
+ $this->type("details", "This is a simple news.");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=News");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("First news"));
+ $this->click("link=First news");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("First news"));
+ $this->assertTrue($this->isTextPresent("This is a simple news."));
+
+ // Create a second news.
+ $this->click("link=News");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Submit");
+ $this->waitForPageToLoad("30000");
+ $this->type("summary", "Second news");
+ $this->type("details", "This is another text");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=News");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Second news");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Second news"));
+ $this->assertTrue($this->isTextPresent("This is another text"));
+
+ // Check that news are visible in the activity
+ // TODO: Not implemented in gforge-4.6
+// $this->click("link=Activity");
+// $this->waitForPageToLoad("30000");
+// $this->assertTrue($this->isTextPresent("First news"));
+// $this->assertTrue($this->isTextPresent("Second news"));
+
+ // Check modification of a news.
+ $this->click("link=News");
+ $this->waitForPageToLoad("30000");
+ $this->click("//a[contains(@href, '" . BASE . "/news/admin/?group_id=6')]");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Second news");
+ $this->waitForPageToLoad("30000");
+ $this->type("details", "This is another text (corrected)");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Second news");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=News");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Second news");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("This is another text (corrected)"));
+ $this->click("link=News");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Submit");
+ $this->waitForPageToLoad("30000");
+ $this->type("summary", "Test3");
+ $this->type("details", "Special ' chars \"");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=News");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Test3");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Special ' chars \""));
+ $this->click("link=News");
+ $this->waitForPageToLoad("30000");
+ $this->click("//a[contains(@href, '". BASE . "/news/admin/?group_id=6')]");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Test3");
+ $this->waitForPageToLoad("30000");
+ $this->click("document.forms[2].status[1]");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+
+ }
+
+ /*
+ * Test multilines news formated in HTML.
+ */
+ function testAcBug4100()
+ {
+ $this->createProject('ProjectA');
+
+ // Create a simple news.
+ $this->click("link=News");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Submit");
+ $this->waitForPageToLoad("30000");
+ $this->type("summary", "Multi line news");
+ $this->type("details", "<p>line1</p><p>line2</p><p>line3</p><br />hello<p>line5</p>\n");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=News");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Multi line news"));
+ $this->assertTrue($this->isTextPresent("line1"));
+ $this->assertTrue($this->isTextPresent("line2"));
+ $this->assertTrue($this->isTextPresent("line3"));
+ $this->assertTrue($this->isTextPresent("hello"));
+ // $this->assertFalse($this->isTextPresent("line5"));
+ $this->click("link=Multi line news");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Multi line news"));
+ $this->assertTrue($this->isTextPresent("line1"));
+ $this->assertTrue($this->isTextPresent("line2"));
+ $this->assertTrue($this->isTextPresent("line3"));
+ $this->assertTrue($this->isTextPresent("hello"));
+ $this->assertTrue($this->isTextPresent("line5"));
+ }
+
+ /*
+ * Test multiple post of the news (reload).
+ * Test skipped due to manual intervention required.
+ */
+ function skiptestPreventMultiplePost()
+ {
+ $this->createProject('ProjectA');
+
+ // Create a simple news.
+ $this->click("link=News");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Submit");
+ $this->waitForPageToLoad("30000");
+ $this->type("summary", "My ABC news");
+ $this->type("details", "hello DEF with a long detail.\n");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("News Added."));
+ $this->chooseOkOnNextConfirmation();
+ // Problem, a confirmation window is displayed and I didn't found
+ // the way to automatically click on the Ok button.
+ $this->refresh();
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Error - double submit"));
+ }
+
+}
+?>
Deleted: trunk/tests/func/Site/AllTests.php
===================================================================
--- trunk/tests/func/Site/AllTests.php 2010-03-20 14:29:16 UTC (rev 9173)
+++ trunk/tests/func/Site/AllTests.php 2010-03-20 14:29:23 UTC (rev 9174)
@@ -1,83 +0,0 @@
-<?php
-/*
- * Copyright (C) 2008 Alain Peyrat <aljeux at free.fr>
- * Copyright (C) 2009 Alain Peyrat, 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."
- */
-
-if (!defined('PHPUnit_MAIN_METHOD')) {
- define('PHPUnit_MAIN_METHOD', 'Site_AllTests::main');
-}
-
-require_once 'PHPUnit/Framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
-
-require_once dirname(__FILE__).'/projects.php';
-require_once dirname(__FILE__).'/top.php';
-require_once dirname(__FILE__).'/login.php';
-require_once dirname(__FILE__).'/trove.php';
-
-class Site_AllTests
-{
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- $suite = new PHPUnit_Framework_TestSuite('PHPUnit Framework');
-
- $suite->addTestSuite('CreateProject');
- $suite->addTestSuite('LoginProcess');
- $suite->addTestSuite('Trove');
-
- // FIXME: Do not run this test as it requires the cron to be launched
- // $suite->addTestSuite('Top');
-
- return $suite;
- }
-}
-
-if (PHPUnit_MAIN_METHOD == 'Site_AllTests::main') {
- Site_AllTests::main();
-}
-?>
Deleted: trunk/tests/func/Site/login.php
===================================================================
--- trunk/tests/func/Site/login.php 2010-03-20 14:29:16 UTC (rev 9173)
+++ trunk/tests/func/Site/login.php 2010-03-20 14:29:23 UTC (rev 9174)
@@ -1,93 +0,0 @@
-<?php
-/*
- * Copyright (C) 2008 Alain Peyrat <aljeux at free.fr>
- * Copyright (C) 2009 Alain Peyrat, 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 'func/Testing/SeleniumGforge.php';
-
-class LoginProcess extends FForge_SeleniumTestCase
-{
- // Simple creation of a project by the admin user and
- // approval of the creation just after.
- // After creation, project is visible on the main page.
- function testLogin()
- {
- // Test with a normal login.
- $this->open( BASE );
- $this->click("link=Log In");
- $this->waitForPageToLoad("30000");
- $this->type("form_loginname", "admin");
- $this->type("form_pw", "myadmin");
- $this->click("login");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("ACOS Forge Admin"));
- $this->assertTrue($this->isTextPresent("Log Out"));
- $this->logout();
-
- // Test with an empty password.
- $this->open( BASE );
- $this->click("link=Log In");
- $this->waitForPageToLoad("30000");
- $this->type("form_loginname", "admin");
- $this->type("form_pw", "");
- $this->click("login");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Missing Password Or Users Name"));
- $this->assertFalse($this->isTextPresent("ACOS Forge Admin"));
- $this->assertTrue($this->isTextPresent("Log In"));
-
- // Test with a wrong password.
- $this->open( BASE );
- $this->click("link=Log In");
- $this->waitForPageToLoad("30000");
- $this->type("form_loginname", "admin");
- $this->type("form_pw", "awrongpassword");
- $this->click("login");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Invalid Password Or User Name"));
- $this->assertFalse($this->isTextPresent("ACOS Forge Admin"));
- $this->assertTrue($this->isTextPresent("Log In"));
-
- }
-}
-?>
Copied: trunk/tests/func/Site/loginTest.php (from rev 9173, trunk/tests/func/Site/login.php)
===================================================================
--- trunk/tests/func/Site/loginTest.php (rev 0)
+++ trunk/tests/func/Site/loginTest.php 2010-03-20 14:29:23 UTC (rev 9174)
@@ -0,0 +1,93 @@
+<?php
+/*
+ * Copyright (C) 2008 Alain Peyrat <aljeux at free.fr>
+ * Copyright (C) 2009 Alain Peyrat, 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 'func/Testing/SeleniumGforge.php';
+
+class LoginProcess extends FForge_SeleniumTestCase
+{
+ // Simple creation of a project by the admin user and
+ // approval of the creation just after.
+ // After creation, project is visible on the main page.
+ function testLogin()
+ {
+ // Test with a normal login.
+ $this->open( BASE );
+ $this->click("link=Log In");
+ $this->waitForPageToLoad("30000");
+ $this->type("form_loginname", "admin");
+ $this->type("form_pw", "myadmin");
+ $this->click("login");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("ACOS Forge Admin"));
+ $this->assertTrue($this->isTextPresent("Log Out"));
+ $this->logout();
+
+ // Test with an empty password.
+ $this->open( BASE );
+ $this->click("link=Log In");
+ $this->waitForPageToLoad("30000");
+ $this->type("form_loginname", "admin");
+ $this->type("form_pw", "");
+ $this->click("login");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Missing Password Or Users Name"));
+ $this->assertFalse($this->isTextPresent("ACOS Forge Admin"));
+ $this->assertTrue($this->isTextPresent("Log In"));
+
+ // Test with a wrong password.
+ $this->open( BASE );
+ $this->click("link=Log In");
+ $this->waitForPageToLoad("30000");
+ $this->type("form_loginname", "admin");
+ $this->type("form_pw", "awrongpassword");
+ $this->click("login");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Invalid Password Or User Name"));
+ $this->assertFalse($this->isTextPresent("ACOS Forge Admin"));
+ $this->assertTrue($this->isTextPresent("Log In"));
+
+ }
+}
+?>
Deleted: trunk/tests/func/Site/projects.php
===================================================================
--- trunk/tests/func/Site/projects.php 2010-03-20 14:29:16 UTC (rev 9173)
+++ trunk/tests/func/Site/projects.php 2010-03-20 14:29:23 UTC (rev 9174)
@@ -1,158 +0,0 @@
-<?php
-/*
- * Copyright (C) 2008 Alain Peyrat <aljeux at free.fr>
- * Copyright (C) 2009 Alain Peyrat, 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 'func/Testing/SeleniumGforge.php';
-
-class CreateProject extends FForge_SeleniumTestCase
-{
- // Simple creation of a project by the admin user and
- // approval of the creation just after.
- // After creation, project is visible on the main page.
- function testSimpleCreate()
- {
- $this->open( BASE );
- $this->click("link=Log In");
- $this->waitForPageToLoad("30000");
- $this->type("form_loginname", "admin");
- $this->type("form_pw", "myadmin");
- $this->click("login");
- $this->waitForPageToLoad("30000");
- $this->click("link=My Page");
- $this->waitForPageToLoad("30000");
- $this->click("link=Register Project");
- $this->waitForPageToLoad("30000");
- $this->type("full_name", "ProjectA");
- $this->type("purpose", "This is a simple description for project A");
- $this->type("description", "This is the public description for project A.");
- $this->type("unix_name", "projecta");
- $this->click("//input[@name='scm' and @value='scmsvn']");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Your project has been submitted"));
- $this->assertTrue($this->isTextPresent("you will receive notification of their decision and further instructions"));
- $this->click("link=Admin");
- $this->waitForPageToLoad("30000");
- $this->click("link=Pending (P) (New Project Approval)");
- $this->waitForPageToLoad("30000");
- $this->click("document.forms['approve.projecta'].submit");
- $this->waitForPageToLoad("30000");
- $this->click("link=Home");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("ProjectA"));
- $this->click("link=ProjectA");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("This is the public description for project A."));
- $this->assertTrue($this->isTextPresent("This project has not yet categorized itself"));
- }
-
- function testCharsCreateTestCase()
- {
- $this->open( BASE );
- $this->click("link=Log In");
- $this->waitForPageToLoad("30000");
- $this->type("form_loginname", "admin");
- $this->type("form_pw", "myadmin");
- $this->click("login");
- $this->waitForPageToLoad("30000");
- $this->click("link=My Page");
- $this->waitForPageToLoad("30000");
- $this->click("link=Register Project");
- $this->waitForPageToLoad("30000");
- $this->type("full_name", "Project ' & B");
- $this->type("purpose", "This is a & été simple description for project B");
- $this->type("description", "This is & été the public description for project B.");
- $this->type("unix_name", "projectb");
- $this->click("//input[@name='scm' and @value='scmsvn']");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Your project has been submitted"));
- $this->assertTrue($this->isTextPresent("you will receive notification of their decision and further instructions"));
- $this->click("link=Admin");
- $this->waitForPageToLoad("30000");
- $this->click("link=Pending (P) (New Project Approval)");
- $this->waitForPageToLoad("30000");
- $this->click("document.forms['approve.projectb'].submit");
- $this->waitForPageToLoad("30000");
- $this->click("link=Home");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Project ' & B"));
- $this->click("link=Project ' & B");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("This is & été the public description for project B."));
-
- $this->click("link=Projects");
- $this->waitForPageToLoad("30000");
- $this->click("link=Project Tree");
- $this->waitForPageToLoad("30000");
- $this->click("link=Project List");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Project ' & B - This is & été the public description for project B."));
- $this->click("link=My Page");
- $this->waitForPageToLoad("30000");
- $this->click("//div[@id='tabber']/ul/li[5]/a");
- $this->assertFalse($this->isTextPresent("Project ' & B"));
- }
-
- // Test removal of project.
- // TODO: Test not finished as removal does not work.
- function testRemoveProject()
- {
- $this->createProject('testal1');
-
- $this->click("link=Admin");
- $this->waitForPageToLoad("30000");
- $this->click("link=Display Full Project List/Edit Projects");
- $this->waitForPageToLoad("30000");
- $this->click("link=testal1");
- $this->waitForPageToLoad("30000");
- $this->click("link=Permanently Delete Project");
- $this->waitForPageToLoad("30000");
- $this->click("sure");
- $this->click("reallysure");
- $this->click("reallyreallysure");
- $this->click("submit");
- }
-}
-?>
Copied: trunk/tests/func/Site/projectsTest.php (from rev 9173, trunk/tests/func/Site/projects.php)
===================================================================
--- trunk/tests/func/Site/projectsTest.php (rev 0)
+++ trunk/tests/func/Site/projectsTest.php 2010-03-20 14:29:23 UTC (rev 9174)
@@ -0,0 +1,158 @@
+<?php
+/*
+ * Copyright (C) 2008 Alain Peyrat <aljeux at free.fr>
+ * Copyright (C) 2009 Alain Peyrat, 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 'func/Testing/SeleniumGforge.php';
+
+class CreateProject extends FForge_SeleniumTestCase
+{
+ // Simple creation of a project by the admin user and
+ // approval of the creation just after.
+ // After creation, project is visible on the main page.
+ function testSimpleCreate()
+ {
+ $this->open( BASE );
+ $this->click("link=Log In");
+ $this->waitForPageToLoad("30000");
+ $this->type("form_loginname", "admin");
+ $this->type("form_pw", "myadmin");
+ $this->click("login");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=My Page");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Register Project");
+ $this->waitForPageToLoad("30000");
+ $this->type("full_name", "ProjectA");
+ $this->type("purpose", "This is a simple description for project A");
+ $this->type("description", "This is the public description for project A.");
+ $this->type("unix_name", "projecta");
+ $this->click("//input[@name='scm' and @value='scmsvn']");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Your project has been submitted"));
+ $this->assertTrue($this->isTextPresent("you will receive notification of their decision and further instructions"));
+ $this->click("link=Admin");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Pending (P) (New Project Approval)");
+ $this->waitForPageToLoad("30000");
+ $this->click("document.forms['approve.projecta'].submit");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Home");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("ProjectA"));
+ $this->click("link=ProjectA");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("This is the public description for project A."));
+ $this->assertTrue($this->isTextPresent("This project has not yet categorized itself"));
+ }
+
+ function testCharsCreateTestCase()
+ {
+ $this->open( BASE );
+ $this->click("link=Log In");
+ $this->waitForPageToLoad("30000");
+ $this->type("form_loginname", "admin");
+ $this->type("form_pw", "myadmin");
+ $this->click("login");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=My Page");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Register Project");
+ $this->waitForPageToLoad("30000");
+ $this->type("full_name", "Project ' & B");
+ $this->type("purpose", "This is a & été simple description for project B");
+ $this->type("description", "This is & été the public description for project B.");
+ $this->type("unix_name", "projectb");
+ $this->click("//input[@name='scm' and @value='scmsvn']");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Your project has been submitted"));
+ $this->assertTrue($this->isTextPresent("you will receive notification of their decision and further instructions"));
+ $this->click("link=Admin");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Pending (P) (New Project Approval)");
+ $this->waitForPageToLoad("30000");
+ $this->click("document.forms['approve.projectb'].submit");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Home");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Project ' & B"));
+ $this->click("link=Project ' & B");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("This is & été the public description for project B."));
+
+ $this->click("link=Projects");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Project Tree");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Project List");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Project ' & B - This is & été the public description for project B."));
+ $this->click("link=My Page");
+ $this->waitForPageToLoad("30000");
+ $this->click("//div[@id='tabber']/ul/li[5]/a");
+ $this->assertFalse($this->isTextPresent("Project ' & B"));
+ }
+
+ // Test removal of project.
+ // TODO: Test not finished as removal does not work.
+ function testRemoveProject()
+ {
+ $this->createProject('testal1');
+
+ $this->click("link=Admin");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Display Full Project List/Edit Projects");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=testal1");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Permanently Delete Project");
+ $this->waitForPageToLoad("30000");
+ $this->click("sure");
+ $this->click("reallysure");
+ $this->click("reallyreallysure");
+ $this->click("submit");
+ }
+}
+?>
Deleted: trunk/tests/func/Site/trove.php
===================================================================
--- trunk/tests/func/Site/trove.php 2010-03-20 14:29:16 UTC (rev 9173)
+++ trunk/tests/func/Site/trove.php 2010-03-20 14:29:23 UTC (rev 9174)
@@ -1,74 +0,0 @@
-<?php
-/*
- * Copyright (C) 2009 Alain Peyrat <aljeux at free.fr>
- *
- * 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
- */
-
-require_once 'func/Testing/SeleniumGforge.php';
-
-class Trove extends FForge_SeleniumTestCase
-{
- function testTroveAdmin()
- {
- $this->open( BASE );
- $this->login('admin');
- $this->click("link=Admin");
- $this->waitForPageToLoad("30000");
- $this->click("link=Display Trove Map");
- $this->waitForPageToLoad("30000");
-
- // Test simple modification of an entry (beta => beta2)
- $this->click("//a[contains(@href, 'trove_cat_edit.php?trove_cat_id=10')]");
- $this->waitForPageToLoad("30000");
- $this->type("form_shortname", "beta2");
- $this->type("form_fullname", "4 - Beta2");
- $this->type("form_description", "Resource2 is in late phases of development. Deliverables are essentially complete, but may still have significant bugs.");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("4 - Beta2"));
-
- // Test removal of an entry (beta2) (leaf)
- $this->click("//a[contains(@href, 'trove_cat_edit.php?trove_cat_id=10')]");
- $this->waitForPageToLoad("30000");
- $this->click("delete");
- $this->waitForPageToLoad("30000");
- $this->assertFalse($this->isTextPresent("4 - Beta2"));
-
- // Test creation of a new entry (test)
- $this->click("link=Admin");
- $this->waitForPageToLoad("30000");
- $this->click("link=Add to the Trove Map");
- $this->waitForPageToLoad("30000");
- $this->type("form_shortname", "Test");
- $this->type("form_fullname", "Test");
- $this->type("form_description", "This is a test");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Test"));
-
- // Test removal of a non empty entry (Microsoft).
- $this->click("//a[contains(@href, 'trove_cat_edit.php?trove_cat_id=214')]");
- $this->waitForPageToLoad("30000");
- $this->click("delete");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Test"));
- $this->assertFalse($this->isTextPresent("Microsoft"));
- }
-}
-?>
Copied: trunk/tests/func/Site/troveTest.php (from rev 9173, trunk/tests/func/Site/trove.php)
===================================================================
--- trunk/tests/func/Site/troveTest.php (rev 0)
+++ trunk/tests/func/Site/troveTest.php 2010-03-20 14:29:23 UTC (rev 9174)
@@ -0,0 +1,74 @@
+<?php
+/*
+ * Copyright (C) 2009 Alain Peyrat <aljeux at free.fr>
+ *
+ * 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
+ */
+
+require_once 'func/Testing/SeleniumGforge.php';
+
+class Trove extends FForge_SeleniumTestCase
+{
+ function testTroveAdmin()
+ {
+ $this->open( BASE );
+ $this->login('admin');
+ $this->click("link=Admin");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Display Trove Map");
+ $this->waitForPageToLoad("30000");
+
+ // Test simple modification of an entry (beta => beta2)
+ $this->click("//a[contains(@href, 'trove_cat_edit.php?trove_cat_id=10')]");
+ $this->waitForPageToLoad("30000");
+ $this->type("form_shortname", "beta2");
+ $this->type("form_fullname", "4 - Beta2");
+ $this->type("form_description", "Resource2 is in late phases of development. Deliverables are essentially complete, but may still have significant bugs.");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("4 - Beta2"));
+
+ // Test removal of an entry (beta2) (leaf)
+ $this->click("//a[contains(@href, 'trove_cat_edit.php?trove_cat_id=10')]");
+ $this->waitForPageToLoad("30000");
+ $this->click("delete");
+ $this->waitForPageToLoad("30000");
+ $this->assertFalse($this->isTextPresent("4 - Beta2"));
+
+ // Test creation of a new entry (test)
+ $this->click("link=Admin");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Add to the Trove Map");
+ $this->waitForPageToLoad("30000");
+ $this->type("form_shortname", "Test");
+ $this->type("form_fullname", "Test");
+ $this->type("form_description", "This is a test");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Test"));
+
+ // Test removal of a non empty entry (Microsoft).
+ $this->click("//a[contains(@href, 'trove_cat_edit.php?trove_cat_id=214')]");
+ $this->waitForPageToLoad("30000");
+ $this->click("delete");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Test"));
+ $this->assertFalse($this->isTextPresent("Microsoft"));
+ }
+}
+?>
Deleted: trunk/tests/func/Tasks/AllTests.php
===================================================================
--- trunk/tests/func/Tasks/AllTests.php 2010-03-20 14:29:16 UTC (rev 9173)
+++ trunk/tests/func/Tasks/AllTests.php 2010-03-20 14:29:23 UTC (rev 9174)
@@ -1,75 +0,0 @@
-<?php
-/*
- * Copyright (C) 2008 Alain Peyrat <aljeux at free.fr>
- * Copyright (C) 2009 Alain Peyrat, 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."
- */
-
-if (!defined('PHPUnit_MAIN_METHOD')) {
- define('PHPUnit_MAIN_METHOD', 'Tasks_AllTests::main');
-}
-
-require_once 'PHPUnit/Framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
-
-require_once dirname(__FILE__).'/createTask.php';
-
-class Tasks_AllTests
-{
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- $suite = new PHPUnit_Framework_TestSuite('PHPUnit Framework');
-
- $suite->addTestSuite('CreateTask');
-
- return $suite;
- }
-}
-
-if (PHPUnit_MAIN_METHOD == 'Tasks_AllTests::main') {
- Framework_AllTests::main();
-}
-?>
Deleted: trunk/tests/func/Tasks/createTask.php
===================================================================
--- trunk/tests/func/Tasks/createTask.php 2010-03-20 14:29:16 UTC (rev 9173)
+++ trunk/tests/func/Tasks/createTask.php 2010-03-20 14:29:23 UTC (rev 9174)
@@ -1,471 +0,0 @@
-<?php
-/*
- * Copyright (C) 2010 Alain Peyrat, 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 'func/Testing/SeleniumGforge.php';
-
-class CreateTask extends FForge_SeleniumTestCase
-{
- function testcreateTask()
- {
- $this->setUpTasks();
- $this->createSomeTasks();
- // $this->browseTasks();
- $this->setTaskPriority();
- $this->completeTask();
- $this->closeTask();
- $this->deleteTask();
- // $this->assignTask();
- $this->orderTask();
- $this->registerEmailAddressForNotification();
- // $this->createSubproject();
- // $this->createPrivateSubproject();
- $this->displayGANTT();
- //$this->displayActivityReportByDeveloper();
- //$this->displayActivityReportBySubproject();
- $this->exportCSV();
- }
-
- function setUpTasks()
- {
- $this->init();
-
- // Initialize "rep_time_tracking" table
- $this->click("link=Reporting");
- $this->waitForPageToLoad("30000");
-
- $this->click("link=Initialize / Rebuild Reporting Tables");
- $this->waitForPageToLoad("30000");
- $this->click("im_sure");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
-
-// $this->switchUser('uadmin');
- $this->open( ROOT );
- $this->waitForPageToLoad("30000");
- $this->click("link=ProjectA");
- $this->waitForPageToLoad("30000");
-
- $this->click("link=Task Manager");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("To Do"));
- $this->assertTrue($this->isTextPresent("Next Release"));
- $this->click("link=To Do");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("No Matching Tasks found"));
- }
-
- function createSomeTasks()
- {
- // Create a first task
- $this->click("link=Add task");
- $this->waitForPageToLoad("30000");
- $this->type("summary", "Task1: Hello Paris");
- $this->type("details", "Details: Hello Paris");
- $this->type("hours", "10");
- $this->click("//body/div[@id='maindiv']/form/table/tbody/tr[9]/td/input");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Task Created Successfully"));
-
- // Create a second task
- $this->click("link=Add task");
- $this->waitForPageToLoad("30000");
- $this->type("summary", "Task2: Hello France");
- $this->type("details", "Details: Hello France");
- $this->type("hours", "15");
- $this->click("//body/div[@id='maindiv']/form/table/tbody/tr[9]/td/input");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Task Created Successfully"));
-
- // Create a third task
- $this->click("link=Add task");
- $this->waitForPageToLoad("30000");
- $this->type("summary", "Task3: Hello World");
- $this->type("details", "Details: Hello World");
- $this->type("hours", "20");
- $this->click("//body/div[@id='maindiv']/form/table/tbody/tr[9]/td/input");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Task Created Successfully"));
- }
-
- function browseTasks()
- {
- // Let us check that the 3 tasks appear on the list of tasks
- $this->click("link=Tasks");
- $this->waitForPageToLoad("30000");
- $this->click("link=To Do");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Task1: Hello Paris"));
- $this->assertTrue($this->isTextPresent("Task2: Hello France"));
- $this->assertTrue($this->isTextPresent("Task3: Hello World"));
-
- // Let us assign tasks to users so that we can filter by assignee
- $this->click("link=exact:Task1: Hello Paris");
- $this->waitForPageToLoad("30000");
- $this->removeSelection("assigned_to[]", "label=None");
- $this->addSelection("assigned_to[]", "label=ucoredev Lastname");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->click("link=exact:Task2: Hello France");
- $this->waitForPageToLoad("30000");
- $this->removeSelection("assigned_to[]", "label=None");
- $this->addSelection("assigned_to[]", "label=ucontrib Lastname");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->click("link=exact:Task3: Hello World");
- $this->waitForPageToLoad("30000");
- $this->removeSelection("assigned_to[]", "label=None");
- $this->addSelection("assigned_to[]", "label=ucontrib Lastname");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
-
- // There should not be unassigned tasks
- $this->select("_assigned_to", "label=Unassigned");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("No Matching Tasks found"));
-
- // Tasks 2 and 3 should be assigned to ucontrib
- $this->select("_assigned_to", "label=ucontrib Lastname");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Task2:"));
- $this->assertTrue($this->isTextPresent("Task3:"));
-
- // Task 1 should be assigned to ucoredev
- $this->select("_assigned_to", "label=ucoredev Lastname");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Task1:"));
-
- // "Any" should show the 3 tasks
- $this->select("_assigned_to", "label=Any");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Task1:"));
- $this->assertTrue($this->isTextPresent("Task2:"));
- $this->assertTrue($this->isTextPresent("Task3:"));
-
- // Let use close a task to sort by status
- $this->click("link=exact:Task1: Hello Paris");
- $this->waitForPageToLoad("30000");
- $this->click("status_id");
- $this->select("status_id", "label=Closed");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
-
- // Select open tasks
- $this->select("_status", "label=Open");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Task2:"));
- $this->assertTrue($this->isTextPresent("Task3:"));
-
- // Select closed tasks
- $this->select("_status", "label=Closed");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Task1:"));
-
- // Select "Any" status
- $this->select("_status", "label=Any");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Task1:"));
- $this->assertTrue($this->isTextPresent("Task2:"));
- $this->assertTrue($this->isTextPresent("Task3:"));
-
- // Let us add categories to sort by category
- $this->click("link=Admin");
- $this->waitForPageToLoad("30000");
- $this->click("link=Add/Edit Categories");
- $this->waitForPageToLoad("30000");
- $this->type("name", "mycategory");
- $this->click("post_changes");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Category Inserted"));
- $this->type("name", "yourcategory");
- $this->click("post_changes");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Category Inserted"));
- $this->assertTrue($this->isTextPresent("mycategory"));
- $this->assertTrue($this->isTextPresent("yourcategory"));
-
- // Set Task1 to mycategory
- $this->click("link=To Do: Browse tasks");
- $this->waitForPageToLoad("30000");
- $this->click("link=exact:Task1: Hello Paris");
- $this->waitForPageToLoad("30000");
- $this->select("category_id", "label=mycategory");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
-
- // Set Task2 to yourcategory
- $this->click("link=To Do: Browse tasks");
- $this->waitForPageToLoad("30000");
- $this->click("link=exact:Task2: Hello France");
- $this->waitForPageToLoad("30000");
- $this->select("category_id", "label=yourcategory");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
-
- // Select "Any" category
- $this->select("_category_id", "label=Any");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->select("_order", "label=Task Summary");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Task1:"));
- $this->assertTrue($this->isTextPresent("Task2:"));
- $this->assertTrue($this->isTextPresent("Task3:"));
-
- // Select "mycategory" category
- $this->select("_category_id", "label=mycategory");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Task1:"));
- $this->assertFalse($this->isTextPresent("Task2:"));
- $this->assertFalse($this->isTextPresent("Task3:"));
-
- // Select "yourcategory" category
- $this->select("_category_id", "label=yourcategory");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->assertFalse($this->isTextPresent("Task1:"));
- $this->assertTrue($this->isTextPresent("Task2:"));
- $this->assertFalse($this->isTextPresent("Task3:"));
-
- // Set Detail view to Detailed
- $this->click("link=To Do: Browse tasks");
- $this->waitForPageToLoad("30000");
- $this->select("_category_id", "label=Any");
- $this->select("_view", "label=Detailed");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Details: Hello Paris"));
- $this->assertTrue($this->isTextPresent("Details: Hello France"));
- $this->assertTrue($this->isTextPresent("Details: Hello World"));
-
- // Set Detail view to Summary
- $this->select("_view", "label=Summary");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->assertFalse($this->isTextPresent("Details: Hello"));
-
- }
-
- function setTaskPriority()
- {
- // Set the priority of a task
- $this->click("link=exact:Task2: Hello France");
- $this->waitForPageToLoad("30000");
- $this->select("priority", "label=5 - Highest");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
-
- // Check the priority is OK
- $this->click("link=exact:Task2: Hello France");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Highest"));
- }
-
- function completeTask()
- {
- // Set the completing value of a task
- $this->select("percent_complete", "label=45%");
- $this->click("//option[@value='45']");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Task Updated Successfully"));
-
- // Check the percentage is OK
- $this->click("link=exact:Task2: Hello France");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("45%"));
- }
-
- function closeTask()
- {
- // Done in browseTasks()
- }
-
- function deleteTask()
- {
- // Delete a task
- $this->click("link=To Do: Browse tasks");
- $this->waitForPageToLoad("30000");
- $this->click("link=exact:Task3: Hello World");
- $this->waitForPageToLoad("30000");
- $this->click("link=Delete this task");
- $this->waitForPageToLoad("30000");
- $this->click("confirm_delete");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Task Successfully Deleted"));
-
- // Let us check that Task3 no longer appears on the list of tasks
- $this->click("link=Tasks");
- $this->waitForPageToLoad("30000");
- $this->click("link=To Do");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Task1: Hello Paris"));
- $this->assertTrue($this->isTextPresent("Task2: Hello France"));
- $this->assertFalse($this->isTextPresent("Task3: Hello World"));
- }
-
- function assignTask()
- {
- $this->open("/pm/task.php?group_id=6&group_project_id=2");
- $this->click("link=exact:Task1: Hello Paris");
- $this->waitForPageToLoad("30000");
- $this->addSelection("assigned_to[]", "label=ucontrib Lastname");
- $this->removeSelection("assigned_to[]", "label=ucoredev Lastname");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
-
- $this->switchUser('ucontrib');
- $this->open( ROOT );
- $this->waitForPageToLoad("30000");
- $this->click("link=ProjectA");
- $this->waitForPageToLoad("30000");
- $this->click("link=My Page");
- $this->waitForPageToLoad("30000");
- // You cannot click on "Assigned Tasks" tabs,
- // but the text is present in the page anyway.
- // $this->click("link=Assigned Tasks");
- $this->assertTrue($this->isTextPresent("Task2: Hello France"));
- $this->switchUser('uadmin');
- $this->open( ROOT );
- $this->waitForPageToLoad("30000");
- }
-
- function orderTask()
- {
- }
-
- function registerEmailAddressForNotification()
- {
- }
-
- function createSubproject()
- {
- $this->open("/pm/task.php?group_id=6");
- $this->click("link=Project Admin");
- $this->waitForPageToLoad("30000");
- $this->click("link=Tools");
- $this->waitForPageToLoad("30000");
- $this->click("link=Task Manager Admin");
- $this->waitForPageToLoad("30000");
- $this->click("link=Add a Subproject");
- $this->waitForPageToLoad("30000");
- $this->type("project_name", "public");
- $this->type("description", "This is a public subproject");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Subproject Inserted"));
- $this->click("link=Task Manager");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("This is a public subproject"));
- }
-
- function createPrivateSubproject()
- {
- $this->open("/pm/task.php?group_id=6");
- $this->click("link=Project Admin");
- $this->waitForPageToLoad("30000");
- $this->click("link=Tools");
- $this->waitForPageToLoad("30000");
- $this->click("link=Task Manager Admin");
- $this->waitForPageToLoad("30000");
- $this->click("link=Add a Subproject");
- $this->waitForPageToLoad("30000");
- $this->click("//input[@name='is_public' and @value='0']");
- $this->type("project_name", "private");
- $this->type("description", "This is a private subproject");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Subproject Inserted"));
- $this->click("link=Task Manager");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("This is a private subproject"));
- }
-
- function displayGANTT()
- {
- // Display GANTT diagram
- $this->click("link=Tasks");
- $this->waitForPageToLoad("30000");
- $this->click("link=To Do");
- $this->waitForPageToLoad("30000");
- $this->click("link=Gantt Chart");
- $this->waitForPopUp("Gantt_Chart", "30000");
- }
-
- function displayActivityReportByDeveloper()
- {
- // Display activity report by developer
- $this->click("link=Reporting");
- $this->waitForPageToLoad("30000");
- $this->select("what", "label=Report by Assignee");
- $this->click("//input[@value='Show']");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Tasks By Assignee"));
- $this->assertTrue($this->isTextPresent("ucontrib"));
- $this->assertFalse($this->isTextPresent("ucoredev"));
- }
-
- function displayActivityReportBySubproject()
- {
- // Display activity report by subproject
- $this->select("what", "label=Report by Subproject");
- $this->click("//input[@value='Show']");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Tasks By Category"));
- $this->assertTrue($this->isTextPresent("To Do"));
- }
-
- function exportCSV()
- {
- }
-}
-?>
Copied: trunk/tests/func/Tasks/createTaskTest.php (from rev 9173, trunk/tests/func/Tasks/createTask.php)
===================================================================
--- trunk/tests/func/Tasks/createTaskTest.php (rev 0)
+++ trunk/tests/func/Tasks/createTaskTest.php 2010-03-20 14:29:23 UTC (rev 9174)
@@ -0,0 +1,471 @@
+<?php
+/*
+ * Copyright (C) 2010 Alain Peyrat, 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 'func/Testing/SeleniumGforge.php';
+
+class CreateTask extends FForge_SeleniumTestCase
+{
+ function testcreateTask()
+ {
+ $this->setUpTasks();
+ $this->createSomeTasks();
+ // $this->browseTasks();
+ $this->setTaskPriority();
+ $this->completeTask();
+ $this->closeTask();
+ $this->deleteTask();
+ // $this->assignTask();
+ $this->orderTask();
+ $this->registerEmailAddressForNotification();
+ // $this->createSubproject();
+ // $this->createPrivateSubproject();
+ $this->displayGANTT();
+ //$this->displayActivityReportByDeveloper();
+ //$this->displayActivityReportBySubproject();
+ $this->exportCSV();
+ }
+
+ function setUpTasks()
+ {
+ $this->init();
+
+ // Initialize "rep_time_tracking" table
+ $this->click("link=Reporting");
+ $this->waitForPageToLoad("30000");
+
+ $this->click("link=Initialize / Rebuild Reporting Tables");
+ $this->waitForPageToLoad("30000");
+ $this->click("im_sure");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+
+// $this->switchUser('uadmin');
+ $this->open( ROOT );
+ $this->waitForPageToLoad("30000");
+ $this->click("link=ProjectA");
+ $this->waitForPageToLoad("30000");
+
+ $this->click("link=Task Manager");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("To Do"));
+ $this->assertTrue($this->isTextPresent("Next Release"));
+ $this->click("link=To Do");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("No Matching Tasks found"));
+ }
+
+ function createSomeTasks()
+ {
+ // Create a first task
+ $this->click("link=Add task");
+ $this->waitForPageToLoad("30000");
+ $this->type("summary", "Task1: Hello Paris");
+ $this->type("details", "Details: Hello Paris");
+ $this->type("hours", "10");
+ $this->click("//body/div[@id='maindiv']/form/table/tbody/tr[9]/td/input");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Task Created Successfully"));
+
+ // Create a second task
+ $this->click("link=Add task");
+ $this->waitForPageToLoad("30000");
+ $this->type("summary", "Task2: Hello France");
+ $this->type("details", "Details: Hello France");
+ $this->type("hours", "15");
+ $this->click("//body/div[@id='maindiv']/form/table/tbody/tr[9]/td/input");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Task Created Successfully"));
+
+ // Create a third task
+ $this->click("link=Add task");
+ $this->waitForPageToLoad("30000");
+ $this->type("summary", "Task3: Hello World");
+ $this->type("details", "Details: Hello World");
+ $this->type("hours", "20");
+ $this->click("//body/div[@id='maindiv']/form/table/tbody/tr[9]/td/input");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Task Created Successfully"));
+ }
+
+ function browseTasks()
+ {
+ // Let us check that the 3 tasks appear on the list of tasks
+ $this->click("link=Tasks");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=To Do");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Task1: Hello Paris"));
+ $this->assertTrue($this->isTextPresent("Task2: Hello France"));
+ $this->assertTrue($this->isTextPresent("Task3: Hello World"));
+
+ // Let us assign tasks to users so that we can filter by assignee
+ $this->click("link=exact:Task1: Hello Paris");
+ $this->waitForPageToLoad("30000");
+ $this->removeSelection("assigned_to[]", "label=None");
+ $this->addSelection("assigned_to[]", "label=ucoredev Lastname");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=exact:Task2: Hello France");
+ $this->waitForPageToLoad("30000");
+ $this->removeSelection("assigned_to[]", "label=None");
+ $this->addSelection("assigned_to[]", "label=ucontrib Lastname");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=exact:Task3: Hello World");
+ $this->waitForPageToLoad("30000");
+ $this->removeSelection("assigned_to[]", "label=None");
+ $this->addSelection("assigned_to[]", "label=ucontrib Lastname");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+
+ // There should not be unassigned tasks
+ $this->select("_assigned_to", "label=Unassigned");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("No Matching Tasks found"));
+
+ // Tasks 2 and 3 should be assigned to ucontrib
+ $this->select("_assigned_to", "label=ucontrib Lastname");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Task2:"));
+ $this->assertTrue($this->isTextPresent("Task3:"));
+
+ // Task 1 should be assigned to ucoredev
+ $this->select("_assigned_to", "label=ucoredev Lastname");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Task1:"));
+
+ // "Any" should show the 3 tasks
+ $this->select("_assigned_to", "label=Any");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Task1:"));
+ $this->assertTrue($this->isTextPresent("Task2:"));
+ $this->assertTrue($this->isTextPresent("Task3:"));
+
+ // Let use close a task to sort by status
+ $this->click("link=exact:Task1: Hello Paris");
+ $this->waitForPageToLoad("30000");
+ $this->click("status_id");
+ $this->select("status_id", "label=Closed");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+
+ // Select open tasks
+ $this->select("_status", "label=Open");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Task2:"));
+ $this->assertTrue($this->isTextPresent("Task3:"));
+
+ // Select closed tasks
+ $this->select("_status", "label=Closed");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Task1:"));
+
+ // Select "Any" status
+ $this->select("_status", "label=Any");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Task1:"));
+ $this->assertTrue($this->isTextPresent("Task2:"));
+ $this->assertTrue($this->isTextPresent("Task3:"));
+
+ // Let us add categories to sort by category
+ $this->click("link=Admin");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Add/Edit Categories");
+ $this->waitForPageToLoad("30000");
+ $this->type("name", "mycategory");
+ $this->click("post_changes");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Category Inserted"));
+ $this->type("name", "yourcategory");
+ $this->click("post_changes");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Category Inserted"));
+ $this->assertTrue($this->isTextPresent("mycategory"));
+ $this->assertTrue($this->isTextPresent("yourcategory"));
+
+ // Set Task1 to mycategory
+ $this->click("link=To Do: Browse tasks");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=exact:Task1: Hello Paris");
+ $this->waitForPageToLoad("30000");
+ $this->select("category_id", "label=mycategory");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+
+ // Set Task2 to yourcategory
+ $this->click("link=To Do: Browse tasks");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=exact:Task2: Hello France");
+ $this->waitForPageToLoad("30000");
+ $this->select("category_id", "label=yourcategory");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+
+ // Select "Any" category
+ $this->select("_category_id", "label=Any");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->select("_order", "label=Task Summary");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Task1:"));
+ $this->assertTrue($this->isTextPresent("Task2:"));
+ $this->assertTrue($this->isTextPresent("Task3:"));
+
+ // Select "mycategory" category
+ $this->select("_category_id", "label=mycategory");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Task1:"));
+ $this->assertFalse($this->isTextPresent("Task2:"));
+ $this->assertFalse($this->isTextPresent("Task3:"));
+
+ // Select "yourcategory" category
+ $this->select("_category_id", "label=yourcategory");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->assertFalse($this->isTextPresent("Task1:"));
+ $this->assertTrue($this->isTextPresent("Task2:"));
+ $this->assertFalse($this->isTextPresent("Task3:"));
+
+ // Set Detail view to Detailed
+ $this->click("link=To Do: Browse tasks");
+ $this->waitForPageToLoad("30000");
+ $this->select("_category_id", "label=Any");
+ $this->select("_view", "label=Detailed");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Details: Hello Paris"));
+ $this->assertTrue($this->isTextPresent("Details: Hello France"));
+ $this->assertTrue($this->isTextPresent("Details: Hello World"));
+
+ // Set Detail view to Summary
+ $this->select("_view", "label=Summary");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->assertFalse($this->isTextPresent("Details: Hello"));
+
+ }
+
+ function setTaskPriority()
+ {
+ // Set the priority of a task
+ $this->click("link=exact:Task2: Hello France");
+ $this->waitForPageToLoad("30000");
+ $this->select("priority", "label=5 - Highest");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+
+ // Check the priority is OK
+ $this->click("link=exact:Task2: Hello France");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Highest"));
+ }
+
+ function completeTask()
+ {
+ // Set the completing value of a task
+ $this->select("percent_complete", "label=45%");
+ $this->click("//option[@value='45']");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Task Updated Successfully"));
+
+ // Check the percentage is OK
+ $this->click("link=exact:Task2: Hello France");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("45%"));
+ }
+
+ function closeTask()
+ {
+ // Done in browseTasks()
+ }
+
+ function deleteTask()
+ {
+ // Delete a task
+ $this->click("link=To Do: Browse tasks");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=exact:Task3: Hello World");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Delete this task");
+ $this->waitForPageToLoad("30000");
+ $this->click("confirm_delete");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Task Successfully Deleted"));
+
+ // Let us check that Task3 no longer appears on the list of tasks
+ $this->click("link=Tasks");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=To Do");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Task1: Hello Paris"));
+ $this->assertTrue($this->isTextPresent("Task2: Hello France"));
+ $this->assertFalse($this->isTextPresent("Task3: Hello World"));
+ }
+
+ function assignTask()
+ {
+ $this->open("/pm/task.php?group_id=6&group_project_id=2");
+ $this->click("link=exact:Task1: Hello Paris");
+ $this->waitForPageToLoad("30000");
+ $this->addSelection("assigned_to[]", "label=ucontrib Lastname");
+ $this->removeSelection("assigned_to[]", "label=ucoredev Lastname");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+
+ $this->switchUser('ucontrib');
+ $this->open( ROOT );
+ $this->waitForPageToLoad("30000");
+ $this->click("link=ProjectA");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=My Page");
+ $this->waitForPageToLoad("30000");
+ // You cannot click on "Assigned Tasks" tabs,
+ // but the text is present in the page anyway.
+ // $this->click("link=Assigned Tasks");
+ $this->assertTrue($this->isTextPresent("Task2: Hello France"));
+ $this->switchUser('uadmin');
+ $this->open( ROOT );
+ $this->waitForPageToLoad("30000");
+ }
+
+ function orderTask()
+ {
+ }
+
+ function registerEmailAddressForNotification()
+ {
+ }
+
+ function createSubproject()
+ {
+ $this->open("/pm/task.php?group_id=6");
+ $this->click("link=Project Admin");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Tools");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Task Manager Admin");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Add a Subproject");
+ $this->waitForPageToLoad("30000");
+ $this->type("project_name", "public");
+ $this->type("description", "This is a public subproject");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Subproject Inserted"));
+ $this->click("link=Task Manager");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("This is a public subproject"));
+ }
+
+ function createPrivateSubproject()
+ {
+ $this->open("/pm/task.php?group_id=6");
+ $this->click("link=Project Admin");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Tools");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Task Manager Admin");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Add a Subproject");
+ $this->waitForPageToLoad("30000");
+ $this->click("//input[@name='is_public' and @value='0']");
+ $this->type("project_name", "private");
+ $this->type("description", "This is a private subproject");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Subproject Inserted"));
+ $this->click("link=Task Manager");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("This is a private subproject"));
+ }
+
+ function displayGANTT()
+ {
+ // Display GANTT diagram
+ $this->click("link=Tasks");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=To Do");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Gantt Chart");
+ $this->waitForPopUp("Gantt_Chart", "30000");
+ }
+
+ function displayActivityReportByDeveloper()
+ {
+ // Display activity report by developer
+ $this->click("link=Reporting");
+ $this->waitForPageToLoad("30000");
+ $this->select("what", "label=Report by Assignee");
+ $this->click("//input[@value='Show']");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Tasks By Assignee"));
+ $this->assertTrue($this->isTextPresent("ucontrib"));
+ $this->assertFalse($this->isTextPresent("ucoredev"));
+ }
+
+ function displayActivityReportBySubproject()
+ {
+ // Display activity report by subproject
+ $this->select("what", "label=Report by Subproject");
+ $this->click("//input[@value='Show']");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Tasks By Category"));
+ $this->assertTrue($this->isTextPresent("To Do"));
+ }
+
+ function exportCSV()
+ {
+ }
+}
+?>
Deleted: trunk/tests/func/Trackers/AllTests.php
===================================================================
--- trunk/tests/func/Trackers/AllTests.php 2010-03-20 14:29:16 UTC (rev 9173)
+++ trunk/tests/func/Trackers/AllTests.php 2010-03-20 14:29:23 UTC (rev 9174)
@@ -1,37 +0,0 @@
-<?php
-if (!defined('PHPUnit_MAIN_METHOD')) {
- define('PHPUnit_MAIN_METHOD', 'Trackers_AllTests::main');
-}
-
-require_once 'PHPUnit/Framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
-
-require_once dirname(__FILE__).'/trackers.php';
-require_once dirname(__FILE__).'/workflow.php';
-require_once dirname(__FILE__).'/relation.php';
-// ...
-
-class Trackers_AllTests
-{
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- $suite = new PHPUnit_Framework_TestSuite('PHPUnit Framework');
-
- $suite->addTestSuite('CreateTracker');
- $suite->addTestSuite('CreateTrackerWorkflow');
- $suite->addTestSuite('CreateTrackerRelation');
- // ...
-
- return $suite;
- }
-}
-
-if (PHPUnit_MAIN_METHOD == 'Trackers_AllTests::main') {
- Framework_AllTests::main();
-}
-?>
\ No newline at end of file
Deleted: trunk/tests/func/Trackers/relation.php
===================================================================
--- trunk/tests/func/Trackers/relation.php 2010-03-20 14:29:16 UTC (rev 9173)
+++ trunk/tests/func/Trackers/relation.php 2010-03-20 14:29:23 UTC (rev 9174)
@@ -1,74 +0,0 @@
-<?php
-/*
- * Copyright (C) 2008 Alain Peyrat <aljeux at free.fr>
- * Copyright (C) 2009 Alain Peyrat, 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 'func/Testing/SeleniumGforge.php';
-
-class CreateTrackerRelation extends FForge_SeleniumTestCase
-{
- function testCreateRelation()
- {
- $this->createProject('ProjectA');
-
- // Testing extra-fields
- $this->open( BASE );
- $this->click("link=ProjectA");
- $this->waitForPageToLoad("30000");
- $this->click("link=Tracker");
- $this->waitForPageToLoad("30000");
- $this->click("link=Bugs");
- $this->waitForPageToLoad("30000");
- $this->click("//a[contains(@href, '".BASE. "/tracker/admin/?group_id=6&atid=101')]");
- $this->waitForPageToLoad("30000");
- $this->click("link=Manage Custom Fields");
- $this->waitForPageToLoad("30000");
- $this->type("name", "Depends on");
- $this->type("alias", "depends_on");
- $this->click("document.forms[2].field_type[7]");
- $this->click("post_changes");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Depends on"));
- }
-}
-?>
Copied: trunk/tests/func/Trackers/relationTest.php (from rev 9173, trunk/tests/func/Trackers/relation.php)
===================================================================
--- trunk/tests/func/Trackers/relationTest.php (rev 0)
+++ trunk/tests/func/Trackers/relationTest.php 2010-03-20 14:29:23 UTC (rev 9174)
@@ -0,0 +1,74 @@
+<?php
+/*
+ * Copyright (C) 2008 Alain Peyrat <aljeux at free.fr>
+ * Copyright (C) 2009 Alain Peyrat, 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 'func/Testing/SeleniumGforge.php';
+
+class CreateTrackerRelation extends FForge_SeleniumTestCase
+{
+ function testCreateRelation()
+ {
+ $this->createProject('ProjectA');
+
+ // Testing extra-fields
+ $this->open( BASE );
+ $this->click("link=ProjectA");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Tracker");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Bugs");
+ $this->waitForPageToLoad("30000");
+ $this->click("//a[contains(@href, '".BASE. "/tracker/admin/?group_id=6&atid=101')]");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Manage Custom Fields");
+ $this->waitForPageToLoad("30000");
+ $this->type("name", "Depends on");
+ $this->type("alias", "depends_on");
+ $this->click("document.forms[2].field_type[7]");
+ $this->click("post_changes");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Depends on"));
+ }
+}
+?>
Deleted: trunk/tests/func/Trackers/trackers.php
===================================================================
--- trunk/tests/func/Trackers/trackers.php 2010-03-20 14:29:16 UTC (rev 9173)
+++ trunk/tests/func/Trackers/trackers.php 2010-03-20 14:29:23 UTC (rev 9174)
@@ -1,211 +0,0 @@
-<?php
-/*
- * Copyright (C) 2008 Alain Peyrat <aljeux at free.fr>
- * Copyright (C) 2009 Alain Peyrat, 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 'func/Testing/SeleniumGforge.php';
-
-class CreateTracker extends FForge_SeleniumTestCase
-{
- function testSimpleCreate()
- {
- $this->createProject('ProjectA');
-
- // Test: Create a simple bug report (Message1/Text1).
- $this->open( BASE );
- $this->click("link=ProjectA");
- $this->waitForPageToLoad("30000");
- $this->click("link=Tracker");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Bugs"));
- $this->assertTrue($this->isTextPresent("Support"));
- $this->assertTrue($this->isTextPresent("Patches"));
- $this->assertTrue($this->isTextPresent("Feature Requests"));
- $this->click("link=Bugs");
- $this->waitForPageToLoad("30000");
- $this->click("link=Submit New");
- $this->waitForPageToLoad("30000");
- $this->type("summary", "Summary1");
- $this->type("details", "Description1");
- $this->click("document.forms[2].submit[1]");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Summary1"));
- $this->click("link=Summary1");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent(""));
- $this->assertTrue($this->isTextPresent("Description1"));
-
- // Test: Adding a comment and checking that it is recorded.
- $this->type("details", "This is comment 1");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->click("link=Summary1");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("This is comment 1"));
-
- // Test: Adding a second comment and checking that it is recorded.
- $this->type("details", "Comment 2 added");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->click("link=Summary1");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Comment 2 added"));
- $this->assertTrue($this->isTextPresent("This is comment 1"));
-
- // Test: Adding another comment (chars) and checking that it is recorded.
- $this->type("details", "This & été");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->click("link=Summary1");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("This & été"));
-
- // Test: Updating the URL extra field and checking that it is recorded.
- $this->type("extra_fields[8]", "http://google.com/");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->click("link=Summary1");
- $this->waitForPageToLoad("30000");
- try {
- $this->assertEquals("http://google.com/", $this->getValue("extra_fields[8]"));
- } catch (PHPUnit_Framework_AssertionFailedError $e) {
- array_push($this->verificationErrors, $e->toString());
- }
-
- // Test: Updating the priority and checking that it is recorded.
- $this->select("priority", "label=5 - Highest");
- $this->click("submit");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("5"));
- $this->click("link=Summary1");
- $this->waitForPageToLoad("30000");
- }
-
- function testExtraFields()
- {
- $this->createProject('ProjectA');
-
- // Testing extra-fields
- $this->open( BASE );
- $this->click("link=ProjectA");
- $this->waitForPageToLoad("30000");
- $this->click("link=Tracker");
- $this->waitForPageToLoad("30000");
- $this->click("link=Bugs");
- $this->waitForPageToLoad("30000");
- $this->click("//a[contains(@href, '".BASE. "/tracker/admin/?group_id=6&atid=101')]");
- $this->waitForPageToLoad("30000");
- $this->click("link=Manage Custom Fields");
- $this->waitForPageToLoad("30000");
- $this->type("name", "Number");
- $this->type("alias", "number");
- $this->click("field_type");
- $this->click("post_changes");
- $this->waitForPageToLoad("30000");
- $this->click("//a[contains(@href, '".BASE. "/tracker/admin/index.php?add_opt=1&boxid=22&group_id=6&atid=101')]");
- $this->waitForPageToLoad("30000");
- $this->type("name", "1");
- $this->click("post_changes");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Element inserted"));
- $this->type("name", "2");
- $this->click("post_changes");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Element inserted"));
-
- // Testing [#3609]: Select Box does not accept 0 as choice
- $this->type("name", "0");
- $this->click("post_changes");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Element inserted"));
-
- // Testing [#3649]: 0 not accepted when modifying a select list value
- $this->open(BASE."/tracker/admin/index.php?group_id=6&atid=101&add_extrafield=1");
- $this->click("//tr[@id='field-number']/td[3]/a[5]");
- $this->waitForPageToLoad("30000");
- $this->type("name", "10");
- $this->click("post_changes");
- $this->waitForPageToLoad("30000");
- $this->click("//tr[@id='field-number']/td[3]/a[5]");
- $this->waitForPageToLoad("30000");
- $this->type("name", "0");
- $this->click("post_changes");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Element updated"));
- }
-
- function testCreateAndDeleteNewTracker()
- {
- $this->createProject('ProjectA');
-
- // Create a new tracker and delete it after.
- $this->open( BASE );
- $this->click("link=ProjectA");
- $this->waitForPageToLoad("30000");
- $this->click("link=Tracker");
- $this->waitForPageToLoad("30000");
- $this->click("//a[@href='".URL."tracker/admin/?group_id=6']");
- $this->waitForPageToLoad("30000");
- $this->type("name", "newTracker");
- $this->type("description", "This is a new tracker");
- $this->click("post_changes");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Tracker created successfully"));
- $this->assertTrue($this->isTextPresent("newTracker"));
- $this->assertTrue($this->isTextPresent("This is a new tracker"));
- $this->click("link=newTracker");
- $this->waitForPageToLoad("30000");
- $this->click("//a[@href='".URL."tracker/admin/?group_id=6&atid=105']");
- $this->waitForPageToLoad("30000");
- $this->click("link=Delete");
- $this->waitForPageToLoad("30000");
- $this->click("sure");
- $this->click("really_sure");
- $this->click("post_changes");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Successfully Deleted."));
- $this->assertFalse($this->isTextPresent("newTracker"));
- $this->assertFalse($this->isTextPresent("This is a new tracker"));
- }
-}
-?>
Copied: trunk/tests/func/Trackers/trackersTest.php (from rev 9173, trunk/tests/func/Trackers/trackers.php)
===================================================================
--- trunk/tests/func/Trackers/trackersTest.php (rev 0)
+++ trunk/tests/func/Trackers/trackersTest.php 2010-03-20 14:29:23 UTC (rev 9174)
@@ -0,0 +1,211 @@
+<?php
+/*
+ * Copyright (C) 2008 Alain Peyrat <aljeux at free.fr>
+ * Copyright (C) 2009 Alain Peyrat, 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 'func/Testing/SeleniumGforge.php';
+
+class CreateTracker extends FForge_SeleniumTestCase
+{
+ function testSimpleCreate()
+ {
+ $this->createProject('ProjectA');
+
+ // Test: Create a simple bug report (Message1/Text1).
+ $this->open( BASE );
+ $this->click("link=ProjectA");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Tracker");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Bugs"));
+ $this->assertTrue($this->isTextPresent("Support"));
+ $this->assertTrue($this->isTextPresent("Patches"));
+ $this->assertTrue($this->isTextPresent("Feature Requests"));
+ $this->click("link=Bugs");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Submit New");
+ $this->waitForPageToLoad("30000");
+ $this->type("summary", "Summary1");
+ $this->type("details", "Description1");
+ $this->click("document.forms[2].submit[1]");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Summary1"));
+ $this->click("link=Summary1");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent(""));
+ $this->assertTrue($this->isTextPresent("Description1"));
+
+ // Test: Adding a comment and checking that it is recorded.
+ $this->type("details", "This is comment 1");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Summary1");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("This is comment 1"));
+
+ // Test: Adding a second comment and checking that it is recorded.
+ $this->type("details", "Comment 2 added");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Summary1");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Comment 2 added"));
+ $this->assertTrue($this->isTextPresent("This is comment 1"));
+
+ // Test: Adding another comment (chars) and checking that it is recorded.
+ $this->type("details", "This & été");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Summary1");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("This & été"));
+
+ // Test: Updating the URL extra field and checking that it is recorded.
+ $this->type("extra_fields[8]", "http://google.com/");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Summary1");
+ $this->waitForPageToLoad("30000");
+ try {
+ $this->assertEquals("http://google.com/", $this->getValue("extra_fields[8]"));
+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
+ array_push($this->verificationErrors, $e->toString());
+ }
+
+ // Test: Updating the priority and checking that it is recorded.
+ $this->select("priority", "label=5 - Highest");
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("5"));
+ $this->click("link=Summary1");
+ $this->waitForPageToLoad("30000");
+ }
+
+ function testExtraFields()
+ {
+ $this->createProject('ProjectA');
+
+ // Testing extra-fields
+ $this->open( BASE );
+ $this->click("link=ProjectA");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Tracker");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Bugs");
+ $this->waitForPageToLoad("30000");
+ $this->click("//a[contains(@href, '".BASE. "/tracker/admin/?group_id=6&atid=101')]");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Manage Custom Fields");
+ $this->waitForPageToLoad("30000");
+ $this->type("name", "Number");
+ $this->type("alias", "number");
+ $this->click("field_type");
+ $this->click("post_changes");
+ $this->waitForPageToLoad("30000");
+ $this->click("//a[contains(@href, '".BASE. "/tracker/admin/index.php?add_opt=1&boxid=22&group_id=6&atid=101')]");
+ $this->waitForPageToLoad("30000");
+ $this->type("name", "1");
+ $this->click("post_changes");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Element inserted"));
+ $this->type("name", "2");
+ $this->click("post_changes");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Element inserted"));
+
+ // Testing [#3609]: Select Box does not accept 0 as choice
+ $this->type("name", "0");
+ $this->click("post_changes");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Element inserted"));
+
+ // Testing [#3649]: 0 not accepted when modifying a select list value
+ $this->open(BASE."/tracker/admin/index.php?group_id=6&atid=101&add_extrafield=1");
+ $this->click("//tr[@id='field-number']/td[3]/a[5]");
+ $this->waitForPageToLoad("30000");
+ $this->type("name", "10");
+ $this->click("post_changes");
+ $this->waitForPageToLoad("30000");
+ $this->click("//tr[@id='field-number']/td[3]/a[5]");
+ $this->waitForPageToLoad("30000");
+ $this->type("name", "0");
+ $this->click("post_changes");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Element updated"));
+ }
+
+ function testCreateAndDeleteNewTracker()
+ {
+ $this->createProject('ProjectA');
+
+ // Create a new tracker and delete it after.
+ $this->open( BASE );
+ $this->click("link=ProjectA");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Tracker");
+ $this->waitForPageToLoad("30000");
+ $this->click("//a[@href='".URL."tracker/admin/?group_id=6']");
+ $this->waitForPageToLoad("30000");
+ $this->type("name", "newTracker");
+ $this->type("description", "This is a new tracker");
+ $this->click("post_changes");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Tracker created successfully"));
+ $this->assertTrue($this->isTextPresent("newTracker"));
+ $this->assertTrue($this->isTextPresent("This is a new tracker"));
+ $this->click("link=newTracker");
+ $this->waitForPageToLoad("30000");
+ $this->click("//a[@href='".URL."tracker/admin/?group_id=6&atid=105']");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Delete");
+ $this->waitForPageToLoad("30000");
+ $this->click("sure");
+ $this->click("really_sure");
+ $this->click("post_changes");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Successfully Deleted."));
+ $this->assertFalse($this->isTextPresent("newTracker"));
+ $this->assertFalse($this->isTextPresent("This is a new tracker"));
+ }
+}
+?>
Deleted: trunk/tests/func/Trackers/workflow.php
===================================================================
--- trunk/tests/func/Trackers/workflow.php 2010-03-20 14:29:16 UTC (rev 9173)
+++ trunk/tests/func/Trackers/workflow.php 2010-03-20 14:29:23 UTC (rev 9174)
@@ -1,249 +0,0 @@
-<?php
-/*
- * Copyright (C) 2008 Alain Peyrat <aljeux at free.fr>
- * Copyright (C) 2009 Alain Peyrat, 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 'func/Testing/SeleniumGforge.php';
-
-class CreateTrackerWorkflow extends FForge_SeleniumTestCase
-{
- function testWorkflow()
- {
- $this->createProject('ProjectA');
-
- // Testing extra-fields
- $this->open( BASE );
- $this->click("link=ProjectA");
- $this->waitForPageToLoad("30000");
- $this->click("link=Tracker");
- $this->waitForPageToLoad("30000");
- $this->click("link=Bugs");
- $this->waitForPageToLoad("30000");
- $this->click("//a[contains(@href, '".BASE. "/tracker/admin/?group_id=6&atid=101')]");
- $this->waitForPageToLoad("30000");
- $this->click("link=Manage Custom Fields");
- $this->waitForPageToLoad("30000");
- $this->type("name", "MyStatus");
- $this->type("alias", "mystatus");
- $this->click("document.forms[2].field_type[6]");
- $this->click("post_changes");
- $this->waitForPageToLoad("30000");
- $this->click("//tr[@id='field-mystatus']/td[3]/a[1]");
- $this->waitForPageToLoad("30000");
- $this->type("name", "New");
- $this->click("post_changes");
- $this->waitForPageToLoad("30000");
- $this->click("link=Manage Custom Fields");
- $this->waitForPageToLoad("30000");
- $this->click("//tr[@id='field-mystatus']/td[3]/a[3]");
- $this->waitForPageToLoad("30000");
- $this->type("name", "Analyse");
- $this->select("status_id", "label=Open");
- $this->click("post_changes");
- $this->waitForPageToLoad("30000");
- $this->click("link=Manage Workflow");
- $this->waitForPageToLoad("30000");
- $this->click("link=Manage Custom Fields");
- $this->waitForPageToLoad("30000");
- $this->click("//a[contains(@href, '/tracker/admin/index.php?add_opt=1&boxid=22&group_id=6&atid=101')]");
- $this->waitForPageToLoad("30000");
- $this->type("name", "Candidate");
- $this->click("post_changes");
- $this->waitForPageToLoad("30000");
- $this->click("link=Manage Custom Fields");
- $this->waitForPageToLoad("30000");
- $this->click("//a[contains(@href, '/tracker/admin/index.php?add_opt=1&boxid=22&group_id=6&atid=101')]");
- $this->waitForPageToLoad("30000");
- $this->type("name", "Open");
- $this->click("post_changes");
- $this->waitForPageToLoad("30000");
- $this->type("name", "Resolved");
- $this->click("post_changes");
- $this->waitForPageToLoad("30000");
- $this->type("name", "Validated");
- $this->click("post_changes");
- $this->waitForPageToLoad("30000");
- $this->type("name", "Verified");
- $this->select("status_id", "label=Closed");
- $this->click("post_changes");
- $this->waitForPageToLoad("30000");
- $this->type("name", "Duplicated");
- $this->click("post_changes");
- $this->waitForPageToLoad("30000");
- $this->type("name", "Postponed");
- $this->click("post_changes");
- $this->waitForPageToLoad("30000");
- $this->type("name", "Closed");
- $this->select("status_id", "label=Closed");
- $this->click("post_changes");
- $this->waitForPageToLoad("30000");
- $this->click("link=Manage Workflow");
- $this->waitForPageToLoad("30000");
- $this->click("wk[157][159]");
- $this->click("wk[157][160]");
- $this->click("wk[157][161]");
- $this->click("wk[157][162]");
- $this->click("wk[157][163]");
- $this->click("wk[157][164]");
- $this->click("wk[157][165]");
- $this->click("wk[157][166]");
- $this->click("wk[158][157]");
- $this->click("wk[159][160]");
- $this->click("wk[159][161]");
- $this->click("wk[159][162]");
- $this->click("wk[159][163]");
- $this->click("wk[159][157]");
- $this->click("wk[159][158]");
- $this->click("wk[159][158]");
- $this->click("wk[159][157]");
- $this->click("wk[158][160]");
- $this->click("wk[158][161]");
- $this->click("wk[158][162]");
- $this->click("wk[158][163]");
- $this->click("wk[158][164]");
- $this->click("wk[158][165]");
- $this->click("wk[158][166]");
- $this->click("wk[158][166]");
- $this->click("wk[158][165]");
- $this->click("wk[159][157]");
- $this->click("wk[159][158]");
- $this->click("wk[159][164]");
- $this->click("wk[159][165]");
- $this->click("wk[159][166]");
- $this->click("wk[159][160]");
- $this->click("wk[159][166]");
- $this->click("wk[159][165]");
- $this->click("wk[160][157]");
- $this->click("wk[160][158]");
- $this->click("wk[160][159]");
- $this->click("wk[160][161]");
- $this->click("wk[160][162]");
- $this->click("wk[160][163]");
- $this->click("wk[160][164]");
- $this->click("wk[160][165]");
- $this->click("wk[160][166]");
- $this->click("wk[160][158]");
- $this->click("wk[160][161]");
- $this->click("wk[161][157]");
- $this->click("wk[161][158]");
- $this->click("wk[161][159]");
- $this->click("wk[161][160]");
- $this->click("wk[161][162]");
- $this->click("wk[161][163]");
- $this->click("wk[161][164]");
- $this->click("wk[161][165]");
- $this->click("wk[161][166]");
- $this->click("wk[161][162]");
- $this->click("wk[161][158]");
- $this->click("wk[162][157]");
- $this->click("wk[162][158]");
- $this->click("wk[162][159]");
- $this->click("wk[162][160]");
- $this->click("wk[162][161]");
- $this->click("wk[162][164]");
- $this->click("wk[162][163]");
- $this->click("wk[162][165]");
- $this->click("wk[162][166]");
- $this->click("wk[162][158]");
- $this->click("wk[162][158]");
- $this->click("wk[162][158]");
- $this->click("wk[162][163]");
- $this->click("wk[163][157]");
- $this->click("wk[163][158]");
- $this->click("wk[163][159]");
- $this->click("wk[163][160]");
- $this->click("wk[163][161]");
- $this->click("wk[163][162]");
- $this->click("wk[163][164]");
- $this->click("wk[163][165]");
- $this->click("wk[163][166]");
- $this->click("wk[164][157]");
- $this->click("wk[164][158]");
- $this->click("wk[164][159]");
- $this->click("wk[164][160]");
- $this->click("wk[164][161]");
- $this->click("wk[164][162]");
- $this->click("wk[164][163]");
- $this->click("wk[164][165]");
- $this->click("wk[164][166]");
- $this->click("wk[165][157]");
- $this->click("wk[165][158]");
- $this->click("wk[165][159]");
- $this->click("wk[165][160]");
- $this->click("wk[165][161]");
- $this->click("wk[165][162]");
- $this->click("wk[165][163]");
- $this->click("wk[165][164]");
- $this->click("wk[165][166]");
- $this->click("wk[165][158]");
- $this->click("wk[166][157]");
- $this->click("wk[166][158]");
- $this->click("wk[166][159]");
- $this->click("wk[166][160]");
- $this->click("wk[166][161]");
- $this->click("wk[166][162]");
- $this->click("wk[166][163]");
- $this->click("wk[166][164]");
- $this->click("wk[166][165]");
- $this->click("post_changes");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("Workflow saved"));
-
- // Ensure that it is not possible to configure the workflow without initial state.
- $this->click("wk[100][157]");
- $this->click("wk[100][158]");
- $this->click("wk[100][159]");
- $this->click("wk[100][160]");
- $this->click("wk[100][161]");
- $this->click("wk[100][162]");
- $this->click("wk[100][163]");
- $this->click("wk[100][164]");
- $this->click("wk[100][165]");
- $this->click("wk[100][166]");
- $this->click("post_changes");
- $this->waitForPageToLoad("30000");
- $this->assertTrue($this->isTextPresent("ERROR: Initial values not saved"));
- $this->assertTrue($this->isTextPresent("Workflow saved"));
- }
-}
-?>
Copied: trunk/tests/func/Trackers/workflowTest.php (from rev 9173, trunk/tests/func/Trackers/workflow.php)
===================================================================
--- trunk/tests/func/Trackers/workflowTest.php (rev 0)
+++ trunk/tests/func/Trackers/workflowTest.php 2010-03-20 14:29:23 UTC (rev 9174)
@@ -0,0 +1,249 @@
+<?php
+/*
+ * Copyright (C) 2008 Alain Peyrat <aljeux at free.fr>
+ * Copyright (C) 2009 Alain Peyrat, 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 'func/Testing/SeleniumGforge.php';
+
+class CreateTrackerWorkflow extends FForge_SeleniumTestCase
+{
+ function testWorkflow()
+ {
+ $this->createProject('ProjectA');
+
+ // Testing extra-fields
+ $this->open( BASE );
+ $this->click("link=ProjectA");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Tracker");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Bugs");
+ $this->waitForPageToLoad("30000");
+ $this->click("//a[contains(@href, '".BASE. "/tracker/admin/?group_id=6&atid=101')]");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Manage Custom Fields");
+ $this->waitForPageToLoad("30000");
+ $this->type("name", "MyStatus");
+ $this->type("alias", "mystatus");
+ $this->click("document.forms[2].field_type[6]");
+ $this->click("post_changes");
+ $this->waitForPageToLoad("30000");
+ $this->click("//tr[@id='field-mystatus']/td[3]/a[1]");
+ $this->waitForPageToLoad("30000");
+ $this->type("name", "New");
+ $this->click("post_changes");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Manage Custom Fields");
+ $this->waitForPageToLoad("30000");
+ $this->click("//tr[@id='field-mystatus']/td[3]/a[3]");
+ $this->waitForPageToLoad("30000");
+ $this->type("name", "Analyse");
+ $this->select("status_id", "label=Open");
+ $this->click("post_changes");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Manage Workflow");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Manage Custom Fields");
+ $this->waitForPageToLoad("30000");
+ $this->click("//a[contains(@href, '/tracker/admin/index.php?add_opt=1&boxid=22&group_id=6&atid=101')]");
+ $this->waitForPageToLoad("30000");
+ $this->type("name", "Candidate");
+ $this->click("post_changes");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Manage Custom Fields");
+ $this->waitForPageToLoad("30000");
+ $this->click("//a[contains(@href, '/tracker/admin/index.php?add_opt=1&boxid=22&group_id=6&atid=101')]");
+ $this->waitForPageToLoad("30000");
+ $this->type("name", "Open");
+ $this->click("post_changes");
+ $this->waitForPageToLoad("30000");
+ $this->type("name", "Resolved");
+ $this->click("post_changes");
+ $this->waitForPageToLoad("30000");
+ $this->type("name", "Validated");
+ $this->click("post_changes");
+ $this->waitForPageToLoad("30000");
+ $this->type("name", "Verified");
+ $this->select("status_id", "label=Closed");
+ $this->click("post_changes");
+ $this->waitForPageToLoad("30000");
+ $this->type("name", "Duplicated");
+ $this->click("post_changes");
+ $this->waitForPageToLoad("30000");
+ $this->type("name", "Postponed");
+ $this->click("post_changes");
+ $this->waitForPageToLoad("30000");
+ $this->type("name", "Closed");
+ $this->select("status_id", "label=Closed");
+ $this->click("post_changes");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Manage Workflow");
+ $this->waitForPageToLoad("30000");
+ $this->click("wk[157][159]");
+ $this->click("wk[157][160]");
+ $this->click("wk[157][161]");
+ $this->click("wk[157][162]");
+ $this->click("wk[157][163]");
+ $this->click("wk[157][164]");
+ $this->click("wk[157][165]");
+ $this->click("wk[157][166]");
+ $this->click("wk[158][157]");
+ $this->click("wk[159][160]");
+ $this->click("wk[159][161]");
+ $this->click("wk[159][162]");
+ $this->click("wk[159][163]");
+ $this->click("wk[159][157]");
+ $this->click("wk[159][158]");
+ $this->click("wk[159][158]");
+ $this->click("wk[159][157]");
+ $this->click("wk[158][160]");
+ $this->click("wk[158][161]");
+ $this->click("wk[158][162]");
+ $this->click("wk[158][163]");
+ $this->click("wk[158][164]");
+ $this->click("wk[158][165]");
+ $this->click("wk[158][166]");
+ $this->click("wk[158][166]");
+ $this->click("wk[158][165]");
+ $this->click("wk[159][157]");
+ $this->click("wk[159][158]");
+ $this->click("wk[159][164]");
+ $this->click("wk[159][165]");
+ $this->click("wk[159][166]");
+ $this->click("wk[159][160]");
+ $this->click("wk[159][166]");
+ $this->click("wk[159][165]");
+ $this->click("wk[160][157]");
+ $this->click("wk[160][158]");
+ $this->click("wk[160][159]");
+ $this->click("wk[160][161]");
+ $this->click("wk[160][162]");
+ $this->click("wk[160][163]");
+ $this->click("wk[160][164]");
+ $this->click("wk[160][165]");
+ $this->click("wk[160][166]");
+ $this->click("wk[160][158]");
+ $this->click("wk[160][161]");
+ $this->click("wk[161][157]");
+ $this->click("wk[161][158]");
+ $this->click("wk[161][159]");
+ $this->click("wk[161][160]");
+ $this->click("wk[161][162]");
+ $this->click("wk[161][163]");
+ $this->click("wk[161][164]");
+ $this->click("wk[161][165]");
+ $this->click("wk[161][166]");
+ $this->click("wk[161][162]");
+ $this->click("wk[161][158]");
+ $this->click("wk[162][157]");
+ $this->click("wk[162][158]");
+ $this->click("wk[162][159]");
+ $this->click("wk[162][160]");
+ $this->click("wk[162][161]");
+ $this->click("wk[162][164]");
+ $this->click("wk[162][163]");
+ $this->click("wk[162][165]");
+ $this->click("wk[162][166]");
+ $this->click("wk[162][158]");
+ $this->click("wk[162][158]");
+ $this->click("wk[162][158]");
+ $this->click("wk[162][163]");
+ $this->click("wk[163][157]");
+ $this->click("wk[163][158]");
+ $this->click("wk[163][159]");
+ $this->click("wk[163][160]");
+ $this->click("wk[163][161]");
+ $this->click("wk[163][162]");
+ $this->click("wk[163][164]");
+ $this->click("wk[163][165]");
+ $this->click("wk[163][166]");
+ $this->click("wk[164][157]");
+ $this->click("wk[164][158]");
+ $this->click("wk[164][159]");
+ $this->click("wk[164][160]");
+ $this->click("wk[164][161]");
+ $this->click("wk[164][162]");
+ $this->click("wk[164][163]");
+ $this->click("wk[164][165]");
+ $this->click("wk[164][166]");
+ $this->click("wk[165][157]");
+ $this->click("wk[165][158]");
+ $this->click("wk[165][159]");
+ $this->click("wk[165][160]");
+ $this->click("wk[165][161]");
+ $this->click("wk[165][162]");
+ $this->click("wk[165][163]");
+ $this->click("wk[165][164]");
+ $this->click("wk[165][166]");
+ $this->click("wk[165][158]");
+ $this->click("wk[166][157]");
+ $this->click("wk[166][158]");
+ $this->click("wk[166][159]");
+ $this->click("wk[166][160]");
+ $this->click("wk[166][161]");
+ $this->click("wk[166][162]");
+ $this->click("wk[166][163]");
+ $this->click("wk[166][164]");
+ $this->click("wk[166][165]");
+ $this->click("post_changes");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("Workflow saved"));
+
+ // Ensure that it is not possible to configure the workflow without initial state.
+ $this->click("wk[100][157]");
+ $this->click("wk[100][158]");
+ $this->click("wk[100][159]");
+ $this->click("wk[100][160]");
+ $this->click("wk[100][161]");
+ $this->click("wk[100][162]");
+ $this->click("wk[100][163]");
+ $this->click("wk[100][164]");
+ $this->click("wk[100][165]");
+ $this->click("wk[100][166]");
+ $this->click("post_changes");
+ $this->waitForPageToLoad("30000");
+ $this->assertTrue($this->isTextPresent("ERROR: Initial values not saved"));
+ $this->assertTrue($this->isTextPresent("Workflow saved"));
+ }
+}
+?>
More information about the Fusionforge-commits
mailing list