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  017d2a5e8ad702cfcd8301de84bbc31ddcd16f76 (commit)
      from  b47ab91ef13f116dfbf3debed68c6edea6066c84 (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=017d2a5e8ad702cfcd8301de84bbc31ddcd16f76

commit 017d2a5e8ad702cfcd8301de84bbc31ddcd16f76
Author: Franck Villaume <[email protected]>
Date:   Sun Mar 24 17:10:11 2019 +0100

    try to speed-up the test suite

diff --git a/tests/func/10_Site/loginTest.php b/tests/func/10_Site/loginTest.php
index c72422f..eb5e9af 100644
--- a/tests/func/10_Site/loginTest.php
+++ b/tests/func/10_Site/loginTest.php
@@ -114,7 +114,7 @@ class LoginProcess extends FForge_SeleniumTestCase
                $this->type("passwd", FORGE_OTHER_PASSWORD);
                $this->type("passwd2", FORGE_OTHER_PASSWORD);
                $this->clickAndWait("submit");
-               $this->assertContains('You have changed successfully the 
password', $this->source());
+               $this->assertTrue($this->isTextPresent("You have changed 
successfully the password"));
 
                $this->logout();
                $this->open( ROOT );
diff --git a/tests/func/SeleniumForge.php b/tests/func/SeleniumForge.php
index 04efa5f..c29d4d9 100644
--- a/tests/func/SeleniumForge.php
+++ b/tests/func/SeleniumForge.php
@@ -198,27 +198,35 @@ class FForge_SeleniumTestCase extends 
PHPUnit_Extensions_Selenium2TestCase
                                        'args' => array(),
                                ));
                } else {
-                       if (preg_match('/^link=/', $link)) {
-                               $text = substr($link, 5);
-                               $myelement = $this->byLinkText($text);
-                       } else if (preg_match('/^id=/', $link)) {
-                               $id = substr($link, 3);
-                               $myelement = $this->byId($id);
-                       } else if (preg_match('/^css=/', $link)) {
-                               $css = substr($link, 4);
-                               $myelement = $this->byCssSelector($css);
-                       } else if (preg_match('/^\/\/[a-z]/', $link)) {
-                               $myelement = $this->byXPath($link);
-                       } else {
-                               //default case
-                               $myelement = $this->byName($link);
+                       for ($second = 0; ; $second++) {
+                               if ($second >= 30) $this->fail("timeout");
+                               try {
+                                       if (preg_match('/^link=/', $link)) {
+                                               $text = substr($link, 5);
+                                               $myelement = 
$this->byLinkText($text);
+                                       } else if (preg_match('/^id=/', $link)) 
{
+                                               $id = substr($link, 3);
+                                               $myelement = $this->byId($id);
+                                       } else if (preg_match('/^css=/', 
$link)) {
+                                               $css = substr($link, 4);
+                                               $myelement = 
$this->byCssSelector($css);
+                                       } else if (preg_match('/^\/\/[a-z]/', 
$link)) {
+                                               $myelement = 
$this->byXPath($link);
+                                       } else {
+                                               //default case
+                                               $myelement = 
$this->byName($link);
+                                       }
+                                       if ($myelement->displayed()) break;
+                               } catch (Exception $e) {}
+                               sleep(1);
                        }
-                       sleep(7); // to handle tooltips
+                       sleep(1);
                        try {
                                $myelement->click();
                        } catch (Exception $e) {
                                $this->url($myelement->attribute('href'));
                        }
+                       sleep(1);
                }
        }
 
diff --git a/tests/func/fixtures.sh b/tests/func/fixtures.sh
index a69f8b2..f07fa6e 100755
--- a/tests/func/fixtures.sh
+++ b/tests/func/fixtures.sh
@@ -132,6 +132,7 @@ if [ "$reset" = 1 ]; then
     su - postgres -c "dropdb $database" || true
     $(forge_get_config source_path)/post-install.d/db/db.sh configure
     forge_set_password admin 'my_Admin7'
+    su - postgres -c 'psql fusionforge -c "UPDATE users set tooltips = 0;"'
     service fusionforge-systasksd start
     start_apache
     rm -rf $pgdir.backup-*/

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

Summary of changes:
 tests/func/10_Site/loginTest.php |  2 +-
 tests/func/SeleniumForge.php     | 38 +++++++++++++++++++++++---------------
 tests/func/fixtures.sh           |  1 +
 3 files changed, 25 insertions(+), 16 deletions(-)


hooks/post-receive
-- 
FusionForge

_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits

Reply via email to