Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Roque
erp5
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">
<tr>
<td colspan="3"><b>Init test environment</b></td>
</tr>
<tr>
<td>store</td>
<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>
</tr>
<!-- Always initialize browser to English language -->
...
...
@@ -18,24 +21,41 @@
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}
/view
</td>
<td>${base_url}</td>
<td></td>
</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>
</tal:block>
<tal:block metal:define-macro="login_as_manager">
<!-- Login as manager -->
<tal:block metal:define-macro="logout">
<tr>
<td colspan="3"><b>Logout</b></td>
</tr>
<!-- Logout -->
<tr>
<td>openAndWait</td>
<td>${base_url}
/logout
</td>
<td>${base_url}</td>
<td></td>
</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>
<td>
openAndWait
</td>
<td>
${base_url}/login_form
</td>
<td>
click
</td>
<td>
//input[@value="Confirm"]
</td>
<td></td>
</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>
<td>type</td>
<td>//input[@name="__ac_name"]</td>
...
...
@@ -49,25 +69,18 @@
here.Zuite_getHowToInfo()['manager_password']"></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@name="logged_in:method"]</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>click</td>
<td>//input[@value="Login"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
</tal:block>
<tal:block metal:define-macro="wait_for_activities">
<!-- Wait for activities to finish -->
<tr>
<td colspan="3"><b>Wait for activities to finish</b></td>
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/Zuite_waitForActivities</td>
...
...
@@ -96,6 +109,9 @@
</tal:block>
<tal:block metal:define-macro="login_as_functional_test_user">
<tr>
<td colspan="3"><b>Login as functional test user</b></td>
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/Zuite_createFunctionalTestUser</td>
...
...
@@ -117,17 +133,15 @@
<td>Cleared.</td>
<td></td>
</tr>
<!-- login with functional test user -->
<tr>
<td>openAndWait</td>
<td>${base_url}/logout</td>
<td></td>
</tr>
<tr>
<td>open
AndWait
</td>
<td>${base_url}
/login_form
</td>
<td>open</td>
<td>${base_url}</td>
<td></td>
</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>
<td>type</td>
<td>//input[@name="__ac_name"]</td>
...
...
@@ -141,21 +155,11 @@
here.Zuite_getHowToInfo()['functional_test_user_password']"></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@name="logged_in:method"]</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>click</td>
<td>//input[@value="Login"]</td>
<td></td>
</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>
<tr>
<td>openAndWait</td>
...
...
@@ -179,9 +183,10 @@
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}
/view
</td>
<td>${base_url}</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
</tal:block>
<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