Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5_fork
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eteri
erp5_fork
Commits
3db2e1ef
Commit
3db2e1ef
authored
Feb 19, 2021
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_user_tutorial_ui_test: Update some macros in Zuite_viewTestMacroLibrary.zpt for ERP5JS UI
parent
f2e2b29b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
44 deletions
+49
-44
bt5/erp5_user_tutorial_ui_test/SkinTemplateItem/portal_skins/erp5_user_tutorial_ui_test/Zuite_viewTestMacroLibrary.zpt
...erp5_user_tutorial_ui_test/Zuite_viewTestMacroLibrary.zpt
+49
-44
No files found.
bt5/erp5_user_tutorial_ui_test/SkinTemplateItem/portal_skins/erp5_user_tutorial_ui_test/Zuite_viewTestMacroLibrary.zpt
View file @
3db2e1ef
<tal:block metal:define-macro="init_test_environment">
<tal:block metal:define-macro="init_test_environment">
<tr>
<td colspan="3"><b>Init test environment</b></td>
</tr>
<tr>
<tr>
<td>store</td>
<td>store</td>
<td tal:content="python:
<td tal:content="python:
here.REQUEST.get('URL')[0:here.REQUEST.get('URL').find('/portal_tests/')]
">erp5
</td>
here.REQUEST.get('URL')[0:here.REQUEST.get('URL').find('/portal_tests/')]
+ '/web_site_module/osoe_runner/'">
</td>
<td>base_url</td>
<td>base_url</td>
</tr>
</tr>
<!-- Always initialize browser to English language -->
<!-- Always initialize browser to English language -->
...
@@ -18,24 +21,41 @@
...
@@ -18,24 +21,41 @@
</tr>
</tr>
<tr>
<tr>
<td>openAndWait</td>
<td>openAndWait</td>
<td>${base_url}
/view
</td>
<td>${base_url}</td>
<td></td>
<td></td>
</tr>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_manager">Login As Manager</span>
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_manager">Login As Manager</span>
</tal:block>
</tal:block>
<tal:block metal:define-macro="login_as_manager">
<tal:block metal:define-macro="logout">
<!-- Login as manager -->
<tr>
<td colspan="3"><b>Logout</b></td>
</tr>
<!-- Logout -->
<tr>
<tr>
<td>openAndWait</td>
<td>openAndWait</td>
<td>${base_url}
/logout
</td>
<td>${base_url}</td>
<td></td>
<td></td>
</tr>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Logout'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<tr>
<td>
openAndWait
</td>
<td>
click
</td>
<td>
${base_url}/login_form
</td>
<td>
//input[@value="Confirm"]
</td>
<td></td>
<td></td>
</tr>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
</tal:block>
<tal:block metal:define-macro="login_as_manager">
<tr>
<td colspan="3"><b>Login as manager</b></td>
</tr>
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/logout">Logout</span>
<tr>
<tr>
<td>type</td>
<td>type</td>
<td>//input[@name="__ac_name"]</td>
<td>//input[@name="__ac_name"]</td>
...
@@ -49,25 +69,18 @@
...
@@ -49,25 +69,18 @@
here.Zuite_getHowToInfo()['manager_password']"></td>
here.Zuite_getHowToInfo()['manager_password']"></td>
</tr>
</tr>
<tr>
<tr>
<td>clickAndWait</td>
<td>click</td>
<td>//input[@name="logged_in:method"]</td>
<td>//input[@value="Login"]</td>
<td></td>
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/view</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td tal:content="python:
here.Zuite_getHowToInfo()['manager_username']"></td>
<td></td>
<td></td>
</tr>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
</tal:block>
</tal:block>
<tal:block metal:define-macro="wait_for_activities">
<tal:block metal:define-macro="wait_for_activities">
<!-- Wait for activities to finish -->
<!-- Wait for activities to finish -->
<tr>
<td colspan="3"><b>Wait for activities to finish</b></td>
</tr>
<tr>
<tr>
<td>openAndWait</td>
<td>openAndWait</td>
<td>${base_url}/Zuite_waitForActivities</td>
<td>${base_url}/Zuite_waitForActivities</td>
...
@@ -96,6 +109,9 @@
...
@@ -96,6 +109,9 @@
</tal:block>
</tal:block>
<tal:block metal:define-macro="login_as_functional_test_user">
<tal:block metal:define-macro="login_as_functional_test_user">
<tr>
<td colspan="3"><b>Login as functional test user</b></td>
</tr>
<tr>
<tr>
<td>openAndWait</td>
<td>openAndWait</td>
<td>${base_url}/Zuite_createFunctionalTestUser</td>
<td>${base_url}/Zuite_createFunctionalTestUser</td>
...
@@ -117,17 +133,15 @@
...
@@ -117,17 +133,15 @@
<td>Cleared.</td>
<td>Cleared.</td>
<td></td>
<td></td>
</tr>
</tr>
<!-- login with functional test user -->
<tr>
<td>openAndWait</td>
<td>${base_url}/logout</td>
<td></td>
</tr>
<tr>
<tr>
<td>open
AndWait
</td>
<td>open</td>
<td>${base_url}
/login_form
</td>
<td>${base_url}</td>
<td></td>
<td></td>
</tr>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<!-- login with functional test user -->
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/logout">Logout</span>
<tr>
<tr>
<td>type</td>
<td>type</td>
<td>//input[@name="__ac_name"]</td>
<td>//input[@name="__ac_name"]</td>
...
@@ -141,21 +155,11 @@
...
@@ -141,21 +155,11 @@
here.Zuite_getHowToInfo()['functional_test_user_password']"></td>
here.Zuite_getHowToInfo()['functional_test_user_password']"></td>
</tr>
</tr>
<tr>
<tr>
<td>clickAndWait</td>
<td>click</td>
<td>//input[@name="logged_in:method"]</td>
<td>//input[@value="Login"]</td>
<td></td>
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/view</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td tal:content="python:
here.Zuite_getHowToInfo()['functional_test_username']"></td>
<td></td>
<td></td>
</tr>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities</span>
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities</span>
<tr>
<tr>
<td>openAndWait</td>
<td>openAndWait</td>
...
@@ -179,9 +183,10 @@
...
@@ -179,9 +183,10 @@
</tr>
</tr>
<tr>
<tr>
<td>openAndWait</td>
<td>openAndWait</td>
<td>${base_url}
/view
</td>
<td>${base_url}</td>
<td></td>
<td></td>
</tr>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
</tal:block>
</tal:block>
<tal:block metal:define-macro="login_as_functional_another_test_user">
<tal:block metal:define-macro="login_as_functional_another_test_user">
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment