[Fusionforge-commits] FusionForge branch master updated. v6.1-177-g04f516d

Franck Villaume nerville at libremir.placard.fr.eu.org
Sun Jan 13 20:45:36 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  04f516de13e56ff0fb10437f92c572cf4ac38b73 (commit)
       via  264531adfcf86a25c59e34c07d8ce8bdb2e2de58 (commit)
      from  b51fb3b6891c4ec509131622bd48ccf2e95e4476 (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=04f516de13e56ff0fb10437f92c572cf4ac38b73

commit 04f516de13e56ff0fb10437f92c572cf4ac38b73
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sun Jan 13 20:45:21 2019 +0100

    do not use type, use ByName

diff --git a/tests/func/10_Site/loginTest.php b/tests/func/10_Site/loginTest.php
index 595cb26..72c352e 100644
--- a/tests/func/10_Site/loginTest.php
+++ b/tests/func/10_Site/loginTest.php
@@ -66,7 +66,7 @@ class LoginProcess extends FForge_SeleniumTestCase
 		$this->assertRegExp($url_regexp, $location,
 				    "You may need to set 'HOST' setting in test suite's config file to something compatible with 'web_host' defined in ini file");
 
-		$this->type("form_loginname", FORGE_ADMIN_USERNAME);
+		$this->byName("form_loginname")->value(FORGE_ADMIN_USERNAME);
 		$this->type("form_pw", FORGE_ADMIN_PASSWORD);
 		$this->clickAndWait("login");
 		$this->assertTrue($this->isTextPresent("Forge Admin"));

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=264531adfcf86a25c59e34c07d8ce8bdb2e2de58

commit 264531adfcf86a25c59e34c07d8ce8bdb2e2de58
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sun Jan 13 20:44:52 2019 +0100

    fix isTextPresent, implement getLocation, start clickAndWait rewrite

diff --git a/tests/func/SeleniumForge.php b/tests/func/SeleniumForge.php
index 3cc37e0..d57a811 100644
--- a/tests/func/SeleniumForge.php
+++ b/tests/func/SeleniumForge.php
@@ -191,8 +191,10 @@ class FForge_SeleniumTestCase extends PHPUnit_Extensions_Selenium2TestCase
 	}
 
 	public function clickAndWait($link) {
+		// click does not do what we expect! Need to be rewrite...
 		$this->click($link);
-		$this->waitForPageToLoad();
+		// we may need to implement this waitForPageToLoad... let's comment it first.
+		//$this->waitForPageToLoad();
 	}
 
 	public function waitForTextPresent($text) {
@@ -379,7 +381,7 @@ class FForge_SeleniumTestCase extends PHPUnit_Extensions_Selenium2TestCase
 	public function logout() {
 //		$this->click("link=Log Out");
 		$this->open( ROOT ."/account/logout.php" );
-		$this->waitForPageToLoad();
+		//$this->waitForPageToLoad();
 
 		$this->logged_in = false ;
 	}
@@ -569,7 +571,17 @@ class FForge_SeleniumTestCase extends PHPUnit_Extensions_Selenium2TestCase
 				'args' => array(),
 			));
 		$element = $this->elementFromResponseValue($elementArray);
-		$this->assertRegExp("/$text/", $element->text());
+		if (strpos($element->text(), $text) === false) {
+			return false;
+		}
+		return true;
+	}
+
+	function getLocation() {
+		return $this->execute(array(
+				'script' => 'return window.location.href;',
+				'args' => array(),
+			));
 	}
 }
 

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

Summary of changes:
 tests/func/10_Site/loginTest.php |  2 +-
 tests/func/SeleniumForge.php     | 18 +++++++++++++++---
 2 files changed, 16 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list