diff --git a/product/ERP5/tests/testProductionOrder.py b/product/ERP5/tests/testProductionOrder.py index 06f0f04df99dda31589b56321d6651aba0c778c8..39d80c7b5dfda0d85494c6bc34e180f08f9658ef 100644 --- a/product/ERP5/tests/testProductionOrder.py +++ b/product/ERP5/tests/testProductionOrder.py @@ -156,6 +156,22 @@ class TestProductionOrderMixin(TestOrderMixin): ) 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, **kw): """ @@ -1140,6 +1156,37 @@ class TestProductionOrder(TestProductionOrderMixin, ERP5TypeTestCase): self.operation_line_portal_type = 'Transformation Operation' 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) def test_50_testCopyPaste(self, quiet=0, run=run_all_test):