Commit 91082bba authored by Vincent Pelletier's avatar Vincent Pelletier

erp5_user_tutorial_ui_test: Use Zuite_CommonTemplate to interact with login form.

parent 86f89d4e
...@@ -65,23 +65,16 @@ ...@@ -65,23 +65,16 @@
<td colspan="3"><b>Login as manager</b></td> <td colspan="3"><b>Login as manager</b></td>
</tr> </tr>
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/logout">Logout</span> <span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/logout">Logout</span>
<tr> <tal:block tal:define="
<td>type</td> login_form_url python: None;
<td>//input[@name="__ac_name"]</td> wait python: False;
<td tal:content="python: submit_name python:'//input[@value=\'Login\']';
here.Zuite_getHowToInfo()['manager_username']"></td> ">
</tr> <tal:block metal:use-macro="python: context.Zuite_CommonTemplate.macros['login']">
<tr> <tal:block metal:fill-slot="username" tal:content="python: here.Zuite_getHowToInfo()['manager_username']"></tal:block>
<td>type</td> <tal:block metal:fill-slot="password" tal:content="python: here.Zuite_getHowToInfo()['manager_password']"></tal:block>
<td>//input[@name="__ac_password"]</td> </tal:block>
<td tal:content="python: </tal:block>
here.Zuite_getHowToInfo()['manager_password']"></td>
</tr>
<tr>
<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 metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
</tal:block> </tal:block>
...@@ -151,23 +144,16 @@ ...@@ -151,23 +144,16 @@
<!-- login with functional test user --> <!-- login with functional test user -->
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/logout">Logout</span> <span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/logout">Logout</span>
<tr> <tal:block tal:define="
<td>type</td> login_form_url python: None;
<td>//input[@name="__ac_name"]</td> wait python: False;
<td tal:content="python: submit_name python:'//input[@value=\'Login\']';
here.Zuite_getHowToInfo()['functional_test_username']"></td> ">
</tr> <tal:block metal:use-macro="python: context.Zuite_CommonTemplate.macros['login']">
<tr> <tal:block metal:fill-slot="username" tal:content="python: here.Zuite_getHowToInfo()['functional_test_username']"></tal:block>
<td>type</td> <tal:block metal:fill-slot="password" tal:content="python: here.Zuite_getHowToInfo()['functional_test_user_password']"></tal:block>
<td>//input[@name="__ac_password"]</td> </tal:block>
<td tal:content="python: </tal:block>
here.Zuite_getHowToInfo()['functional_test_user_password']"></td>
</tr>
<tr>
<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 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>
...@@ -222,23 +208,16 @@ ...@@ -222,23 +208,16 @@
</tr> </tr>
<!-- login with functional test user --> <!-- login with functional test user -->
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/logout">Logout</span> <span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/logout">Logout</span>
<tr> <tal:block tal:define="
<td>type</td> login_form_url python: None;
<td>//input[@name="__ac_name"]</td> wait python: False;
<td tal:content="python: submit_name python:'//input[@value=\'Login\']';
here.Zuite_getHowToInfo()['functional_another_test_username']"></td> ">
</tr> <tal:block metal:use-macro="python: context.Zuite_CommonTemplate.macros['login']">
<tr> <tal:block metal:fill-slot="username" tal:content="python: here.Zuite_getHowToInfo()['functional_another_test_username']"></tal:block>
<td>type</td> <tal:block metal:fill-slot="password" tal:content="python: here.Zuite_getHowToInfo()['functional_test_user_password']"></tal:block>
<td>//input[@name="__ac_password"]</td> </tal:block>
<td tal:content="python: </tal:block>
here.Zuite_getHowToInfo()['functional_test_user_password']"></td>
</tr>
<tr>
<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 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>
...@@ -281,28 +260,10 @@ ...@@ -281,28 +260,10 @@
<td>${base_url}/logout</td> <td>${base_url}/logout</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tal:block metal:use-macro="python: context.Zuite_CommonTemplate.macros['login']">
<td>openAndWait</td> <tal:block metal:fill-slot="username" tal:content="python: here.Zuite_getHowToInfo()['person_howto_reference']"></tal:block>
<td>${base_url}/login_form</td> <tal:block metal:fill-slot="password" tal:content="python: here.Zuite_getHowToInfo()['person_howto_password']"></tal:block>
<td></td> </tal:block>
</tr>
<tr>
<td>type</td>
<td>//input[@name="__ac_name"]</td>
<td tal:content="python:
here.Zuite_getHowToInfo()['person_howto_reference']"></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="__ac_password"]</td>
<td tal:content="python:
here.Zuite_getHowToInfo()['person_howto_password']"></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@name="logged_in:method"]</td>
<td></td>
</tr>
<tr> <tr>
<td>openAndWait</td> <td>openAndWait</td>
<td>${base_url}/view</td> <td>${base_url}/view</td>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment