[Fusionforge-commits] FusionForge branch 6.0 updated. 3d64da2a99bfa0a70934b2cb8bc22834c42b2c64

Roland Mas lolando at fusionforge.org
Wed Apr 8 15:13:14 CEST 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, 6.0 has been updated
       via  3d64da2a99bfa0a70934b2cb8bc22834c42b2c64 (commit)
      from  81eaedc57f472c99e406198a23dc447dff3de7a0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3d64da2a99bfa0a70934b2cb8bc22834c42b2c64
Author: Roland Mas <lolando at debian.org>
Date:   Wed Apr 8 15:13:03 2015 +0200

    Use clickAndWait() for readability

diff --git a/tests/func/Testing/SeleniumForge.php b/tests/func/Testing/SeleniumForge.php
index 30cab12..2455cc7 100644
--- a/tests/func/Testing/SeleniumForge.php
+++ b/tests/func/Testing/SeleniumForge.php
@@ -101,8 +101,7 @@ class FForge_SeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase
 
 	protected function clickAndWait($link)
 	{
-		$this->click($link);
-		$this->waitForPageToLoad();
+		$this->clickAndWait($link);
 	}
 
 	protected function waitForTextPresent($text)
@@ -163,23 +162,17 @@ class FForge_SeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase
 
 		$this->createProject ('Tmpl');
 
-		$this->click("link=Site Admin");
-		$this->waitForPageToLoad("30000");
-		$this->click("link=Display Full Project List/Edit Projects");
-		$this->waitForPageToLoad("30000");
-		$this->click("link=Tmpl");
-		$this->waitForPageToLoad("30000");
+		$this->clickAndWait("link=Site Admin");
+		$this->clickAndWait("link=Display Full Project List/Edit Projects");
+		$this->clickAndWait("link=Tmpl");
 		$this->select ("//select[@name='form_template']", "label=Yes") ;
-		$this->click("submit");
-		$this->waitForPageToLoad("30000");
+		$this->clickAndWait("submit");
 
 		$this->open( ROOT . '/projects/tmpl') ;
 		$this->waitForPageToLoad("30000");
 
-		$this->click("link=Admin");
-		$this->waitForPageToLoad("30000");
-		$this->click("link=Tools");
-		$this->waitForPageToLoad("30000");
+		$this->clickAndWait("link=Admin");
+		$this->clickAndWait("link=Tools");
 		$this->check("//input[@name='use_forum']") ;
 		$this->check("//input[@name='use_tracker']") ;
 		$this->check("//input[@name='use_mail']") ;
@@ -187,104 +180,78 @@ class FForge_SeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase
 		$this->check("//input[@name='use_docman']") ;
 		$this->check("//input[@name='use_news']") ;
 		$this->check("//input[@name='use_frs']") ;
