From 7ca866f8dee2d6f77c97c5e444af440fe2ada8b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Fri, 22 Feb 2008 17:44:06 +0000 Subject: [PATCH] Add tests for general PDM features (actually this also covers trade) git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19472 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../portal_tests/pdm_zuite.xml | 41 ++++ ...rchase_supply_line_price_quantity_step.xml | 197 ++++++++++++++++++ ...t_sale_supply_line_price_quantity_step.xml | 197 ++++++++++++++++++ bt5/erp5_pdm_ui_test/bt/comment | 0 bt5/erp5_pdm_ui_test/bt/revision | 2 +- .../bt/template_catalog_datetime_key_list | 0 .../bt/template_catalog_local_role_key_list | 0 .../bt/template_catalog_role_key_list | 0 .../bt/template_catalog_scriptable_key_list | 0 bt5/erp5_pdm_ui_test/bt/template_path_list | 2 + bt5/erp5_pdm_ui_test/bt/template_tool_id_list | 0 11 files changed, 438 insertions(+), 1 deletion(-) create mode 100644 bt5/erp5_pdm_ui_test/PathTemplateItem/portal_tests/pdm_zuite.xml create mode 100644 bt5/erp5_pdm_ui_test/PathTemplateItem/portal_tests/pdm_zuite/resource_default_purchase_supply_line_price_quantity_step.xml create mode 100644 bt5/erp5_pdm_ui_test/PathTemplateItem/portal_tests/pdm_zuite/resource_default_sale_supply_line_price_quantity_step.xml create mode 100644 bt5/erp5_pdm_ui_test/bt/comment create mode 100644 bt5/erp5_pdm_ui_test/bt/template_catalog_datetime_key_list create mode 100644 bt5/erp5_pdm_ui_test/bt/template_catalog_local_role_key_list create mode 100644 bt5/erp5_pdm_ui_test/bt/template_catalog_role_key_list create mode 100644 bt5/erp5_pdm_ui_test/bt/template_catalog_scriptable_key_list create mode 100644 bt5/erp5_pdm_ui_test/bt/template_tool_id_list diff --git a/bt5/erp5_pdm_ui_test/PathTemplateItem/portal_tests/pdm_zuite.xml b/bt5/erp5_pdm_ui_test/PathTemplateItem/portal_tests/pdm_zuite.xml new file mode 100644 index 0000000000..c809ce4631 --- /dev/null +++ b/bt5/erp5_pdm_ui_test/PathTemplateItem/portal_tests/pdm_zuite.xml @@ -0,0 +1,41 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="Zuite" module="Products.Zelenium.zuite"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_objects</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>_owner</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>pdm_zuite</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Global zuite for PDM</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_pdm_ui_test/PathTemplateItem/portal_tests/pdm_zuite/resource_default_purchase_supply_line_price_quantity_step.xml b/bt5/erp5_pdm_ui_test/PathTemplateItem/portal_tests/pdm_zuite/resource_default_purchase_supply_line_price_quantity_step.xml new file mode 100644 index 0000000000..526a4da921 --- /dev/null +++ b/bt5/erp5_pdm_ui_test/PathTemplateItem/portal_tests/pdm_zuite/resource_default_purchase_supply_line_price_quantity_step.xml @@ -0,0 +1,197 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </value> + </item> + <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>_text</string> </key> + <value> <string encoding="cdata"><![CDATA[ + +<html>\n +<head><title>Test quantity steps for price on purchase supply line</title></head>\n +<body>\n +<table cellpadding="1" cellspacing="1" border="1">\n +<thead>\n +<tr><td rowspan="1" colspan="4">\n +Test quantity steps for price on purchase supply line\n +</td></tr>\n +</thead>\n +<tbody tal:define="init_method string:PdmZuite_createDelivery?state=draft">\n +\n +<!-- Setup {{{ -->\n +<tal:block metal:use-macro="here/PdmZuite_CommonTemplate/macros/init" />\n +<!-- }}} -->\n +\n +<tr>\n + <td>clickAndWait</td>\n + <td>link=Purchase Price</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>type</td>\n + <td>field_my_purchase_supply_line_quantity_step_list</td>\n + <td>10\n +20</td>\n +</tr>\n +<tr>\n + <td>clickAndWait</td>\n + <td>Base_edit:method</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>field_my_purchase_supply_line_quantity_step_list</td>\n + <td>10\n +20</td>\n +<tr>\n + <td>assertText</td>\n + <td>//input[@name="field_matrixbox_base_price_cell_0_0_0"]/../../td[1]</td>\n + <td>Quantity < 10.0</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//input[@name="field_matrixbox_base_price_cell_1_0_0"]/../../td[1]</td>\n + <td>10.0 <= Quantity < 20.0</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//input[@name="field_matrixbox_base_price_cell_2_0_0"]/../../td[1]</td>\n + <td>20.0 <= Quantity</td>\n +</tr>\n +\n +<tr>\n + <td>type</td>\n + <td>//input[@name="field_matrixbox_base_price_cell_0_0_0"]</td>\n + <td>1</td>\n +</tr>\n +<tr>\n + <td>type</td>\n + <td>//input[@name="field_matrixbox_base_price_cell_1_0_0"]</td>\n + <td>2</td>\n +</tr>\n +<tr>\n + <td>type</td>\n + <td>//input[@name="field_matrixbox_base_price_cell_2_0_0"]</td>\n + <td>3</td>\n +</tr>\n +<!-- save and check -->\n +<tr>\n + <td>clickAndWait</td>\n + <td>Base_edit:method</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>assertFloatValue</td>\n + <td>//input[@name="field_matrixbox_base_price_cell_0_0_0"]</td>\n + <td>1</td>\n +</tr>\n +<tr>\n + <td>assertFloatValue</td>\n + <td>//input[@name="field_matrixbox_base_price_cell_1_0_0"]</td>\n + <td>2</td>\n +</tr>\n +<tr>\n + <td>assertFloatValue</td>\n + <td>//input[@name="field_matrixbox_base_price_cell_2_0_0"]</td>\n + <td>3</td>\n +</tr>\n +\n +<!-- XXX: the field rounds to int the displayed value. This is strange\n +-->\n +\n +<!-- The field has a validator to prevent from entering values that are non numerics\n +-->\n +<tr>\n + <td>type</td>\n + <td>field_my_purchase_supply_line_quantity_step_list</td>\n + <td>foo\n +bar</td>\n +</tr>\n +<tr>\n + <td>clickAndWait</td>\n + <td>Base_edit:method</td>\n + <td></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>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 + <td>You did not enter a floating point number.</td>\n +</tr>\n +\n +</tbody></table>\n +</body>\n +</html> \n +<!-- vim: syntax=html foldmethod=marker --> + +]]></string> </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>resource_default_purchase_supply_line_price_quantity_step</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_pdm_ui_test/PathTemplateItem/portal_tests/pdm_zuite/resource_default_sale_supply_line_price_quantity_step.xml b/bt5/erp5_pdm_ui_test/PathTemplateItem/portal_tests/pdm_zuite/resource_default_sale_supply_line_price_quantity_step.xml new file mode 100644 index 0000000000..a8e9727322 --- /dev/null +++ b/bt5/erp5_pdm_ui_test/PathTemplateItem/portal_tests/pdm_zuite/resource_default_sale_supply_line_price_quantity_step.xml @@ -0,0 +1,197 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </value> + </item> + <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>_text</string> </key> + <value> <string encoding="cdata"><![CDATA[ + +<html>\n +<head><title>Test quantity steps for price on sale supply line</title></head>\n +<body>\n +<table cellpadding="1" cellspacing="1" border="1">\n +<thead>\n +<tr><td rowspan="1" colspan="4">\n +Test quantity steps for price on sale supply line\n +</td></tr>\n +</thead>\n +<tbody tal:define="init_method string:PdmZuite_createDelivery?state=draft">\n +\n +<!-- Setup {{{ -->\n +<tal:block metal:use-macro="here/PdmZuite_CommonTemplate/macros/init" />\n +<!-- }}} -->\n +\n +<tr>\n + <td>clickAndWait</td>\n + <td>link=Sales Price</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>type</td>\n + <td>field_my_sale_supply_line_quantity_step_list</td>\n + <td>10\n +20</td>\n +</tr>\n +<tr>\n + <td>clickAndWait</td>\n + <td>Base_edit:method</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>field_my_sale_supply_line_quantity_step_list</td>\n + <td>10\n +20</td>\n +<tr>\n + <td>assertText</td>\n + <td>//input[@name="field_matrixbox_base_price_cell_0_0_0"]/../../td[1]</td>\n + <td>Quantity < 10.0</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//input[@name="field_matrixbox_base_price_cell_1_0_0"]/../../td[1]</td>\n + <td>10.0 <= Quantity < 20.0</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//input[@name="field_matrixbox_base_price_cell_2_0_0"]/../../td[1]</td>\n + <td>20.0 <= Quantity</td>\n +</tr>\n +\n +<tr>\n + <td>type</td>\n + <td>//input[@name="field_matrixbox_base_price_cell_0_0_0"]</td>\n + <td>1</td>\n +</tr>\n +<tr>\n + <td>type</td>\n + <td>//input[@name="field_matrixbox_base_price_cell_1_0_0"]</td>\n + <td>2</td>\n +</tr>\n +<tr>\n + <td>type</td>\n + <td>//input[@name="field_matrixbox_base_price_cell_2_0_0"]</td>\n + <td>3</td>\n +</tr>\n +<!-- save and check -->\n +<tr>\n + <td>clickAndWait</td>\n + <td>Base_edit:method</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>assertFloatValue</td>\n + <td>//input[@name="field_matrixbox_base_price_cell_0_0_0"]</td>\n + <td>1</td>\n +</tr>\n +<tr>\n + <td>assertFloatValue</td>\n + <td>//input[@name="field_matrixbox_base_price_cell_1_0_0"]</td>\n + <td>2</td>\n +</tr>\n +<tr>\n + <td>assertFloatValue</td>\n + <td>//input[@name="field_matrixbox_base_price_cell_2_0_0"]</td>\n + <td>3</td>\n +</tr>\n +\n +<!-- XXX: the field rounds to int the displayed value. This is strange\n +-->\n +\n +<!-- The field has a validator to prevent from entering values that are non numerics\n +-->\n +<tr>\n + <td>type</td>\n + <td>field_my_sale_supply_line_quantity_step_list</td>\n + <td>foo\n +bar</td>\n +</tr>\n +<tr>\n + <td>clickAndWait</td>\n + <td>Base_edit:method</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>field_my_sale_supply_line_quantity_step_list</td>\n + <td>foo\n +bar</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>field_my_sale_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_sale_supply_line_quantity_step_list"]/parent::div/following-sibling::span</td>\n + <td>You did not enter a floating point number.</td>\n +</tr>\n +\n +</tbody></table>\n +</body>\n +</html> \n +<!-- vim: syntax=html foldmethod=marker --> + +]]></string> </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>resource_default_sale_supply_line_price_quantity_step</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_pdm_ui_test/bt/comment b/bt5/erp5_pdm_ui_test/bt/comment new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_pdm_ui_test/bt/revision b/bt5/erp5_pdm_ui_test/bt/revision index c7930257df..301160a930 100644 --- a/bt5/erp5_pdm_ui_test/bt/revision +++ b/bt5/erp5_pdm_ui_test/bt/revision @@ -1 +1 @@ -7 \ No newline at end of file +8 \ No newline at end of file diff --git a/bt5/erp5_pdm_ui_test/bt/template_catalog_datetime_key_list b/bt5/erp5_pdm_ui_test/bt/template_catalog_datetime_key_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_pdm_ui_test/bt/template_catalog_local_role_key_list b/bt5/erp5_pdm_ui_test/bt/template_catalog_local_role_key_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_pdm_ui_test/bt/template_catalog_role_key_list b/bt5/erp5_pdm_ui_test/bt/template_catalog_role_key_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_pdm_ui_test/bt/template_catalog_scriptable_key_list b/bt5/erp5_pdm_ui_test/bt/template_catalog_scriptable_key_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_pdm_ui_test/bt/template_path_list b/bt5/erp5_pdm_ui_test/bt/template_path_list index 9496b298c2..fb2375c198 100644 --- a/bt5/erp5_pdm_ui_test/bt/template_path_list +++ b/bt5/erp5_pdm_ui_test/bt/template_path_list @@ -1,2 +1,4 @@ +portal_tests/pdm_zuite +portal_tests/pdm_zuite/** portal_tests/stock_browser_zuite portal_tests/stock_browser_zuite/** \ No newline at end of file diff --git a/bt5/erp5_pdm_ui_test/bt/template_tool_id_list b/bt5/erp5_pdm_ui_test/bt/template_tool_id_list new file mode 100644 index 0000000000..e69de29bb2 -- 2.30.9