Commit e7797d08 authored by Jérome Perrin's avatar Jérome Perrin

testStandardConfigurationWorkflow: pass transitions using doActionFor

Otherwise we don't check constraints & security
parent 23d660e1
...@@ -809,6 +809,8 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin): ...@@ -809,6 +809,8 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
self.assertEqual(currency.getRelativeUrl(), self.assertEqual(currency.getRelativeUrl(),
sale_trade_condition.getPriceCurrency()) sale_trade_condition.getPriceCurrency())
self.assertEqual([], sale_trade_condition.checkConsistency())
def stepCheckPurchaseTradeCondition(self, sequence=None, sequence_list=None, **kw): def stepCheckPurchaseTradeCondition(self, sequence=None, sequence_list=None, **kw):
""" """
Check if Purchase Trade Condition object has been created. Check if Purchase Trade Condition object has been created.
...@@ -977,17 +979,18 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin): ...@@ -977,17 +979,18 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
# stepPlanSaleOrders # stepPlanSaleOrders
self.assertEqual(order.getSimulationState(), 'draft') self.assertEqual(order.getSimulationState(), 'draft')
order.plan() self._loginAsUser(self.sales_manager_reference)
self.portal.portal_workflow.doActionFor(order, 'plan_action')
self.tic() self.tic()
self.assertEqual(order.getSimulationState(), 'planned') self.assertEqual(order.getSimulationState(), 'planned')
# stepOrderSaleOrders # stepOrderSaleOrders
order.order() self.portal.portal_workflow.doActionFor(order, 'order_action')
self.tic() self.tic()
self.assertEqual(order.getSimulationState(), 'ordered') self.assertEqual(order.getSimulationState(), 'ordered')
# stepConfirmSaleOrders # stepConfirmSaleOrders
order.confirm() self.portal.portal_workflow.doActionFor(order, 'confirm_action')
self.tic() self.tic()
self.assertEqual(order.getSimulationState(), 'confirmed') self.assertEqual(order.getSimulationState(), 'confirmed')
...@@ -1157,6 +1160,9 @@ class TestConsultingConfiguratorWorkflow(StandardConfigurationMixin): ...@@ -1157,6 +1160,9 @@ class TestConsultingConfiguratorWorkflow(StandardConfigurationMixin):
# set preference group # set preference group
self.preference_group = 'group/my_group' self.preference_group = 'group/my_group'
# login as manager
self.login()
def beforeTearDown(self): def beforeTearDown(self):
os.remove(self.categories_file_path) os.remove(self.categories_file_path)
os.remove(self.roles_file_path) os.remove(self.roles_file_path)
......
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