-		$this->click("submit");
-		$this->waitForPageToLoad("30000");
+		$this->clickAndWait("submit");
 
 		if (in_array ('trackers', $what)) {
-			$this->click("link=Trackers Administration");
-			$this->waitForPageToLoad("30000");
+			$this->clickAndWait("link=Trackers Administration");
 			$this->type("name", "Bugs");
 			$this->type("//input[@name='description']", "Tracker for bug reports");
-			$this->click("post_changes");
-			$this->waitForPageToLoad("30000");
+			$this->clickAndWait("post_changes");
 			$this->assertTrue($this->isTextPresent("Tracker created successfully"));
-			$this->click("link=Bugs");
-			$this->waitForPageToLoad("30000");
-			$this->click("link=Manage Custom Fields");
-			$this->waitForPageToLoad("30000");
+			$this->clickAndWait("link=Bugs");
+			$this->clickAndWait("link=Manage Custom Fields");
 			$this->type("name", "URL");
 			$this->type("alias", "url");
 			$this->click("//input[@name='field_type' and @value=4]");
-			$this->click("post_changes");
-			$this->waitForPageToLoad("30000");
-
-			$this->click("link=Admin");
-			$this->waitForPageToLoad("30000");
-			$this->click("link=Tools");
-			$this->waitForPageToLoad("30000");
-			$this->click("link=Trackers Administration");
-			$this->waitForPageToLoad("30000");
+			$this->clickAndWait("post_changes");
+
+			$this->clickAndWait("link=Admin");
+			$this->clickAndWait("link=Tools");
+			$this->clickAndWait("link=Trackers Administration");
 			$this->type("name", "Support Requests");
 			$this->type("//input[@name='description']", "Tracker for support requests");
-			$this->click("post_changes");
-			$this->waitForPageToLoad("30000");
+			$this->clickAndWait("post_changes");
 			$this->assertTrue($this->isTextPresent("Tracker created successfully"));
 
 			$this->type("name", "Patches");
 			$this->type("//input[@name='description']", "Proposed changes to code");
-			$this->click("post_changes");
-			$this->waitForPageToLoad("30000");
+			$this->clickAndWait("post_changes");
 			$this->assertTrue($this->isTextPresent("Tracker created successfully"));
 
 			$this->type("name", "Feature Requests");
 			$this->type("//input[@name='description']", "New features that people want");
-			$this->click("post_changes");
-			$this->waitForPageToLoad("30000");
+			$this->clickAndWait("post_changes");
 			$this->assertTrue($this->isTextPresent("Tracker created successfully"));
 		}
 
 		if (in_array ('tasks', $what)) {
-			$this->click("link=Admin");
-			$this->waitForPageToLoad("30000");
-			$this->click("link=Tools");
-			$this->waitForPageToLoad("30000");
-			$this->click("link=Tasks Administration");
-			$this->waitForPageToLoad("30000");
-			$this->click("link=Add a Subproject");
-			$this->waitForPageToLoad("30000");
+			$this->clickAndWait("link=Admin");
+			$this->clickAndWait("link=Tools");
+			$this->clickAndWait("link=Tasks Administration");
+			$this->clickAndWait("link=Add a Subproject");
 			$this->type("project_name", "To Do");
 			$this->type("//input[@name='description']", "Things we have to do");
-			$this->click("submit");
-			$this->waitForPageToLoad("30000");
+			$this->clickAndWait("submit");
 			$this->assertTrue($this->isTextPresent("Subproject Inserted"));
 
 			$this->type("project_name", "Next Release");
 			$this->type("//input[@name='description']", "Items for our next release");
-			$this->click("submit");
-			$this->waitForPageToLoad("30000");
+			$this->clickAndWait("submit");
 			$this->assertTrue($this->isTextPresent("Subproject Inserted"));
 		}
 
 		if (in_array ('forums', $what)) {
-			$this->click("link=Admin");
-			$this->waitForPageToLoad("30000");
-			$this->click("link=Tools");
-			$this->waitForPageToLoad("30000");
-			$this->click("link=Forums Admin");
-			$this->waitForPageToLoad("30000");
-
-			$this->click("link=Add Forum");
-			$this->waitForPageToLoad("30000");
+			$this->clickAndWait("link=Admin");
+			$this->clickAndWait("link=Tools");
+			$this->clickAndWait("link=Forums Admin");
+
+			$this->clickAndWait("link=Add Forum");
 			$this->type("forum_name", "Open-Discussion");
 			$this->type("//input[@name='description']", "General Discussion");
-			$this->click("submit");
-			$this->waitForPageToLoad("30000");
+			$this->clickAndWait("submit");
 			$this->assertTrue($this->isTextPresent("Forum added successfully"));
 
 			$this->type("forum_name", "Help");
 			$this->type("//input[@name='description']", "Get Public Help");
-			$this->click("submit");
-			$this->waitForPageToLoad("30000");
+			$this->clickAndWait("submit");
 			$this->assertTrue($this->isTextPresent("Forum added successfully"));
 
 			$this->type("forum_name", "Developers-Discussion");
 			$this->type("//input[@name='description']", "Project Developer Discussion");
-			$this->click("submit");
-			$this->waitForPageToLoad("30000");
+			$this->clickAndWait("submit");
 			$this->assertTrue($this->isTextPresent("Forum added successfully"));
 
-			$this->click("link=Forums");
-			$this->waitForPageToLoad("30000");
+			$this->clickAndWait("link=Forums");
 			$this->assertTrue($this->isTextPresent("open-discussion"));
 			$this->assertTrue($this->isTextPresent("Get Public Help"));
 			$this->assertTrue($this->isTextPresent("Project Developer Discussion"));
@@ -375,8 +342,7 @@ class FForge_SeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase
 
 		$this->open( ROOT . '/admin/approve-pending.php') ;
 		$this->waitForPageToLoad("30000");
-		$this->click("document.forms['approve.$unix_name'].submit");
-		$this->waitForPageToLoad("60000");
+		$this->clickAndWait("document.forms['approve.$unix_name'].submit");
 
 		$this->assertTrue($this->isTextPresent("Approving Project: $unix_name"));
 

-----------------------------------------------------------------------

Summary of changes:
 tests/func/Testing/SeleniumForge.php |  106 ++++++++++++----------------------
 1 file changed, 36 insertions(+), 70 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list