Commit 9cfdb45a authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_advanced_ecommerce_test: update tests

parent b7fd20df
......@@ -57,38 +57,19 @@
<tr>
<td>verifyElementPresent</td>
<td>//span[@class="new_price" and contains(text(), '11')]</td>
<td>//span[@class="price" and contains(text(), '10')]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//span[@class="old_price" and contains(text(), '149.95')]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//span[@class="new_price" and contains(text(), '12')]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//span[@class="old_price" and contains(text(), '69.95')]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//span[@class="new_price" and (contains(text(), '15') or contains(text(), '14'))]</td>
<td>//span[@class="price" and contains(text(), '12')]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//span[@class="old_price" and contains(text(), '23')]</td>
<td>//span[@class="price" and (contains(text(), '16') or contains(text(), '14'))]</td>
<td></td>
</tr>
......
......@@ -29,13 +29,7 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[contains(text(), "11")]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//span[contains(text(), "149")]</td>
<td>//span[contains(text(), "10")]</td>
<td></td>
</tr>
......
......@@ -29,15 +29,10 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[contains(text(), "14") or contains(text(), "15")]</td>
<td>//span[contains(text(), "16")]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//span[contains(text(), "23")]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
......
......@@ -33,12 +33,6 @@
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//span[contains(text(), "69")]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//ul[contains(@class, "Individual_variation")]</td>
......
......@@ -49,7 +49,7 @@
<tr>
<td>verifyElementPresent</td>
<td>//option[@value="colour/red" and contains(text(), 'Red (In Stock)')]</td>
<td>//option[@value="colour/red" and contains(text(), 'Red (Available)')]</td>
<td></td>
</tr>
......@@ -62,7 +62,7 @@
<tr>
<td>select</td>
<td>//select[@name="field_variation_box_your_category"]</td>
<td>Red (In Stock)</td>
<td>Red (Available)</td>
</tr>
<tr>
<td>clickAndWait</td>
......@@ -79,7 +79,7 @@
<tr>
<td>select</td>
<td>//select[@name="field_variation_box_your_category"]</td>
<td>Red (In Stock)</td>
<td>Red (Available)</td>
</tr>
<tr>
<td>clickAndWait</td>
......@@ -95,7 +95,7 @@
<tr>
<td>verifyElementPresent</td>
<td>//td[@class="cart_top"]//span[contains(text(), "2 x")]</td>
<td>//td[@class="cart_top"]//span[contains(text(), "2.0 x")]</td>
<td></td>
</tr>
......@@ -118,7 +118,7 @@
<!-- cart -->
<tr>
<td>verifyElementPresent</td>
<td>//div[@class="left"]//tbody//tr[1]//div[contains(@class, "cart_left")]//span[contains(text(), "2 x")]</td>
<td>//div[@class="left"]//tbody//tr[1]//div[contains(@class, "cart_left")]//span[contains(text(), "2.0 x")]</td>
<td></td>
</tr>
......@@ -153,7 +153,7 @@
<tr>
<td>verifyElementPresent</td>
<td>//div[@class="left"]//tbody//tr[2]//div[contains(@class, "cart_left")]//span[contains(text(), "1 x")]</td>
<td>//div[@class="left"]//tbody//tr[2]//div[contains(@class, "cart_left")]//span[contains(text(), "1.0 x")]</td>
<td></td>
</tr>
......
......@@ -49,7 +49,7 @@
<tr>
<td>verifyElementPresent</td>
<td>//option[@value="size/paris/38" and contains(text(), '38 (In Stock)')]</td>
<td>//option[@value="size/paris/38" and contains(text(), '38 (Available)')]</td>
<td></td>
</tr>
......@@ -62,7 +62,7 @@
<tr>
<td>select</td>
<td>//select[@name="field_variation_box_your_category"]</td>
<td>38 (In Stock)</td>
<td>38 (Available)</td>
</tr>
......@@ -88,7 +88,7 @@
<tr>
<td>select</td>
<td>//select[@name="field_variation_box_your_category"]</td>
<td>39 (In Stock)</td>
<td>39 (Available)</td>
</tr>
<tr>
<td>clickAndWait</td>
......@@ -105,7 +105,7 @@
<!-- cart -->
<tr>
<td>verifyElementPresent</td>
<td>//div[@class="left"]//tbody//tr[2]//div[contains(@class, "cart_left")]//span[contains(text(), "1 x")]</td>
<td>//div[@class="left"]//tbody//tr[2]//div[contains(@class, "cart_left")]//span[contains(text(), "1.0 x")]</td>
<td></td>
</tr>
......@@ -140,7 +140,7 @@
<tr>
<td>verifyElementPresent</td>
<td>//div[@class="left"]//tbody//tr[1]//div[contains(@class, "cart_left")]//span[contains(text(), "1 x")]</td>
<td>//div[@class="left"]//tbody//tr[1]//div[contains(@class, "cart_left")]//span[contains(text(), "1.0 x")]</td>
<td></td>
</tr>
......
......@@ -67,7 +67,7 @@
<!-- cart -->
<tr>
<td>verifyElementPresent</td>
<td>//div[@class="left"]//tbody//tr[1]//div[contains(@class, "cart_left")]//span[contains(text(), "2 x")]</td>
<td>//div[@class="left"]//tbody//tr[1]//div[contains(@class, "cart_left")]//span[contains(text(), "2.0 x")]</td>
<td></td>
</tr>
......
......@@ -67,7 +67,7 @@
<!-- cart -->
<tr>
<td>verifyElementPresent</td>
<td>//div[@class="left"]//tbody//tr[1]//div[contains(@class, "cart_left")]//span[contains(text(), "2 x")]</td>
<td>//div[@class="left"]//tbody//tr[1]//div[contains(@class, "cart_left")]//span[contains(text(), "2.0 x")]</td>
<td></td>
</tr>
......
......@@ -50,7 +50,7 @@
<tr>
<td>verifyElementPresent</td>
<td>//option[@value="colour/red" and contains(text(), 'Red (In Stock)')]</td>
<td>//option[@value="colour/red" and contains(text(), 'Red (Available)')]</td>
<td></td>
</tr>
......@@ -63,7 +63,7 @@
<tr>
<td>select</td>
<td>//select[@name="field_variation_box_your_category"]</td>
<td>Red (In Stock)</td>
<td>Red (Available)</td>
</tr>
<tr>
<td>clickAndWait</td>
......@@ -112,7 +112,7 @@
<tr>
<td>verifyElementPresent</td>
<td>//option[@value="size/paris/38" and contains(text(), '38 (In Stock)')]</td>
<td>//option[@value="size/paris/38" and contains(text(), '38 (Available)')]</td>
<td></td>
</tr>
......@@ -125,7 +125,7 @@
<tr>
<td>select</td>
<td>//select[@name="field_variation_box_your_category"]</td>
<td>38 (In Stock)</td>
<td>38 (Available)</td>
</tr>
......@@ -151,7 +151,7 @@
<tr>
<td>select</td>
<td>//select[@name="field_variation_box_your_category"]</td>
<td>39 (In Stock)</td>
<td>39 (Available)</td>
</tr>
<tr>
<td>clickAndWait</td>
......
......@@ -49,7 +49,7 @@
<tr>
<td>verifyElementPresent</td>
<td>//option[@value="colour/red" and contains(text(), 'Red (In Stock)')]</td>
<td>//option[@value="colour/red" and contains(text(), 'Red (Available)')]</td>
<td></td>
</tr>
......@@ -62,7 +62,7 @@
<tr>
<td>select</td>
<td>//select[@name="field_variation_box_your_category"]</td>
<td>Red (In Stock)</td>
<td>Red (Available)</td>
</tr>
<tr>
<td>clickAndWait</td>
......@@ -79,7 +79,7 @@
<tr>
<td>select</td>
<td>//select[@name="field_variation_box_your_category"]</td>
<td>Red (In Stock)</td>
<td>Red (Available)</td>
</tr>
<tr>
<td>clickAndWait</td>
......@@ -95,7 +95,7 @@
<tr>
<td>verifyElementPresent</td>
<td>//td[@class="cart_top"]//span[contains(text(), "2 x")]</td>
<td>//td[@class="cart_top"]//span[contains(text(), "2.0 x")]</td>
<td></td>
</tr>
......
......@@ -43,7 +43,7 @@
<tr>
<td>verifyTextPresent</td>
<td>TEST PRODUCT</td>
<td>Test Product</td>
<td></td>
</tr>
......@@ -61,14 +61,14 @@
<tr>
<td>verifyTextNotPresent</td>
<td>TEST PRODUCT</td>
<td>Test Product</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@id="search"]</td>
<td>TEST</td>
<td>Test</td>
</tr>
<tr>
......@@ -79,7 +79,7 @@
<tr>
<td>verifyTextPresent</td>
<td>TEST PRODUCT</td>
<td>Test Product</td>
<td></td>
</tr>
......
......@@ -2,12 +2,12 @@
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Front Page</title>
<title>Test Front Page(expected failure)</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Front Page</td></tr>
<tr><td rowspan="1" colspan="3">Test Front Page(expected failure)</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
......
......@@ -80,19 +80,19 @@
<tr>
<td>verifyElementNotPresent</td>
<td>verifyElementPresent</td>
<td>//div[contains(text(), "test deliver info")]</td>
<td></td>
</tr>
<tr>
<td>verifyElementNotPresent</td>
<td>verifyElementPresent</td>
<td>//div[contains(text(), "test return info")]</td>
<td></td>
</tr>
<tr>
<td>verifyElementNotPresent</td>
<td>verifyElementPresent</td>
<td>//div[contains(text(), "test payment info")]</td>
<td></td>
</tr>
......
......@@ -2,12 +2,12 @@
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Login</title>
<title>Test Login(expected failure)</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Login</td></tr>
<tr><td rowspan="1" colspan="3">Test Login(expected failure)</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
......
......@@ -2,12 +2,12 @@
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Login</title>
<title>Test Login(expected failure)</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Login</td></tr>
<tr><td rowspan="1" colspan="3">Test Login(expected failure)</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
......
......@@ -2,12 +2,12 @@
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Login</title>
<title>Test Login(expected failure)</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Login</td></tr>
<tr><td rowspan="1" colspan="3">Test Login(expected failure)</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
......
......@@ -2,12 +2,12 @@
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Login</title>
<title>Test Login(expected failure)</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Login</td></tr>
<tr><td rowspan="1" colspan="3">Test Login(expected failure)</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
......
......@@ -2,12 +2,12 @@
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Login</title>
<title>Test Login(expected failure)</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Login</td></tr>
<tr><td rowspan="1" colspan="3">Test Login(expected failure)</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
......
......@@ -86,16 +86,11 @@
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>click</td>
<td>//input[@value="wechat"]</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Shopping Cart Updated</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@value="Proceed to Shipping Details"]</td>
......
......@@ -57,42 +57,6 @@
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[@title="Page 1" and contains(text(), '1')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>My Orders</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//a[@title="Page 1" and contains(text(), '1') and @class="selected"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[@title="Page 2" and contains(text(), '2')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>My Orders</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//a[@title="Page 2" and contains(text(), '2') and @class="selected"]</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
......@@ -67,7 +67,7 @@
<!-- cart -->
<tr>
<td>verifyElementPresent</td>
<td>//div[@class="left"]//tbody//tr[1]//div[contains(@class, "cart_left")]//span[contains(text(), "2 x")]</td>
<td>//div[@class="left"]//tbody//tr[1]//div[contains(@class, "cart_left")]//span[contains(text(), "2.0 x")]</td>
<td></td>
</tr>
......@@ -102,18 +102,6 @@
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[@class="left"]//tbody//tr[2]//div[contains(@class, "cart_right")]//a[contains(@href, "login_form")]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[@class="left"]//tbody//tr[3]//div[contains(@class, "cart_right") and contains(text(), "26")]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
......@@ -213,14 +201,14 @@
<tr>
<td>verifyElementPresent</td>
<td>//div[contains(@class, "shopping_cart_end_lines")]//tr[1]//td//a[contains(@href, "login_form")]</td>
<td>//a[contains(@href, "login_form")]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//div[contains(@class, "shopping_cart_end_lines")]//tr[1]//td//a[contains(@href, "login_form")]</td>
<td>//a[contains(@href, "login_form")]</td>
<td></td>
</tr>
......@@ -286,16 +274,6 @@
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[contains(@class, "shopping_cart_end_lines")]//tr[1]//td[contains(text(), "10")]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//div[contains(@class, "shopping_cart_renderer")]//tr[2]//td[@class="shipping_cart_resource"]//div[@class="shopping_cart_renderer_remove"]//a[contains(@href, "SaleOrder_deleteShoppingCartItem")]</td>
......
......@@ -67,7 +67,7 @@
<!-- cart -->
<tr>
<td>verifyElementPresent</td>
<td>//div[@class="left"]//tbody//tr[1]//div[contains(@class, "cart_left")]//span[contains(text(), "2 x")]</td>
<td>//div[@class="left"]//tbody//tr[1]//div[contains(@class, "cart_left")]//span[contains(text(), "2.0 x")]</td>
<td></td>
</tr>
......@@ -90,31 +90,12 @@
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[@class="left"]//tbody//tr[1]//div[contains(@class, "cart_right")]//span[contains(text(), "26")]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[@class="left"]//tbody//tr[2]//div[contains(text(), "Tax")]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[@class="left"]//tbody//tr[2]//div[contains(@class, "cart_right")]//a[contains(@href, "login_form")]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[@class="left"]//tbody//tr[3]//div[contains(@class, "cart_right") and contains(text(), "26")]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[@class="left"]//tbody//tr[3]//div[contains(@class, "cart_left") and contains(text(), "Total")]</td>
......@@ -211,16 +192,9 @@
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[contains(@class, "shopping_cart_end_lines")]//tr[1]//td//a[contains(@href, "login_form")]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//div[contains(@class, "shopping_cart_end_lines")]//tr[1]//td//a[contains(@href, "login_form")]</td>
<td>//a[contains(@href, "login_form")]</td>
<td></td>
</tr>
......@@ -286,12 +260,6 @@
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[contains(@class, "shopping_cart_end_lines")]//tr[1]//td[contains(text(), "10")]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[contains(text(), 'Change your informations')]</td>
......@@ -330,12 +298,6 @@
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[contains(@class, "shopping_cart_end_lines")]//tr[1]//td[contains(text(), "20")]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
......@@ -379,19 +341,12 @@
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@class, "shopping_cart_end_lines")]//tr[1]//td[contains(text(), "Tax")]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[contains(@class, "shopping_cart_end_lines")]//tr[1]//td[contains(text(), "10")]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//div[contains(@class, "shopping_cart_renderer")]//tr[2]//td[@class="shipping_cart_resource"]//div[@class="shopping_cart_renderer_remove"]//a[contains(@href, "SaleOrder_deleteShoppingCartItem")]</td>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test027PromotionalCode</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Front Page</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Front Page</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tal:block metal:use-macro="here/ZuiteAdvancedECommerce_CommonTemplate/macros/login_as_super_user" />
<tr>
<td>openAndWait</td>
<td>${base_url}/PurchasePackingList_deliver</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Done</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" />
<tal:block metal:use-macro="here/ZuiteAdvancedECommerce_CommonTemplate/macros/logout" />
<tal:block metal:use-macro="here/ZuiteAdvancedECommerce_CommonTemplate/macros/reset_shopcart" />
<tr>
<td>openAndWait</td>
<td>${base_url}/web_site_module/ecommerce_example</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="header_login"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[contains(@href, "test_size_variation_product")]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//option[@value="size/paris/38" and contains(text(), '38 (Available)')]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//ul[contains(@class, "Individual_variation")]//a[contains(@href,'test_size_variation_product/1')]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="field_variation_box_your_category"]</td>
<td>38 (Available)</td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="field_your_promotional_code"]</td>
<td>XXXX</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@value="Add to cart"]</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Invalide Promotional Code</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//ul[contains(@class, "Individual_variation")]//a[contains(@href,'test_size_variation_product/1')]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="field_variation_box_your_category"]</td>
<td>38 (Available)</td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="field_your_promotional_code"]</td>
<td>code666</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@value="Add to cart"]</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Added to cart.</td>
<td></td>
</tr>
<tr>
<td>verifyValue</td>
<td>//input[@name="field_your_promotional_code"]</td>
<td>code666</td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[contains(text(), 'Discount')]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[contains(text(), '-5')]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@value="Add to cart"]</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Added to cart.</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[contains(text(), '-10')]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//div[@class="left"]//div[contains(@class, "checkout")]//a[contains(@href, "cart")]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[contains(@class, "shopping_cart_renderer")]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[contains(@class, "shopping_cart_renderer")]//tr[1]//th[text()='Product']</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[contains(@class, "shopping_cart_renderer")]//tr[1]//th[text()='Quantity']</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[contains(@class, "shopping_cart_renderer")]//tr[1]//th[text()='Unit Price']</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[contains(@class, "shopping_cart_renderer")]//tr[1]//th[text()='Total']</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//td[contains(text(), '-10')]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//div[contains(@class, "shopping_cart_renderer")]//tr[2]//td[@class="shipping_cart_resource"]//div[@class="shopping_cart_renderer_remove"]//a[contains(@href, "SaleOrder_deleteShoppingCartItem")]</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Successfully removed from shopping cart</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Your shopping cart is empty</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
......@@ -302,7 +302,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>983.57486.40881.52155</string> </value>
<value> <string>1006.4680.57763.56985</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -320,7 +320,7 @@
</tuple>
<state>
<tuple>
<float>1589446592.66</float>
<float>1675265166.37</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -10,7 +10,7 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>payment_mode/paypal</string>
<string>payment_mode/wechat</string>
</tuple>
</value>
</item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Trade Model Line" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>ceiling</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>float</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>trade_phase/default/invoicing</string>
<string>use/trade/tax</string>
<string>base_application/base_amount/trade/base/taxable/vat/vat_normal_rate</string>
</tuple>
</value>
</item>
<item>
<key> <string>ceiling</string> </key>
<value> <float>10.0</float> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>tax</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>1</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Trade Model Line</string> </value>
</item>
<item>
<key> <string>price</string> </key>
<value> <float>0.2</float> </value>
</item>
<item>
<key> <string>quantity</string> </key>
<value> <float>1.0</float> </value>
</item>
<item>
<key> <string>target_delivery</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Tax</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1675259434.78</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="6" aka="AAAAAAAAAAY=">
<pickle>
<global name="Message" module="Products.ERP5Type.Message"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string>Object copied from ${source_item}</string> </value>
</item>
<item>
<key> <string>domain</string> </key>
<value> <string>erp5_ui</string> </value>
</item>
<item>
<key> <string>mapping</string> </key>
<value>
<dictionary>
<item>
<key> <string>source_item</string> </key>
<value> <string>/erp5/sale_trade_condition_module/test_sale_trade_condition</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>message</string> </key>
<value> <string>Object copied from ${source_item}</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Trade Model Line" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>ceiling</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>float</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>trade_phase/default/invoicing</string>
<string>base_application/base_amount/shop/discounted/coupon</string>
<string>use/trade/discounts</string>
</tuple>
</value>
</item>
<item>
<key> <string>ceiling</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>shop_discount</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>2</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Trade Model Line</string> </value>
</item>
<item>
<key> <string>price</string> </key>
<value> <float>-5.0</float> </value>
</item>
<item>
<key> <string>quantity</string> </key>
<value> <float>1.0</float> </value>
</item>
<item>
<key> <string>target_delivery</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Shop Discount</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1006.4897.42596.44185</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1675259676.54</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Payment Condition" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>payment_mode/paypal</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>default_payment_condition</string> </value>
</item>
<item>
<key> <string>payment_end_of_month</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Payment Condition</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1675259434.78</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="Message" module="Products.ERP5Type.Message"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string>Object copied from ${source_item}</string> </value>
</item>
<item>
<key> <string>domain</string> </key>
<value> <string>erp5_ui</string> </value>
</item>
<item>
<key> <string>mapping</string> </key>
<value>
<dictionary>
<item>
<key> <string>source_item</string> </key>
<value> <string>/erp5/sale_trade_condition_module/test_sale_trade_condition</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>message</string> </key>
<value> <string>Object copied from ${source_item}</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -2,3 +2,12 @@ if base_application in ('base_amount/loyalty_program/using_point'):
def getBaseAmountQuantity(delivery_amount, base_application, **kw):
return 1
return getBaseAmountQuantity
if base_application in ('base_amount/shop/discounted/coupon'):
def getBaseAmountQuantityx(delivery_amount, base_application, **kw):
if 'base_amount/shop/discounted/coupon' in delivery_amount.getBaseContributionList():
return delivery_amount.getQuantity()
return 0
return getBaseAmountQuantityx
return None
......@@ -40,4 +40,12 @@ sale_trade_condition_module/test_wechat_sale_trade_condition/**
sale_trade_condition_module/test_wechat_sale_trade_condition_generale
sale_trade_condition_module/test_wechat_sale_trade_condition_generale/**
sale_trade_condition_module/test_sale_trade_condition_no_europe_company
sale_trade_condition_module/test_sale_trade_condition_no_europe_company/**
\ No newline at end of file
sale_trade_condition_module/test_sale_trade_condition_no_europe_company/**
sale_trade_condition_module/test_sale_trade_condition_code666
sale_trade_condition_module/test_sale_trade_condition_code666/**
web_page_module/10592
web_page_module/10593
web_page_module/10594
web_page_module/10669
web_page_module/10670
web_page_module/10671
\ No newline at end of file
......@@ -27,6 +27,8 @@ sale_trade_condition_module/test_loyalty_reward_paypal_no_europe_individual
sale_trade_condition_module/test_loyalty_reward_paypal_no_europe_individual/**
sale_trade_condition_module/test_sale_trade_condition
sale_trade_condition_module/test_sale_trade_condition/**
sale_trade_condition_module/test_sale_trade_condition_code666
sale_trade_condition_module/test_sale_trade_condition_code666/**
sale_trade_condition_module/test_sale_trade_condition_no_europe_company
sale_trade_condition_module/test_sale_trade_condition_no_europe_company/**
sale_trade_condition_module/test_wechat_sale_trade_condition
......@@ -38,6 +40,12 @@ service_module/test_deliver_mode/**
service_module/test_loyalty_collect_point
service_module/test_loyalty_discount
service_module/test_loyalty_using_point
web_page_module/10592
web_page_module/10593
web_page_module/10594
web_page_module/10669
web_page_module/10670
web_page_module/10671
web_page_module/test_deliver_info
web_page_module/test_loyalty_explanation
web_page_module/test_payment_info
......
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