Commit 86f89d4e authored by Vincent Pelletier's avatar Vincent Pelletier

erp5_advanced_ecommerce_test: Use Zuite_CommonTemplate to interact with login form.

parent 6ec5b994
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal" <tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"> xmlns:metal="http://xml.zope.org/namespaces/metal">
<tal:block metal:define-macro="login_as_super_user"> <tal:block metal:define-macro="login_as_super_user">
<tr> <tal:block metal:define-macro="logout">
<td>openAndWait</td> <tr>
<td>${base_url}/login_form</td> <td>openAndWait</td>
<td></td> <td>${base_url}/logout</td>
</tr> <td></td>
<tr> </tr>
<td>type</td> <tr>
<td>//input[@name="__ac_name"]</td> <td>waitForTextPresent</td>
<td>super_user</td> <td>Log in</td>
</tr> <td></td>
<tr> </tr>
<td>type</td> </tal:block>
<td>//input[@name="__ac_password"]</td> <tal:block tal:define="submit_name python:'//input[@value=\'Login\']'">
<td>super_user</td> <tal:block metal:use-macro="python: context.Zuite_CommonTemplate.macros['login']">
</tr> <tal:block metal:fill-slot="username">super_user</tal:block>
<tr> <tal:block metal:fill-slot="password">super_user</tal:block>
<td>clickAndWait</td> </tal:block>
<td>//input[@value="Login"]</td> </tal:block>
<td></td>
</tr>
<tr> <tr>
<td>verifyTextPresent</td> <td>verifyTextPresent</td>
<td>Welcome to ERP5</td> <td>Welcome to ERP5</td>
...@@ -28,19 +26,6 @@ ...@@ -28,19 +26,6 @@
</tr> </tr>
</tal:block> </tal:block>
<tal:block metal:define-macro="logout">
<tr>
<td>openAndWait</td>
<td>${base_url}/logout</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Log in</td>
<td></td>
</tr>
</tal:block>
<tal:block metal:define-macro="reset_shopcart"> <tal:block metal:define-macro="reset_shopcart">
<tr> <tr>
<td>openAndWait</td> <td>openAndWait</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