From 2c892560ad9eff762a52c8a45144d1c75f4d36e7 Mon Sep 17 00:00:00 2001 From: mike cullerton Date: Mon, 26 Jul 2021 12:12:01 -0400 Subject: [PATCH] Failing test for Call Activity End Events - Ticket 399 --- .../call_activity_call_activity.bpmn | 42 +++++++++++ .../call_activity_end_event.bpmn | 70 +++++++++++++++++++ .../test_workflow_call_activity_end_event.py | 21 ++++++ 3 files changed, 133 insertions(+) create mode 100644 tests/data/call_activity_end_event/call_activity_call_activity.bpmn create mode 100644 tests/data/call_activity_end_event/call_activity_end_event.bpmn create mode 100644 tests/workflow/test_workflow_call_activity_end_event.py diff --git a/tests/data/call_activity_end_event/call_activity_call_activity.bpmn b/tests/data/call_activity_end_event/call_activity_call_activity.bpmn new file mode 100644 index 00000000..57fb865d --- /dev/null +++ b/tests/data/call_activity_end_event/call_activity_call_activity.bpmn @@ -0,0 +1,42 @@ + + + + + Flow_07uhaa7 + + + + # Call Event +<div><span>Hello {{my_var}}</span></div> + Flow_0apfnjq + + + + Flow_07uhaa7 + Flow_0apfnjq + my_var = 'World' +my_other_var = 'Mike' + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/data/call_activity_end_event/call_activity_end_event.bpmn b/tests/data/call_activity_end_event/call_activity_end_event.bpmn new file mode 100644 index 00000000..a4d322c7 --- /dev/null +++ b/tests/data/call_activity_end_event/call_activity_end_event.bpmn @@ -0,0 +1,70 @@ + + + + + Flow_1g3dpd7 + + + + + Flow_0ovgj6c + Flow_0qdgvah + + + + # Main Workflow +Hello {{my_other_var}} + + + Flow_0izaz4f + + + + Flow_0qdgvah + Flow_0izaz4f + print(pre_var) +print(my_var) +print(my_other_var) + + + Flow_1g3dpd7 + Flow_0ovgj6c + pre_var = 'some string' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/workflow/test_workflow_call_activity_end_event.py b/tests/workflow/test_workflow_call_activity_end_event.py new file mode 100644 index 00000000..78225aa1 --- /dev/null +++ b/tests/workflow/test_workflow_call_activity_end_event.py @@ -0,0 +1,21 @@ +from tests.base_test import BaseTest + + +class TestCallActivityEndEvent(BaseTest): + + def test_call_activity_end_event(self): + workflow = self.create_workflow('call_activity_end_event') + workflow_api = self.get_workflow_api(workflow) + first_task = workflow_api.next_task + + # This test looks at Element Documentation + # The actual end event has 'Main Workflow' + # The call activity has 'Call Event' + + # This should fail, but it passes + self.assertIn('Call Event', first_task.documentation) + + # This should pass, but it fails + self.assertIn('Main Workflow', first_task.documentation) + + print('call_activity_end_event') \ No newline at end of file