From a4c422316b2c9ea0f525b4f06ac2fb7d082bde7b Mon Sep 17 00:00:00 2001
From: Gabriel Monnerat <gabriel@tiolive.com>
Date: Wed, 13 Apr 2011 16:40:54 +0000
Subject: [PATCH] - Use user created by macro - store document url to test the
 sharing of document

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45393 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../ung_zuite/testShareDocumentInUNGDocs.xml  | 60 +++----------------
 bt5/erp5_web_ung_ui_test/bt/revision          |  2 +-
 2 files changed, 9 insertions(+), 53 deletions(-)

diff --git a/bt5/erp5_web_ung_ui_test/PathTemplateItem/portal_tests/ung_zuite/testShareDocumentInUNGDocs.xml b/bt5/erp5_web_ung_ui_test/PathTemplateItem/portal_tests/ung_zuite/testShareDocumentInUNGDocs.xml
index e447e55101..b58ccd7954 100644
--- a/bt5/erp5_web_ung_ui_test/PathTemplateItem/portal_tests/ung_zuite/testShareDocumentInUNGDocs.xml
+++ b/bt5/erp5_web_ung_ui_test/PathTemplateItem/portal_tests/ung_zuite/testShareDocumentInUNGDocs.xml
@@ -48,22 +48,7 @@
       <tr><td rowspan="1" colspan="3" tal:content="template/getId"/></tr>\n
     </thead><tbody>\n
       <tal:block metal:use-macro="here/Zuite_CommonTemplateForUNG/macros/init" />\n
-      <tal:block metal:use-macro="here/Zuite_CommonTemplateForUNG/macros/create-user" />\n
-      <tr>\n
-        <td>type</td>\n
-        <td>__ac_name</td>\n
-        <td>ung_user</td>\n
-      </tr>\n
-      <tr>\n
-        <td>type</td>\n
-        <td>__ac_password</td>\n
-        <td>1234</td>\n
-      </tr>\n
-      <tr>\n
-        <td>clickAndWait</td>\n
-        <td>//input[@type="submit"]</td>\n
-        <td></td>\n
-      </tr>\n
+      <tal:block metal:use-macro="here/Zuite_CommonTemplateForUNG/macros/login" />\n
       <tr>\n
         <td>openAndWait</td>\n
         <td>${ung_url}/ERP5Site_createNewWebDocument?template=web_page_template</td>\n
@@ -84,11 +69,6 @@
         <td>//p[@id="more_properties"]</td>\n
         <td></td>\n
       </tr>\n
-      <tr>\n
-        <td>type</td>\n
-        <td>//input[@id="reference"]</td>\n
-        <td>web.Page.UNG.Test</td>\n
-      </tr>\n
       <tr>\n
         <td>type</td>\n
         <td>//input[@id="version"]</td>\n
@@ -119,11 +99,6 @@
         <td>//p[@id="more_properties"]</td>\n
         <td></td>\n
       </tr>\n
-      <tr>\n
-        <td>verifyValue</td>\n
-        <td>//input[@id="reference"]</td>\n
-        <td>web.Page.UNG.Test</td>\n
-      </tr>\n
       <tr>\n
         <td>verifyValue</td>\n
         <td>//input[@id="version"]</td>\n
@@ -154,6 +129,11 @@
         <td>//a[@name="document_state"]</td>\n
         <td>Shared</td>\n
       </tr>\n
+      <tr>\n
+        <td>storeText</td>\n
+        <td>//span[@id="sharing_url"]</td>\n
+        <td>document_url</td>\n
+      </tr>      \n
       <tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities"/>\n
       <tr>\n
         <td>openAndWait</td>\n
@@ -242,7 +222,7 @@
       </tr>\n
       <tr>\n
         <td>openAndWait</td>\n
-        <td>${ung_url}/?key=web.Page.UNG.Test</td>\n
+        <td>${document_url}</td>\n
         <td></td>\n
       </tr>\n
       <tr>\n
@@ -275,11 +255,6 @@
         <td>//textarea[@id="keyword_list"]</td>\n
         <td>My Subject</td>\n
       </tr>\n
-      <tr>\n
-        <td>type</td>\n
-        <td>//input[@id="reference"]</td>\n
-        <td>web.Page.Change.Reference</td>\n
-      </tr>\n
       <tr>\n
         <td>clickAndWait</td>\n
         <td>//div[@class="ui-dialog-buttonset"]/button[1]</td>\n
@@ -290,21 +265,7 @@
         <td>${ung_url}/WebSite_logout</td>\n
         <td></td>\n
       </tr>\n
-      <tr>\n
-        <td>type</td>\n
-        <td>__ac_name</td>\n
-        <td>ung_user</td>\n
-      </tr>\n
-      <tr>\n
-        <td>type</td>\n
-        <td>__ac_password</td>\n
-        <td>1234</td>\n
-      </tr>\n
-      <tr>\n
-        <td>clickAndWait</td>\n
-        <td>//input[@type="submit"]</td>\n
-        <td></td>\n
-      </tr>\n
+      <tal:block metal:use-macro="here/Zuite_CommonTemplateForUNG/macros/login" />\n
       <tr>\n
         <td>clickAndWait</td>\n
         <td>//table[@class="listbox your_listbox your_listbox-table"]/tbody/tr/td[3]/a</td>\n
@@ -320,11 +281,6 @@
         <td>//p[@id="more_properties"]</td>\n
         <td></td>\n
       </tr>\n
-      <tr>\n
-        <td>verifyValue</td>\n
-        <td>//input[@id="reference"]</td>\n
-        <td>web.Page.Change.Reference</td>\n
-      </tr>\n
       <tr>\n
         <td>type</td>\n
         <td>//input[@id="version"]</td>\n
diff --git a/bt5/erp5_web_ung_ui_test/bt/revision b/bt5/erp5_web_ung_ui_test/bt/revision
index 31ff414b74..2e66562e27 100644
--- a/bt5/erp5_web_ung_ui_test/bt/revision
+++ b/bt5/erp5_web_ung_ui_test/bt/revision
@@ -1 +1 @@
-48
\ No newline at end of file
+49
\ No newline at end of file
-- 
2.30.9