[Fusionforge-commits] FusionForge branch master updated. v6.1-183-g3643128

Franck Villaume nerville at libremir.placard.fr.eu.org
Wed Jan 16 20:02:19 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  3643128978c682ad80c275bd88a46568a69eba11 (commit)
      from  ee87213081e690248bfb6e48cd6476cc2cc3aaf8 (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=3643128978c682ad80c275bd88a46568a69eba11

commit 3643128978c682ad80c275bd88a46568a69eba11
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Wed Jan 16 19:48:01 2019 +0100

    implement type function. more clean-up loginTest

diff --git a/tests/func/10_Site/loginTest.php b/tests/func/10_Site/loginTest.php
index 7fae6fd..cc524ca 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->byName("form_loginname")->value(FORGE_ADMIN_USERNAME);
+		$this->type("form_loginname", FORGE_ADMIN_USERNAME);
 		$this->type("form_pw", FORGE_ADMIN_PASSWORD);
 		$this->clickAndWait("login");
 		$this->assertTrue($this->isTextPresent("Forge Admin"));
diff --git a/tests/func/SeleniumForge.php b/tests/func/SeleniumForge.php
index cdca27e..9d1b3a7 100644
--- a/tests/func/SeleniumForge.php
+++ b/tests/func/SeleniumForge.php
@@ -194,6 +194,9 @@ class FForge_SeleniumTestCase extends PHPUnit_Extensions_Selenium2TestCase
 		if (preg_match('/^link=/', $link)) {
 			$text = substr($link, 5);
 			$this->byLinkText($text)->click();
+		} else {
+			//default case
+			$this->byName($link)->click();
 		}
 	}
 
@@ -375,15 +378,13 @@ class FForge_SeleniumTestCase extends PHPUnit_Extensions_Selenium2TestCase
 		$this->type("form_pw", $password);
 		$this->clickAndWait("login");
 
-		$this->logged_in = $username ;
+		$this->logged_in = $username;
 	}
 
 	public function logout() {
-//		$this->click("link=Log Out");
 		$this->open( ROOT ."/account/logout.php" );
-		//$this->waitForPageToLoad();
 
-		$this->logged_in = false ;
+		$this->logged_in = false;
 	}
 
 	public function switchUser($username) {
@@ -583,6 +584,10 @@ class FForge_SeleniumTestCase extends PHPUnit_Extensions_Selenium2TestCase
 				'args' => array(),
 			));
 	}
+
+	function type($name, $value) {
+		$this->byName($name)->value($value);
+	}
 }
 
 // Local Variables:

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

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


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list