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  317825726688609e0d806faeb6e03051a6756b98 (commit)
      from  c98a93f28c79799808c3db36372ab70ec178741a (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=317825726688609e0d806faeb6e03051a6756b98

commit 317825726688609e0d806faeb6e03051a6756b98
Author: Franck Villaume <[email protected]>
Date:   Sun Jan 20 20:20:18 2019 +0100

    let increase wait to 15000 usec. try to use jquery as workaround for jquery 
tabs

diff --git a/tests/func/20_Docs/createDocURLTest.php 
b/tests/func/20_Docs/createDocURLTest.php
index 06d93e0..10e2df2 100644
--- a/tests/func/20_Docs/createDocURLTest.php
+++ b/tests/func/20_Docs/createDocURLTest.php
@@ -58,11 +58,11 @@ class CreateDocURL extends FForge_SeleniumTestCase {
                $this->clickAndWait("id=addItemDocmanMenu");
                // ugly hack until we fix behavior in docman when no folders 
exist. We need to click twice on the link
                $this->clickAndWait("id=addItemDocmanMenu");
-               $this->clickAndWait("id=tabs-new-folder");
+               $this->clickAndWait("jquery#tabs-new-folder");
                $this->type("groupname", "docdirectory");
                $this->clickAndWait("id=submitaddsubgroup");
                $this->clickAndWait("id=addItemDocmanMenu");
-               $this->clickAndWait("id=tabs-new-document");
+               $this->clickAndWait("jquery#tabs-new-document");
                $this->type("title", "My document");
                $this->type("//textarea[@name='description']", "L'année 
dernière à Noël, 3 < 4, 中国 \" <em>, père & fils");
                $this->clickAndWait("//input[@name='type' and 
@value='pasteurl']");
@@ -91,7 +91,7 @@ class CreateDocURL extends FForge_SeleniumTestCase {
                $this->clickAndWait("id=addItemDocmanMenu");
                // ugly hack until we fix behavior in docman when no folders 
exist. We need to click twice on the link
                $this->clickAndWait("id=addItemDocmanMenu");
-               $this->clickAndWait("id=tab-new-document");
+               $this->clickAndWait("jquery#tabs-new-document");
                $this->type("title", "My document");
                $this->type("//textarea[@name='description']", "My 
Description");
                $this->type("//textarea[@name='vcomment']", "My Comment");
@@ -120,7 +120,7 @@ class CreateDocURL extends FForge_SeleniumTestCase {
                $this->clickAndWait("id=addItemDocmanMenu");
                // ugly hack until we fix behavior in docman when no folders 
exist. We need to click twice on the link
                $this->clickAndWait("id=addItemDocmanMenu");
-               $this->clickAndWait("id=tab-new-document");
+               $this->clickAndWait("jquery#tabs-new-document");
                $this->type("title", "My document");
                $this->type("//textarea[@name='description']", "My 
Description");
                $this->clickAndWait("//input[@name='type' and 
@value='pasteurl']");
@@ -147,7 +147,7 @@ class CreateDocURL extends FForge_SeleniumTestCase {
                $this->clickAndWait("id=addItemDocmanMenu");
                // ugly hack until we fix behavior in docman when no folders 
exist. We need to click twice on the link
                $this->clickAndWait("id=addItemDocmanMenu");
-               $this->clickAndWait("id=tab-new-document");
+               $this->clickAndWait("jquery#tabs-new-document");
                $this->type("title", "My document");
                $this->type("//textarea[@name='description']", "My 
Description");
                $this->clickAndWait("//input[@name='type' and 
@value='pasteurl']");
diff --git a/tests/func/SeleniumForge.php b/tests/func/SeleniumForge.php
index 1c0f59c..cd43cef 100644
--- a/tests/func/SeleniumForge.php
+++ b/tests/func/SeleniumForge.php
@@ -191,26 +191,34 @@ class FForge_SeleniumTestCase extends 
PHPUnit_Extensions_Selenium2TestCase
        }
 
        public function clickAndWait($link) {
-               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);
+               if (preg_match('/^jquery#/', $link)) {
+                       $elementid = substr();
+                       $this->execute(array(
+                                       'script' => 
"jQuery('a[href=\"#$elementid\").click()",
+                                       'args' => array(),
+                               ));
                } else {
-                       //default case
-                       $myelement = $this->byName($link);
-               }
-               sleep(7); // to handle tooltips
-               try {
-                       $myelement->click();
-               } catch (Exception $e) {
-                       $this->url($myelement->attribute('href'));
+                       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);
+                       }
+                       sleep(7); // to handle tooltips
+                       try {
+                               $myelement->click();
+                       } catch (Exception $e) {
+                               $this->url($myelement->attribute('href'));
+                       }
                }
        }
 
@@ -623,7 +631,7 @@ class FForge_SeleniumTestCase extends 
PHPUnit_Extensions_Selenium2TestCase
                }
        }
 
-       function waitForPageToLoad($integer = 10000) {
+       function waitForPageToLoad($integer = 15000) {
                //do we need to set something???
                usleep($integer);
        }

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

Summary of changes:
 tests/func/20_Docs/createDocURLTest.php | 10 +++----
 tests/func/SeleniumForge.php            | 48 +++++++++++++++++++--------------
 2 files changed, 33 insertions(+), 25 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