fixes to our tests related to updates in SpiffWorkflow
This commit is contained in:
parent
3569c82e80
commit
8e2e3519f6
|
@ -11,10 +11,10 @@
|
||||||
<bpmn:outgoing>Flow_08kr305</bpmn:outgoing>
|
<bpmn:outgoing>Flow_08kr305</bpmn:outgoing>
|
||||||
</bpmn:exclusiveGateway>
|
</bpmn:exclusiveGateway>
|
||||||
<bpmn:sequenceFlow id="Flow_0gb1k4g" sourceRef="Gateway_1j2ytgn" targetRef="animals">
|
<bpmn:sequenceFlow id="Flow_0gb1k4g" sourceRef="Gateway_1j2ytgn" targetRef="animals">
|
||||||
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">type == 'fruit'</bpmn:conditionExpression>
|
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">type == 'animals'</bpmn:conditionExpression>
|
||||||
</bpmn:sequenceFlow>
|
</bpmn:sequenceFlow>
|
||||||
<bpmn:sequenceFlow id="Flow_08kr305" sourceRef="Gateway_1j2ytgn" targetRef="fruits">
|
<bpmn:sequenceFlow id="Flow_08kr305" sourceRef="Gateway_1j2ytgn" targetRef="fruits">
|
||||||
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">type=="fruit"</bpmn:conditionExpression>
|
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">type=="fruits"</bpmn:conditionExpression>
|
||||||
</bpmn:sequenceFlow>
|
</bpmn:sequenceFlow>
|
||||||
<bpmn:exclusiveGateway id="Gateway_14eyj6z">
|
<bpmn:exclusiveGateway id="Gateway_14eyj6z">
|
||||||
<bpmn:incoming>Flow_09ik0zr</bpmn:incoming>
|
<bpmn:incoming>Flow_09ik0zr</bpmn:incoming>
|
||||||
|
|
|
@ -81,7 +81,7 @@ class TestLookupService(BaseTest):
|
||||||
|
|
||||||
processor.do_engine_steps()
|
processor.do_engine_steps()
|
||||||
task = processor.get_ready_user_tasks()[0]
|
task = processor.get_ready_user_tasks()[0]
|
||||||
task.data = {"type": "animal"}
|
task.data = {"type": "animals"}
|
||||||
processor.complete_task(task)
|
processor.complete_task(task)
|
||||||
processor.do_engine_steps()
|
processor.do_engine_steps()
|
||||||
task = processor.get_ready_user_tasks()[0]
|
task = processor.get_ready_user_tasks()[0]
|
||||||
|
@ -94,7 +94,7 @@ class TestLookupService(BaseTest):
|
||||||
processor = WorkflowProcessor.reset(workflow, clear_data=True)
|
processor = WorkflowProcessor.reset(workflow, clear_data=True)
|
||||||
processor.do_engine_steps()
|
processor.do_engine_steps()
|
||||||
task = processor.get_ready_user_tasks()[0]
|
task = processor.get_ready_user_tasks()[0]
|
||||||
task.data = {"type": "fruit"}
|
task.data = {"type": "fruits"}
|
||||||
processor.complete_task(task)
|
processor.complete_task(task)
|
||||||
processor.do_engine_steps()
|
processor.do_engine_steps()
|
||||||
task = processor.get_ready_user_tasks()[0]
|
task = processor.get_ready_user_tasks()[0]
|
||||||
|
|
|
@ -110,10 +110,10 @@ class TestTasksApi(BaseTest):
|
||||||
self.assertEqual(4, len(nav))
|
self.assertEqual(4, len(nav))
|
||||||
self.assertEqual("Do You Have Bananas", nav[1].description)
|
self.assertEqual("Do You Have Bananas", nav[1].description)
|
||||||
self.assertEqual("Bananas?", nav[2].description)
|
self.assertEqual("Bananas?", nav[2].description)
|
||||||
self.assertEqual("LIKELY", nav[2].state)
|
self.assertEqual("MAYBE", nav[2].state)
|
||||||
|
|
||||||
self.assertEqual("yes", nav[2].children[0].description)
|
self.assertEqual("yes", nav[2].children[0].description)
|
||||||
self.assertEqual("LIKELY", nav[2].children[0].state)
|
self.assertEqual("MAYBE", nav[2].children[0].state)
|
||||||
self.assertEqual("of Bananas", nav[2].children[0].children[0].description)
|
self.assertEqual("of Bananas", nav[2].children[0].children[0].description)
|
||||||
self.assertEqual("EndEvent", nav[2].children[0].children[1].spec_type)
|
self.assertEqual("EndEvent", nav[2].children[0].children[1].spec_type)
|
||||||
|
|
||||||
|
|
|
@ -126,7 +126,7 @@ class TestTasksApi(BaseTest):
|
||||||
self.assertEqual(4, len(nav))
|
self.assertEqual(4, len(nav))
|
||||||
self.assertEqual('READY', nav[1].state) # First item is ready, no progress yet.
|
self.assertEqual('READY', nav[1].state) # First item is ready, no progress yet.
|
||||||
self.assertEqual('LOCKED', nav[2].state) # Second item is locked, it is the review and doesn't belong to this user.
|
self.assertEqual('LOCKED', nav[2].state) # Second item is locked, it is the review and doesn't belong to this user.
|
||||||
self.assertEqual('LIKELY', nav[3].state) # Third item is a gateway, which contains things that are also locked.
|
self.assertEqual('MAYBE', nav[3].state) # Third item is a gateway, which contains things that are also locked.
|
||||||
self.assertEqual('READY', workflow_api.next_task.state)
|
self.assertEqual('READY', workflow_api.next_task.state)
|
||||||
|
|
||||||
# Navigation as Submitter after handoff to supervisor
|
# Navigation as Submitter after handoff to supervisor
|
||||||
|
@ -136,7 +136,7 @@ class TestTasksApi(BaseTest):
|
||||||
nav = workflow_api.navigation
|
nav = workflow_api.navigation
|
||||||
self.assertEqual('COMPLETED', nav[1].state) # First item is ready, no progress yet.
|
self.assertEqual('COMPLETED', nav[1].state) # First item is ready, no progress yet.
|
||||||
self.assertEqual('LOCKED', nav[2].state) # Second item is locked, it is the review and doesn't belong to this user.
|
self.assertEqual('LOCKED', nav[2].state) # Second item is locked, it is the review and doesn't belong to this user.
|
||||||
self.assertEqual('LIKELY', nav[3].state) # third item is a gateway, and belongs to no one
|
self.assertEqual('MAYBE', nav[3].state) # third item is a gateway, and belongs to no one
|
||||||
# In the event the next task is locked, we should say something sensible here.
|
# In the event the next task is locked, we should say something sensible here.
|
||||||
# It is possible to look at the role of the task, and say The next task "TASK TITLE" will
|
# It is possible to look at the role of the task, and say The next task "TASK TITLE" will
|
||||||
# be handled by 'dhf8r', who is full-filling the role of supervisor. the Task Data
|
# be handled by 'dhf8r', who is full-filling the role of supervisor. the Task Data
|
||||||
|
@ -150,7 +150,7 @@ class TestTasksApi(BaseTest):
|
||||||
nav = workflow_api.navigation
|
nav = workflow_api.navigation
|
||||||
self.assertEqual('LOCKED', nav[1].state) # First item belongs to the submitter, and is locked.
|
self.assertEqual('LOCKED', nav[1].state) # First item belongs to the submitter, and is locked.
|
||||||
self.assertEqual('READY', nav[2].state) # Second item is ready, as we are now the supervisor.
|
self.assertEqual('READY', nav[2].state) # Second item is ready, as we are now the supervisor.
|
||||||
self.assertEqual('LIKELY', nav[3].state) # Feedback is locked.
|
self.assertEqual('MAYBE', nav[3].state) # Feedback is locked.
|
||||||
self.assertEqual('READY', workflow_api.next_task.state)
|
self.assertEqual('READY', workflow_api.next_task.state)
|
||||||
|
|
||||||
data = workflow_api.next_task.data
|
data = workflow_api.next_task.data
|
||||||
|
|
Loading…
Reference in New Issue