Commit 0d0bc618 authored by Boxiang Sun's avatar Boxiang Sun

erp5_user_tutorial_ui_test: Clear the sale order created in the selenium test

user-Howto.Create.Trade.Conditions.008.en
parent 7858ab85
......@@ -43,12 +43,12 @@ return {'now': DateTime(),
'sale_howto_organisation2_title': 'ZUITE-TEST-SALEORDER-ORGANISATION-002',
'sale_howto_organisation3_title': 'ZUITE-TEST-SALEORDER-ORGANISATION-003',
'sale_howto_person_title': 'ZUITE-TEST-SALEORDER USER-001',
'sale_howto_product_title': 'ZUITE-TEST-SALEORDER-PRODUCT-001',
'sale_howto_payment_title': 'ZUITE-TEST-SALEORDER-PAYMENT-TRANSACTION-001',
'sale_howto_currency_title': 'Euro',
'sale_howto_currency_tag': 'EUR',
'sale_howto_product_reference': 'ZUITE-TEST-SALEORDER-RL01',
'sale_howto_trade_condition_title': 'ZUITE-TEST-SALE-TRADE-CONDITION-001',
'sale_howto_sale_order_title': 'ZUITE-TEST-TRADE-CONDITION-SALE-ORDER-001',
'campaign_howto_person_title': 'ZUITE-TEST-CAMPAIGN-PERSON-SUPERVISOR',
'campaign_howto_person2_title': 'ZUITE-TEST-CAMPAIGN-PERSON-OPERATION-MANAGER',
'campaign_howto_organisation_title': 'ZUITE-TEST-CAMPAIGN-ORGANISATION-001',
......
......@@ -40,6 +40,11 @@ sale_trade_condition_list = context.Zuite_checkPortalCatalog(portal_type='Sale T
if sale_trade_condition_list is not None:
portal.sale_trade_condition_module.deleteContent(sale_trade_condition_list[0].getId())
# remove sale order created in the test
sale_order_in_test_list = context.Zuite_checkPortalCatalog(portal_type='Sale Order', max_count=1,
title=howto_dict['sale_howto_sale_order_title'])
if sale_order_in_test_list is not None:
portal.sale_order_module.deleteContent(sale_order_in_test_list[0].getId())
pref = getattr(context.portal_preferences, howto_dict['howto_preference_id'], None)
if pref is not None:
......
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