Commit 3beaf49e authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_advanced_ecommerce_test: update tests

parent 46b3ab24
...@@ -41,6 +41,18 @@ ...@@ -41,6 +41,18 @@
<td></td> <td></td>
</tr> </tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@class="login_old_style" and contains(text(), 'using a traditional account')]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[@class="login_old_style" and contains(text(), 'using a traditional account')]</td>
<td></td>
</tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>waitForTextPresent</td>
<td>Password</td> <td>Password</td>
......
...@@ -302,6 +302,18 @@ ...@@ -302,6 +302,18 @@
<td></td> <td></td>
</tr> </tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@class="login_old_style" and contains(text(), 'using a traditional account')]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[@class="login_old_style" and contains(text(), 'using a traditional account')]</td>
<td></td>
</tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>//input[@name="__ac_name"]</td> <td>//input[@name="__ac_name"]</td>
......
...@@ -64,41 +64,8 @@ ...@@ -64,41 +64,8 @@
<td>${base_url}/web_site_module/ecommerce_example</td> <td>${base_url}/web_site_module/ecommerce_example</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="header_login"]</td>
<td></td>
</tr>
<tr> <tal:block metal:use-macro="here/ZuiteAdvancedECommerce_CommonTemplate/macros/login_as_normal_user" />
<td>clickAndWait</td>
<td>//div[@class="header_login"]//a</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="__ac_name"]</td>
<td>1</td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="__ac_password"]</td>
<td>1</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@value="Login"]</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>You are logged</td>
<td></td>
</tr>
<tr> <tr>
<td>verifyElementNotPresent</td> <td>verifyElementNotPresent</td>
...@@ -165,6 +132,19 @@ ...@@ -165,6 +132,19 @@
<td></td> <td></td>
</tr> </tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@class="login_old_style" and contains(text(), 'using a traditional account')]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[@class="login_old_style" and contains(text(), 'using a traditional account')]</td>
<td></td>
</tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>//input[@name="__ac_name"]</td> <td>//input[@name="__ac_name"]</td>
......
...@@ -81,41 +81,8 @@ ...@@ -81,41 +81,8 @@
<td></td> <td></td>
</tr> </tr>
<tr> <tal:block metal:use-macro="here/ZuiteAdvancedECommerce_CommonTemplate/macros/login_as_normal_user" />
<td>waitForElementPresent</td>
<td>//div[@class="header_login"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//div[@class="header_login"]//a</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="__ac_name"]</td>
<td>1</td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="__ac_password"]</td>
<td>1</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@value="Login"]</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>You are logged</td>
<td></td>
</tr>
<tr> <tr>
<td>clickAndWait</td> <td>clickAndWait</td>
<td>//a[contains(text(), "Join the Loyalty Program")]</td> <td>//a[contains(text(), "Join the Loyalty Program")]</td>
......
...@@ -80,41 +80,9 @@ ...@@ -80,41 +80,9 @@
<td>${base_url}/web_site_module/ecommerce_example</td> <td>${base_url}/web_site_module/ecommerce_example</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="header_login"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//div[@class="header_login"]//a</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="__ac_name"]</td>
<td>1</td>
</tr>
<tr> <tal:block metal:use-macro="here/ZuiteAdvancedECommerce_CommonTemplate/macros/login_as_normal_user" />
<td>type</td>
<td>//input[@name="__ac_password"]</td>
<td>1</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@value="Login"]</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>You are logged</td>
<td></td>
</tr>
<tr> <tr>
<td>clickAndWait</td> <td>clickAndWait</td>
<td>//a[contains(text(), "Join the Loyalty Program")]</td> <td>//a[contains(text(), "Join the Loyalty Program")]</td>
......
...@@ -68,41 +68,9 @@ ...@@ -68,41 +68,9 @@
<td>${base_url}/web_site_module/ecommerce_example</td> <td>${base_url}/web_site_module/ecommerce_example</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="header_login"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//div[@class="header_login"]//a</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="__ac_name"]</td>
<td>1</td>
</tr>
<tr> <tal:block metal:use-macro="here/ZuiteAdvancedECommerce_CommonTemplate/macros/login_as_normal_user" />
<td>type</td>
<td>//input[@name="__ac_password"]</td>
<td>1</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@value="Login"]</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>You are logged</td>
<td></td>
</tr>
<tr> <tr>
<td>clickAndWait</td> <td>clickAndWait</td>
<td>//a[contains(text(), "Join the Loyalty Program")]</td> <td>//a[contains(text(), "Join the Loyalty Program")]</td>
......
...@@ -87,29 +87,8 @@ ...@@ -87,29 +87,8 @@
</tr> </tr>
<!-- now login and set loyalty reward to enable --> <!-- now login and set loyalty reward to enable -->
<tr> <tal:block metal:use-macro="here/ZuiteAdvancedECommerce_CommonTemplate/macros/login_as_normal_user" />
<td>clickAndWait</td>
<td>//div[@class="header_login"]//a</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="__ac_name"]</td>
<td>1</td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="__ac_password"]</td>
<td>1</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@value="Login"]</td>
<td></td>
</tr>
<tr> <tr>
<td>clickAndWait</td> <td>clickAndWait</td>
......
...@@ -120,6 +120,18 @@ ...@@ -120,6 +120,18 @@
<td></td> <td></td>
</tr> </tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@class="login_old_style" and contains(text(), 'using a traditional account')]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[@class="login_old_style" and contains(text(), 'using a traditional account')]</td>
<td></td>
</tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>//input[@name="__ac_name"]</td> <td>//input[@name="__ac_name"]</td>
......
...@@ -28,6 +28,56 @@ ...@@ -28,6 +28,56 @@
</tr> </tr>
</tal:block> </tal:block>
<tal:block metal:define-macro="login_as_normal_user">
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="header_login"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//div[@class="header_login"]//a</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@class="login_old_style" and contains(text(), 'using a traditional account')]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[@class="login_old_style" and contains(text(), 'using a traditional account')]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="__ac_name"]</td>
<td>1</td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="__ac_password"]</td>
<td>1</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@value="Login"]</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>You are logged</td>
<td></td>
</tr>
</tal:block>
<tal:block metal:define-macro="logout"> <tal:block metal:define-macro="logout">
<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