Commit 50a809f0 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

* validate rules (same as r.25365, but still required for running pdm_ui_test...

* validate rules (same as r.25365, but still required for running pdm_ui_test only without accounting_ui_test).
* modify for Selenium >= 0.8 compatibility.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25490 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4d751456
......@@ -9,12 +9,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
......@@ -68,8 +62,13 @@ Test quantity steps for price on purchase supply line\n
<tr>\n
<td>type</td>\n
<td>field_my_purchase_supply_line_quantity_step_list</td>\n
<tal:block tal:condition="is_selenium_0_8">\n
<td>10<br />20</td>\n
</tal:block>\n
<tal:block tal:condition="not:is_selenium_0_8">\n
<td>10\n
20</td>\n
</tal:block>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
......@@ -142,8 +141,13 @@ Test quantity steps for price on purchase supply line\n
<tr>\n
<td>type</td>\n
<td>field_my_purchase_supply_line_quantity_step_list</td>\n
<tal:block tal:condition="is_selenium_0_8">\n
<td>foo<br />bar</td>\n
</tal:block>\n
<tal:block tal:condition="not:is_selenium_0_8">\n
<td>foo\n
bar</td>\n
</tal:block>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
......@@ -156,12 +160,6 @@ bar</td>\n
<td>foo\n
bar</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>field_my_purchase_supply_line_quantity_step_list</td>\n
<td>foo\n
bar</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//textarea[@name="field_my_purchase_supply_line_quantity_step_list"]/parent::div/following-sibling::span</td>\n
......
......@@ -9,12 +9,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
......@@ -68,8 +62,13 @@ Test quantity steps for price on sale supply line\n
<tr>\n
<td>type</td>\n
<td>field_my_sale_supply_line_quantity_step_list</td>\n
<tal:block tal:condition="is_selenium_0_8">\n
<td>10<br />20</td>\n
</tal:block>\n
<tal:block tal:condition="not:is_selenium_0_8">\n
<td>10\n
20</td>\n
</tal:block>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
......@@ -142,8 +141,13 @@ Test quantity steps for price on sale supply line\n
<tr>\n
<td>type</td>\n
<td>field_my_sale_supply_line_quantity_step_list</td>\n
<tal:block tal:condition="is_selenium_0_8">\n
<td>foo<br />bar</td>\n
</tal:block>\n
<tal:block tal:condition="not:is_selenium_0_8">\n
<td>foo\n
bar</td>\n
</tal:block>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
......
......@@ -9,12 +9,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
......@@ -41,24 +35,25 @@
</object>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal">\n
<tal:block metal:define-macro="init" tal:define="base_url python: \'/\' + here.getPortalObject().getProperty(\'erp5_ui_test_base_url\', here.getPortalObject().getId())">\n
<tal:block metal:define-macro="init"\n
tal:define="base_url python: \'/\' + here.getPortalObject().getProperty(\'erp5_ui_test_base_url\', here.getPortalObject().getId());\n
global is_selenium_0_8 python: here.getPortalObject().portal_tests.getZeleniumVersion() &gt; \'Zelenium-0.8\'">\n
<tr>\n
<td>store</td>\n
<td tal:content="base_url">erp5</td>\n
<td>base_url</td>\n
</tr>\n
<tr tal:condition="is_selenium_0_8">\n
<td>setTimeout</td>\n
<td>600000</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>open</td>\n
<td>${base_url}/PdmZuite_deleteData</td>\n
......
......@@ -3,31 +3,16 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
......@@ -85,6 +70,11 @@ source_site_title = "erp5_pdm_ui_test_source_site_title"\n
destination_site_id = "erp5_pdm_ui_test_destination_site"\n
destination_site_title = "erp5_pdm_ui_test_destination_site_title"\n
\n
# validate rules\n
for rule in portal.portal_rules.objectValues():\n
if rule.getReference() != \'default_payment_rule\':\n
rule.validate()\n
\n
# Create resource\n
module = portal.getDefaultModule(resource_portal_type)\n
resource = module.newContent(\n
......@@ -128,12 +118,6 @@ return "Reset Successfully."\n
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
......@@ -179,10 +163,11 @@ return "Reset Successfully."\n
<string>source_site_title</string>
<string>destination_site_id</string>
<string>destination_site_title</string>
<string>_getiter_</string>
<string>rule</string>
<string>module</string>
<string>resource</string>
<string>base_category</string>
<string>_getiter_</string>
<string>site_id</string>
<string>site_title</string>
<string>site</string>
......
12
\ No newline at end of file
13
\ No newline at end of file
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