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">
<tal:block metal:define-macro="logout">
<tr> <tr>
<td>openAndWait</td> <td>openAndWait</td>
<td>${base_url}/login_form</td> <td>${base_url}/logout</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>waitForTextPresent</td>
<td>//input[@name="__ac_name"]</td> <td>Log in</td>
<td>super_user</td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="__ac_password"]</td>
<td>super_user</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@value="Login"]</td>
<td></td> <td></td>
</tr> </tr>
</tal:block>
<tal:block tal:define="submit_name python:'//input[@value=\'Login\']'">
<tal:block metal:use-macro="python: context.Zuite_CommonTemplate.macros['login']">
<tal:block metal:fill-slot="username">super_user</tal:block>
<tal:block metal:fill-slot="password">super_user</tal:block>
</tal:block>
</tal:block>
<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