Commit 78a0c535 authored by Łukasz Nowak's avatar Łukasz Nowak

- added cases that invalidated transformation won't be set automatically, and...

 - added cases that invalidated transformation won't be set automatically, and that in case of invalidated and other, the other will be set

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22226 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a7d25594
...@@ -156,6 +156,22 @@ class TestProductionOrderMixin(TestOrderMixin): ...@@ -156,6 +156,22 @@ class TestProductionOrderMixin(TestOrderMixin):
) )
sequence.edit(component2=resource) sequence.edit(component2=resource)
def stepInvalidateTransformation(self, sequence=None, sequence_list=None,
**kw):
transformation = sequence.get('transformation')
# XXX: rc user from testOrder is not able to doActionFor ???
transformation.invalidate()
self.assertEquals('invalidated',transformation.getValidationState())
def stepValidateTransformation(self, sequence=None, sequence_list=None,
**kw):
transformation = sequence.get('transformation')
# XXX: rc user from testOrder is not able to doActionFor ???
transformation.validate()
self.assertEquals('validated',transformation.getValidationState())
def stepCreateTransformation(self, sequence=None, sequence_list=None, def stepCreateTransformation(self, sequence=None, sequence_list=None,
**kw): **kw):
""" """
...@@ -1140,6 +1156,37 @@ class TestProductionOrder(TestProductionOrderMixin, ERP5TypeTestCase): ...@@ -1140,6 +1156,37 @@ class TestProductionOrder(TestProductionOrderMixin, ERP5TypeTestCase):
self.operation_line_portal_type = 'Transformation Operation' self.operation_line_portal_type = 'Transformation Operation'
self.resource_portal_type = 'Product' self.resource_portal_type = 'Product'
# Note: Below are cases only for non-apparel - as there is no validation
# worklow for Apparel Transformation
# case of invalidated Transformation
sequence_string = bootstrap_sequence_string + '\
CreateTransformation \
Tic \
ValidateTransformation \
InvalidateTransformation \
Tic \
CreateOrderLineWithoutTransformation \
Tic \
CheckOrderLineTransformationIsNotSet \
'
sequence_list.addSequenceString(sequence_string)
# case of invalidated Transformation and other
sequence_string = bootstrap_sequence_string + '\
CreateTransformation \
Tic \
ValidateTransformation \
InvalidateTransformation \
Tic \
CreateTransformation \
Tic \
CreateOrderLineWithoutTransformation \
Tic \
CheckOrderLineTransformationIsSet \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self)
def test_50_testCopyPaste(self, quiet=0, run=run_all_test): def test_50_testCopyPaste(self, quiet=0, run=run_all_test):
......
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