From 33f1ef9cdce3508756e2cdb86ad82160badaa2ee Mon Sep 17 00:00:00 2001 From: Ivan Tyagov <ivan@nexedi.com> Date: Fri, 16 Dec 2011 17:32:07 +0200 Subject: [PATCH] Fix tests. --- .../portal_categories/group/my_group.xml | 85 +++++++++++++++++++ .../portal_categories/incoterm/cpt.xml | 85 +++++++++++++++++++ .../testHowToSaleOrder.xml | 11 +++ .../Zuite_setUpSaleOrderTest.xml | 3 +- bt5/erp5_user_tutorial_ui_test/bt/revision | 2 +- .../bt/template_path_list | 4 + 6 files changed, 188 insertions(+), 2 deletions(-) create mode 100644 bt5/erp5_user_tutorial_ui_test/PathTemplateItem/portal_categories/group/my_group.xml create mode 100644 bt5/erp5_user_tutorial_ui_test/PathTemplateItem/portal_categories/incoterm/cpt.xml diff --git a/bt5/erp5_user_tutorial_ui_test/PathTemplateItem/portal_categories/group/my_group.xml b/bt5/erp5_user_tutorial_ui_test/PathTemplateItem/portal_categories/group/my_group.xml new file mode 100644 index 0000000000..7c05fdc002 --- /dev/null +++ b/bt5/erp5_user_tutorial_ui_test/PathTemplateItem/portal_categories/group/my_group.xml @@ -0,0 +1,85 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Category" module="erp5.portal_type"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_Add_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Add_portal_folders_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Copy_or_Move_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Delete_objects_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Modify_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignee</string> + <string>Assignor</string> + <string>Manager</string> + <string>Owner</string> + </tuple> + </value> + </item> + <item> + <key> <string>categories</string> </key> + <value> + <tuple> + <string>group/my_group</string> + </tuple> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>my_group</string> </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Category</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>My Group</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_user_tutorial_ui_test/PathTemplateItem/portal_categories/incoterm/cpt.xml b/bt5/erp5_user_tutorial_ui_test/PathTemplateItem/portal_categories/incoterm/cpt.xml new file mode 100644 index 0000000000..8466fdf068 --- /dev/null +++ b/bt5/erp5_user_tutorial_ui_test/PathTemplateItem/portal_categories/incoterm/cpt.xml @@ -0,0 +1,85 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Category" module="erp5.portal_type"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_Add_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Add_portal_folders_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Copy_or_Move_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Delete_objects_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Modify_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignee</string> + <string>Assignor</string> + <string>Manager</string> + <string>Owner</string> + </tuple> + </value> + </item> + <item> + <key> <string>categories</string> </key> + <value> + <tuple> + <string>incoterm/cpt</string> + </tuple> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>cpt</string> </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Category</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>CPT</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_user_tutorial_ui_test/PathTemplateItem/portal_tests/user_tutorial_zuite/testHowToSaleOrder.xml b/bt5/erp5_user_tutorial_ui_test/PathTemplateItem/portal_tests/user_tutorial_zuite/testHowToSaleOrder.xml index f6a5909505..ae0ae6195a 100644 --- a/bt5/erp5_user_tutorial_ui_test/PathTemplateItem/portal_tests/user_tutorial_zuite/testHowToSaleOrder.xml +++ b/bt5/erp5_user_tutorial_ui_test/PathTemplateItem/portal_tests/user_tutorial_zuite/testHowToSaleOrder.xml @@ -90,6 +90,11 @@ <td>//input[@name="field_my_title"]</td>\n <td tal:content="python: here.Zuite_getHowToInfo()[\'sale_howto_product_title\']"></td>\n </tr>\n +<tr>\n + <td>select</td>\n + <td>//select[@name="field_my_source_section"]</td>\n + <td tal:content="python: here.Zuite_getHowToInfo()[\'sale_howto_organisation_title\']"></td>\n +</tr>\n <tr>\n <td>type</td>\n <td>//input[@name="field_my_source_title"]</td>\n @@ -120,6 +125,12 @@ <td>//select[@name="field_my_delivery_mode"]</td>\n <td>AIR</td>\n </tr>\n +<tr>\n + <td>select</td>\n + <td>//select[@name="field_my_incoterm"]</td>\n + <td>CPT</td>\n +</tr>\n +\n <tr>\n <td>type</td>\n <td>//input[@name="field_my_specialise_title"]</td>\n diff --git a/bt5/erp5_user_tutorial_ui_test/SkinTemplateItem/portal_skins/erp5_user_tutorial_ui_test/Zuite_setUpSaleOrderTest.xml b/bt5/erp5_user_tutorial_ui_test/SkinTemplateItem/portal_skins/erp5_user_tutorial_ui_test/Zuite_setUpSaleOrderTest.xml index a125f50812..39b3200f23 100644 --- a/bt5/erp5_user_tutorial_ui_test/SkinTemplateItem/portal_skins/erp5_user_tutorial_ui_test/Zuite_setUpSaleOrderTest.xml +++ b/bt5/erp5_user_tutorial_ui_test/SkinTemplateItem/portal_skins/erp5_user_tutorial_ui_test/Zuite_setUpSaleOrderTest.xml @@ -63,7 +63,7 @@ business_process = context.portal_catalog.getResultValue(portal_type=\'Business if isTransitionPossible(business_process, \'validate\'):\n business_process.validate()\n \n -# XXX: add default sale order trade condition\n +# add default sale order trade condition\n sale_order_trade_condition = context.portal_catalog.getResultValue(portal_type=\'Sale Trade Condition\',\n reference=\'default-sale-order-trade-condition\')\n if isTransitionPossible(sale_order_trade_condition, \'validate\'):\n @@ -110,6 +110,7 @@ pref = getattr(context.portal_preferences, howto_dict[\'howto_preference_id\'], if pref is None:\n pref = context.portal_preferences.newContent(portal_type="Preference",\n id=howto_dict[\'howto_preference_id\'])\n + pref.setPreferredAccountingTransactionSectionCategory(\'group/my_group\')\n if isTransitionPossible(pref, \'enable\'):\n pref.enable()\n \n diff --git a/bt5/erp5_user_tutorial_ui_test/bt/revision b/bt5/erp5_user_tutorial_ui_test/bt/revision index fc0b67d079..7392849d54 100644 --- a/bt5/erp5_user_tutorial_ui_test/bt/revision +++ b/bt5/erp5_user_tutorial_ui_test/bt/revision @@ -1 +1 @@ -774 \ No newline at end of file +775 \ No newline at end of file diff --git a/bt5/erp5_user_tutorial_ui_test/bt/template_path_list b/bt5/erp5_user_tutorial_ui_test/bt/template_path_list index ce666a6a33..e0a9a9a65f 100644 --- a/bt5/erp5_user_tutorial_ui_test/bt/template_path_list +++ b/bt5/erp5_user_tutorial_ui_test/bt/template_path_list @@ -10,6 +10,10 @@ portal_categories/function/sales portal_categories/function/sales/** portal_categories/gender portal_categories/gender/** +portal_categories/group/my_group +portal_categories/group/my_group/** +portal_categories/incoterm/cpt +portal_categories/incoterm/cpt/** portal_categories/nationality/french portal_categories/nationality/french/** portal_categories/order/normal -- 2.30.9