[Fusionforge-commits] FusionForge branch master updated. v6.1-190-g4097c21

Franck Villaume nerville at libremir.placard.fr.eu.org
Sat Jan 19 17:03:18 CET 2019


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, master has been updated
       via  4097c21c0bec63bc08bd7011cbc933cc734d81a8 (commit)
      from  18b3ccde2496902d4835a38303e44e07bcd7276a (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 -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=4097c21c0bec63bc08bd7011cbc933cc734d81a8

commit 4097c21c0bec63bc08bd7011cbc933cc734d81a8
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sat Jan 19 17:02:57 2019 +0100

    implement assertTextPresent. use clickAndWait and NOT click

diff --git a/tests/func/SeleniumForge.php b/tests/func/SeleniumForge.php
index f5d0a5b..3923d66 100644
--- a/tests/func/SeleniumForge.php
+++ b/tests/func/SeleniumForge.php
@@ -200,7 +200,7 @@ class FForge_SeleniumTestCase extends PHPUnit_Extensions_Selenium2TestCase
 			//default case
 			$myelement = $this->byName($link);
 		}
-		sleep(6); // to handle tooltips
+		sleep(7); // to handle tooltips
 		$myelement->click();
 	}
 
@@ -266,7 +266,7 @@ class FForge_SeleniumTestCase extends PHPUnit_Extensions_Selenium2TestCase
 
 		$this->createProject ('Tmpl');
 
-		$this->clickAndWait("link=Site Admin");
+		$this->url(ROOT."/admin/");
 		$this->clickAndWait("link=Display Full Project List/Edit Projects");
 		$this->clickAndWait("link=Tmpl");
 		$this->select ("//select[@name='form_template']", "label=Yes") ;
@@ -296,7 +296,7 @@ class FForge_SeleniumTestCase extends PHPUnit_Extensions_Selenium2TestCase
 			$this->clickAndWait("link=Manage Custom Fields");
 			$this->type("name", "URL");
 			$this->type("alias", "url");
-			$this->click("//input[@name='field_type' and @value=4]");
+			$this->clickAndWait("//input[@name='field_type' and @value=4]");
 			$this->clickAndWait("post_changes");
 
 			$this->clickAndWait("link=Admin");
@@ -387,7 +387,6 @@ class FForge_SeleniumTestCase extends PHPUnit_Extensions_Selenium2TestCase
 
 	public function logout() {
 		$this->open( ROOT ."/account/logout.php" );
-
 		$this->logged_in = false;
 	}
 
@@ -412,17 +411,13 @@ class FForge_SeleniumTestCase extends PHPUnit_Extensions_Selenium2TestCase
 		$saved_user = $this->logged_in ;
 		$this->switchUser ($user) ;
 
-		$this->clickAndWait("link=My Page");
+		$this->url(ROOT."/my/");
 		$this->clickAndWait("link=Register Project");
 		$this->type("full_name", $name);
 		$this->type("purpose", "This is a simple description for $name");
 		$this->type("//textarea[@name='description']", "This is the public description for $name.");
 		$this->type("unix_name", $unix_name);
-		$this->click("//input[@name='scm' and @value='$scm']");
-
-		if ($this->isElementPresent("//select[@name='built_from_template']/option[.='Tmpl']")) {
-			$this->select("//select[@name='built_from_template']", "label=Tmpl");
-		}
+		$this->clickAndWait("//input[@name='scm' and @value='$scm']");
 
 		$this->clickAndWait("submit");
 		$this->assertTextPresent("Your project has been automatically approved");
@@ -604,10 +599,14 @@ class FForge_SeleniumTestCase extends PHPUnit_Extensions_Selenium2TestCase
 		}
 	}
 
-	function waitForPageToLoad($integer) {
+	function waitForPageToLoad($integer = 10000) {
 		//do we need to set something???
 		usleep($integer);
 	}
+
+	function assertTextPresent($string) {
+		return $this->assertTrue($this->isTextPresent($string));
+	}
 }
 
 // Local Variables:

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

Summary of changes:
 tests/func/SeleniumForge.php | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list