Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Mukul
erp5
Commits
abf1bbd6
Commit
abf1bbd6
authored
Jul 30, 2012
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable functional test for user-Howto.Create.Trade.Conditions Tutorial.
parent
0d0d18b7
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
240 additions
and
1 deletion
+240
-1
bt5/erp5_user_tutorial_ui_test/SkinTemplateItem/portal_skins/erp5_user_tutorial_ui_test/Zuite_getHowToInfo.xml
...l_skins/erp5_user_tutorial_ui_test/Zuite_getHowToInfo.xml
+1
-0
bt5/erp5_user_tutorial_ui_test/SkinTemplateItem/portal_skins/erp5_user_tutorial_ui_test/Zuite_setUpSaleTradeConditionTest.xml
...er_tutorial_ui_test/Zuite_setUpSaleTradeConditionTest.xml
+122
-0
bt5/erp5_user_tutorial_ui_test/SkinTemplateItem/portal_skins/erp5_user_tutorial_ui_test/Zuite_tearDownSaleTradeConditionTest.xml
...tutorial_ui_test/Zuite_tearDownSaleTradeConditionTest.xml
+116
-0
product/ERP5Type/tests/testFunctionalStandaloneUserTutorial.py
...ct/ERP5Type/tests/testFunctionalStandaloneUserTutorial.py
+1
-1
No files found.
bt5/erp5_user_tutorial_ui_test/SkinTemplateItem/portal_skins/erp5_user_tutorial_ui_test/Zuite_getHowToInfo.xml
View file @
abf1bbd6
...
@@ -97,6 +97,7 @@ return {\'now\': DateTime(),\n
...
@@ -97,6 +97,7 @@ return {\'now\': DateTime(),\n
\'sale_howto_currency_title\': \'Euro\',\n
\'sale_howto_currency_title\': \'Euro\',\n
\'sale_howto_currency_tag\': \'EUR\',\n
\'sale_howto_currency_tag\': \'EUR\',\n
\'sale_howto_product_reference\': \'ZUITE-TEST-SALEORDER-RL01\',\n
\'sale_howto_product_reference\': \'ZUITE-TEST-SALEORDER-RL01\',\n
\'sale_howto_trade_condition_title\': \'ZUITE-TEST-SALE-TRADE-CONDITION-001\',\n
\'campaign_howto_person_title\': \'ZUITE-TEST-CAMPAIGN-PERSON-SUPERVISOR\',\n
\'campaign_howto_person_title\': \'ZUITE-TEST-CAMPAIGN-PERSON-SUPERVISOR\',\n
\'campaign_howto_person2_title\': \'ZUITE-TEST-CAMPAIGN-PERSON-OPERATION-MANAGER\',\n
\'campaign_howto_person2_title\': \'ZUITE-TEST-CAMPAIGN-PERSON-OPERATION-MANAGER\',\n
\'campaign_howto_organisation_title\': \'ZUITE-TEST-CAMPAIGN-ORGANISATION-001\',\n
\'campaign_howto_organisation_title\': \'ZUITE-TEST-CAMPAIGN-ORGANISATION-001\',\n
...
...
bt5/erp5_user_tutorial_ui_test/SkinTemplateItem/portal_skins/erp5_user_tutorial_ui_test/Zuite_setUpSaleTradeConditionTest.xml
0 → 100644
View file @
abf1bbd6
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</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_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<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>
_body
</string>
</key>
<value>
<string>
if clean:\n
context.Zuite_tearDownSaleTradeConditionTest()\n
\n
portal = context.getPortalObject()\n
howto_dict = context.Zuite_getHowToInfo()\n
isTransitionPossible = portal.portal_workflow.isTransitionPossible\n
\n
# check if there is already the euro curency on the instance\n
currency = context.portal_catalog.getResultValue(portal_type=\'Currency\',\n
title=howto_dict[\'sale_howto_currency_title\'])\n
\n
if currency is None:\n
currency = portal.currency_module.newContent(portal_type=\'Currency\',\n
title=howto_dict[\'sale_howto_currency_title\'],\n
reference=howto_dict[\'sale_howto_currency_tag\'],\n
id=howto_dict[\'sale_howto_currency_tag\'],\n
base_unit_quantity=0.01)\n
\n
if isTransitionPossible(currency, \'validate\'):\n
currency.validate()\n
\n
my_organisation = portal.organisation_module.newContent(portal_type=\'Organisation\',\n
title=howto_dict[\'sale_howto_organisation_title\'],\n
corporate_name=howto_dict[\'sale_howto_organisation_title\'])\n
my_organisation.setRole(\'supplier\')\n
my_organisation.setGroup(\'my_group\')\n
my_organisation.validate()\n
\n
organisation = portal.organisation_module.newContent(portal_type=\'Organisation\',\n
title=howto_dict[\'sale_howto_organisation2_title\'],\n
corporate_name=howto_dict[\'sale_howto_organisation2_title\'])\n
organisation.validate()\n
\n
person = portal.person_module.newContent(portal_type=\'Person\',\n
title=howto_dict[\'sale_howto_person_title\'],\n
career_subordination_title=howto_dict[\'sale_howto_organisation_title\'])\n
person.validate()\n
\n
pref = getattr(context.portal_preferences, howto_dict[\'howto_preference_id\'], None)\n
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
pref.setPreferredAccountingTransactionSourceSection(my_organisation.getRelativeUrl())\n
\n
# Disabling save form warning\n
# this is bad but needed quickly to disable save form warning \n
pref.setPreferredHtmlStyleUnsavedFormWarning(False)\n
\n
# Clear cache\n
portal.portal_caches.clearAllCache()\n
\n
return "Init Ok"\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
clean=True
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Zuite_setUpSaleTradeConditionTest
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_user_tutorial_ui_test/SkinTemplateItem/portal_skins/erp5_user_tutorial_ui_test/Zuite_tearDownSaleTradeConditionTest.xml
0 → 100644
View file @
abf1bbd6
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</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_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<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>
_body
</string>
</key>
<value>
<string>
portal = context.getPortalObject()\n
howto_dict = context.Zuite_getHowToInfo()\n
\n
# remove the currency if it was created by us before\n
currency = context.portal_catalog.getResultValue(portal_type=\'Currency\',\n
title=howto_dict[\'sale_howto_currency_title\'],\n
local_roles = \'Owner\')\n
if currency is not None:\n
context.currency_module.deleteContent(currency.getId())\n
\n
# remove the organisation of the test if existing\n
organisation_list = context.Zuite_checkPortalCatalog(portal_type=\'Organisation\', max_count=1,\n
title=howto_dict[\'sale_howto_organisation_title\'])\n
if organisation_list is not None:\n
portal.organisation_module.deleteContent(organisation_list[0].getId())\n
\n
# remove the second organisation of the test if existing\n
organisation_list2 = context.Zuite_checkPortalCatalog(portal_type=\'Organisation\', max_count=1,\n
title=howto_dict[\'sale_howto_organisation2_title\'])\n
if organisation_list2 is not None:\n
portal.organisation_module.deleteContent(organisation_list2[0].getId())\n
\n
# remove the organisation of the test if existing\n
person_list = context.Zuite_checkPortalCatalog(portal_type=\'Person\', max_count=1,\n
title=howto_dict[\'sale_howto_person_title\'])\n
if person_list is not None:\n
portal.person_module.deleteContent(person_list[0].getId())\n
\n
# remove related sale packing list and sale order\n
sale_order_list = context.Zuite_checkPortalCatalog(portal_type=\'Sale Order\', max_count=1,\n
title=howto_dict[\'sale_howto_product_title\'])\n
if sale_order_list is not None:\n
for applied_rule in sale_order_list[0].getCausalityRelatedValueList(portal_type=\'Applied Rule\'):\n
applied_rule.getParentValue().deleteContent(applied_rule.getId())\n
portal.sale_order_module.deleteContent(sale_order_list[0].getId())\n
\n
# remove related sale packing list and sale order\n
sale_trade_condition_list = context.Zuite_checkPortalCatalog(portal_type=\'Sale Trade Condition\', max_count=1,\n
title=howto_dict[\'sale_howto_trade_condition_title\'])\n
if sale_trade_condition_list is not None:\n
portal.sale_trade_condition_module.deleteContent(sale_trade_condition_list[0].getId())\n
\n
\n
pref = getattr(context.portal_preferences, howto_dict[\'howto_preference_id\'], None)\n
if pref is not None:\n
context.portal_preferences.deleteContent(howto_dict[\'howto_preference_id\'])\n
\n
portal.portal_caches.clearAllCache()\n
\n
return "Clean Ok"\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Zuite_tearDownSaleTradeConditionTest
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5Type/tests/testFunctionalStandaloneUserTutorial.py
View file @
abf1bbd6
...
@@ -44,7 +44,7 @@ BASE_REMOTE_SELENIUM_TEST_URL_LIST = [
...
@@ -44,7 +44,7 @@ BASE_REMOTE_SELENIUM_TEST_URL_LIST = [
# Part 2 - PDM, Trade and simulation related tests
# Part 2 - PDM, Trade and simulation related tests
"http://www.erp5.com/user-Howto.Create.and.Manage.Products/TestPage_viewSeleniumTest"
,
"http://www.erp5.com/user-Howto.Create.and.Manage.Products/TestPage_viewSeleniumTest"
,
# DO NOT CONTAINS TEST YET "http://www.erp5.com/user-Howto.Create.Trade.Conditions-HTML5
/TestPage_viewSeleniumTest",
"http://www.erp5.com/user-Howto.Create.Trade.Conditions
/TestPage_viewSeleniumTest"
,
"http://www.erp5.com/user-Howto.Create.Sale.Orders/TestPage_viewSeleniumTest"
,
"http://www.erp5.com/user-Howto.Create.Sale.Orders/TestPage_viewSeleniumTest"
,
"http://www.erp5.com/user-Howto.Manage.Packing.Lists/TestPage_viewSeleniumTest"
,
"http://www.erp5.com/user-Howto.Manage.Packing.Lists/TestPage_viewSeleniumTest"
,
"http://www.erp5.com/user-Howto.Manage.Invoices/TestPage_viewSeleniumTest"
,
"http://www.erp5.com/user-Howto.Manage.Invoices/TestPage_viewSeleniumTest"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment