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  db55328b46cc99dae502e3ba7e9590d7563f6987 (commit)
      from  4097c21c0bec63bc08bd7011cbc933cc734d81a8 (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=db55328b46cc99dae502e3ba7e9590d7563f6987

commit db55328b46cc99dae502e3ba7e9590d7563f6987
Author: Franck Villaume <[email protected]>
Date:   Sat Jan 19 17:48:49 2019 +0100

    implement byId in type function. fixes in 10_ & 20_ tests

diff --git a/tests/func/10_Site/loginTest.php b/tests/func/10_Site/loginTest.php
index 982a672..fd410fc 100644
--- a/tests/func/10_Site/loginTest.php
+++ b/tests/func/10_Site/loginTest.php
@@ -2,6 +2,7 @@
 /**
  * Copyright (C) 2008 Alain Peyrat <[email protected]>
  * Copyright (C) 2009 Alain Peyrat, Alcatel-Lucent
+ * Copyright 2019, Franck Villaume - TrivialDev
  *
  * This file is part of FusionForge.
  *
diff --git a/tests/func/10_Site/projectsTest.php 
b/tests/func/10_Site/projectsTest.php
index 0426aa6..c4df5fe 100644
--- a/tests/func/10_Site/projectsTest.php
+++ b/tests/func/10_Site/projectsTest.php
@@ -2,7 +2,7 @@
 /**
  * Copyright (C) 2008 Alain Peyrat <[email protected]>
  * Copyright (C) 2009 Alain Peyrat, Alcatel-Lucent
- * Copyright 2013, Franck Villaume - TrivialDev
+ * Copyright 2013,2019, Franck Villaume - TrivialDev
  *
  * This file is part of FusionForge.
  *
diff --git a/tests/func/10_Site/troveTest.php b/tests/func/10_Site/troveTest.php
index 57480f1..750fbdc 100644
--- a/tests/func/10_Site/troveTest.php
+++ b/tests/func/10_Site/troveTest.php
@@ -1,6 +1,7 @@
 <?php
 /**
  * Copyright (C) 2009 Alain Peyrat <[email protected]>
+ * Copyright 2019, Franck Villaume - TrivialDev
  *
  * This file is part of FusionForge.
  *
@@ -27,44 +28,44 @@ class Trove extends FForge_SeleniumTestCase
        {
                $this->open( ROOT );
                $this->login(FORGE_ADMIN_USERNAME);
-               $this->click("link=Site Admin");
+               $this->url(ROOT."/admin/");
                $this->waitForPageToLoad("30000");
-               $this->click("link=Display Trove Map");
+               $this->clickAndWait("link=Display Trove Map");
                $this->waitForPageToLoad("30000");
 
                // Test simple modification of an entry (beta => beta2)
-               $this->click("//a[contains(@href, 
'trove_cat_edit.php?trove_cat_id=10')]");
+               $this->clickAndWait("//a[contains(@href, 
'trove_cat_edit.php?trove_cat_id=10')]");
                $this->waitForPageToLoad("30000");
                $this->type("form_shortname", "beta2");
                $this->type("form_fullname", "4 - Beta2");
                $this->type("form_description", "Resource2 is in late phases of 
development. Deliverables are essentially complete, but may still have 
significant bugs.");
-               $this->click("submit");
+               $this->clickAndWait("submit");
                $this->waitForPageToLoad("30000");
                $this->assertTrue($this->isTextPresent("4 - Beta2"));
 
                // Test removal of an entry (beta2) (leaf)
-               $this->click("//a[contains(@href, 
'trove_cat_edit.php?trove_cat_id=10')]");
+               $this->clickAndWait("//a[contains(@href, 
'trove_cat_edit.php?trove_cat_id=10')]");
                $this->waitForPageToLoad("30000");
-               $this->click("delete");
+               $this->clickAndWait("delete");
                $this->waitForPageToLoad("30000");
                $this->assertFalse($this->isTextPresent("4 - Beta2"));
 
                // Test creation of a new entry (test)
-               $this->click("link=Site Admin");
+               $this->clickAndWait("link=Site Admin");
                $this->waitForPageToLoad("30000");
-               $this->click("link=Add to the Trove Map");
+               $this->clickAndWait("link=Add to the Trove Map");
                $this->waitForPageToLoad("30000");
                $this->type("form_shortname", "Test");
                $this->type("form_fullname", "Test");
                $this->type("form_description", "This is a test");
-               $this->click("submit");
+               $this->clickAndWait("submit");
                $this->waitForPageToLoad("30000");
                $this->assertTrue($this->isTextPresent("Test"));
 
                // Test removal of a non empty entry (Microsoft).
-               $this->click("//a[contains(@href, 
'trove_cat_edit.php?trove_cat_id=214')]");
+               $this->clickAndWait("//a[contains(@href, 
'trove_cat_edit.php?trove_cat_id=214')]");
                $this->waitForPageToLoad("30000");
-               $this->click("delete");
+               $this->clickAndWait("delete");
                $this->waitForPageToLoad("30000");
                $this->assertTrue($this->isTextPresent("Test"));
                $this->assertFalse($this->isTextPresent("Microsoft"));
diff --git a/tests/func/20_Docs/createDocURLTest.php 
b/tests/func/20_Docs/createDocURLTest.php
index 81542a3..155d13d 100644
--- a/tests/func/20_Docs/createDocURLTest.php
+++ b/tests/func/20_Docs/createDocURLTest.php
@@ -2,7 +2,7 @@
 /**
  * Copyright (C) 2010-2013 Alain Peyrat - Alcatel-Lucent
  * Copyright 2010-2011, Franck Villaume - Capgemini
- * Copyright 2013,2015-2016, Franck Villaume - TrivialDev
+ * Copyright 2013,2015-2016,2019, Franck Villaume - TrivialDev
  * Copyright (C) 2015  Inria (Sylvain Beucler)
  *
  * This file is part of FusionForge.
@@ -58,14 +58,14 @@ class CreateDocURL extends FForge_SeleniumTestCase {
                $this->clickAndWait("addItemDocmanMenu");
                // ugly hack until we fix behavior in docman when no folders 
exist. We need to click twice on the link
                $this->clickAndWait("addItemDocmanMenu");
-               $this->click("id=tabs-new-folder");
+               $this->clickAndWait("id=tabs-new-folder");
                $this->type("groupname", "docdirectory");
                $this->clickAndWait("submitaddsubgroup");
                $this->clickAndWait("addItemDocmanMenu");
                $this->click("id=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->click("//input[@name='type' and @value='pasteurl']");
+               $this->clickAndWait("//input[@name='type' and 
@value='pasteurl']");
                $this->type("//input[@name='file_url']", URL."/terms.php");
                $this->clickAndWait("submit");
                $this->assertTextPresent("Document ".URL."/terms.php submitted 
successfully");
@@ -91,11 +91,11 @@ class CreateDocURL extends FForge_SeleniumTestCase {
                $this->clickAndWait("addItemDocmanMenu");
                // ugly hack until we fix behavior in docman when no folders 
exist. We need to click twice on the link
                $this->clickAndWait("addItemDocmanMenu");
-               $this->click("id=tab-new-document");
+               $this->clickAndWait("id=tab-new-document");
                $this->type("title", "My document");
                $this->type("//textarea[@name='description']", "My 
Description");
                $this->type("//textarea[@name='vcomment']", "My Comment");
-               $this->click("//input[@name='type' and @value='pasteurl']");
+               $this->clickAndWait("//input[@name='type' and 
@value='pasteurl']");
                $this->type("file_url", URL."/terms.php");
                $this->clickAndWait("//input[@name='submit' and @value='Submit 
Information']");
                $this->assertTextPresent("Document ".URL."/terms.php submitted 
successfully");
@@ -105,7 +105,7 @@ class CreateDocURL extends FForge_SeleniumTestCase {
                $this->clickAndWait("addItemDocmanMenu");
                $this->type("title", " My document ");
                $this->type("//textarea[@name='description']", "My 
Description");
-               $this->click("//input[@name='type' and @value='pasteurl']");
+               $this->clickAndWait("//input[@name='type' and 
@value='pasteurl']");
                $this->type("file_url", URL."/terms.php");
                $this->clickAndWait("//input[@name='submit' and @value='Submit 
Information']");
                $this->assertTextPresent("Document already published in this 
folder");
@@ -120,10 +120,10 @@ class CreateDocURL extends FForge_SeleniumTestCase {
                $this->clickAndWait("addItemDocmanMenu");
                // ugly hack until we fix behavior in docman when no folders 
exist. We need to click twice on the link
                $this->clickAndWait("addItemDocmanMenu");
-               $this->click("id=tab-new-document");
+               $this->clickAndWait("id=tab-new-document");
                $this->type("title", "My document");
                $this->type("//textarea[@name='description']", "My 
Description");
-               $this->click("//input[@name='type' and @value='pasteurl']");
+               $this->clickAndWait("//input[@name='type' and 
@value='pasteurl']");
                $this->type("file_url", URL."/terms.php");
                $this->clickAndWait("//input[@name='submit' and @value='Submit 
Information']");
                $this->assertTextPresent("Document ".URL."/terms.php submitted 
successfully");
@@ -132,7 +132,7 @@ class CreateDocURL extends FForge_SeleniumTestCase {
                $this->click("css=img[alt='editdocument']");
                $this->pause("10000");
                $this->assertTextPresent("1 (x)");
-               $this->select('id=stateid', 'label=pending');
+               
$this->select($this->byId('stateid'))->selectOptionByLabel('pending');
                $this->clickAndWait("xpath=(//button[@type='button'])[3]");
                $this->assertTextPresent("updated successfully");
                $this->assertTextPresent("Pending files");
diff --git a/tests/func/20_Docs/folderTest.php 
b/tests/func/20_Docs/folderTest.php
index a26d091..1b38874 100644
--- a/tests/func/20_Docs/folderTest.php
+++ b/tests/func/20_Docs/folderTest.php
@@ -33,12 +33,12 @@ class folderTest extends FForge_SeleniumTestCase {
                $this->clickAndWait("addItemDocmanMenu");
                // ugly hack until we fix behavior in docman when no folders 
exist. We need to click twice on the link
                $this->clickAndWait("addItemDocmanMenu");
-               $this->click("id=tabs-new-folder");
+               $this->clickAndWait("id=tabs-new-folder");
                $this->type("groupname", "renamedirectory");
                $this->clickAndWait("submitaddsubgroup");
                $this->clickAndWait("id=listFileDocmanMenu");
                $this->clickAndWait("link=renamedirectory");
-               $this->click("//a[@id='docman-editdirectory']/img");
+               $this->clickAndWait("//a[@id='docman-editdirectory']/img");
                $this->type("document.editgroup.groupname", "renamedirectory2");
                $this->clickAndWait("document.editgroup.elements['submit']");
                $this->assertTextPresent("Documents folder renamedirectory2 
updated successfully");
diff --git a/tests/func/SeleniumForge.php b/tests/func/SeleniumForge.php
index 3923d66..69bbe8b 100644
--- a/tests/func/SeleniumForge.php
+++ b/tests/func/SeleniumForge.php
@@ -2,7 +2,7 @@
 /**
  * Copyright (C) 2007-2008 Alain Peyrat <aljeux at free dot fr>
  * Copyright (C) 2009 Alain Peyrat, Alcatel-Lucent
- * Copyright 2013, Franck Villaume - TrivialDev
+ * Copyright 2013,2019, Franck Villaume - TrivialDev
  * Copyright (C) 2015  Inria (Sylvain Beucler)
  *
  * This file is part of FusionForge.
@@ -194,6 +194,9 @@ class FForge_SeleniumTestCase extends 
PHPUnit_Extensions_Selenium2TestCase
                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('/^\/\/[a-z]/', $link)) {
                        $myelement = $this->byXpath($link);
                } else {
@@ -269,7 +272,7 @@ class FForge_SeleniumTestCase extends 
PHPUnit_Extensions_Selenium2TestCase
                $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") ;
+               
$this->select($this->byXPath("//select[@name='form_template']"))->selectOptionByLabel("Yes");
                $this->clickAndWait("submit");
 
                $this->open( ROOT . '/projects/tmpl') ;

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

Summary of changes:
 tests/func/10_Site/loginTest.php        |  1 +
 tests/func/10_Site/projectsTest.php     |  2 +-
 tests/func/10_Site/troveTest.php        | 23 ++++++++++++-----------
 tests/func/20_Docs/createDocURLTest.php | 18 +++++++++---------
 tests/func/20_Docs/folderTest.php       |  4 ++--
 tests/func/SeleniumForge.php            |  7 +++++--
 6 files changed, 30 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