From 3569c82e80d3213b7dabaeb71e1a642ad9fc5fa8 Mon Sep 17 00:00:00 2001 From: Dan Date: Tue, 16 Nov 2021 12:09:33 -0500 Subject: [PATCH 1/2] fixing additional tests --- .../invalid_expression.bpmn | 70 +++++++++---------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/tests/data/invalid_expression/invalid_expression.bpmn b/tests/data/invalid_expression/invalid_expression.bpmn index 9d61c458..0cf63cd0 100644 --- a/tests/data/invalid_expression/invalid_expression.bpmn +++ b/tests/data/invalid_expression/invalid_expression.bpmn @@ -1,5 +1,5 @@ - + SequenceFlow_1pnq3kg @@ -8,7 +8,7 @@ - + SequenceFlow_1pnq3kg @@ -55,32 +55,13 @@ - - - - - - + + + - - - - - - - - - - - - - - - - - - - + + + @@ -90,6 +71,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -99,17 +107,9 @@ - - - - - - - - From 8e2e3519f690f1faaa8f57e58c2e3e9e6b1b61ba Mon Sep 17 00:00:00 2001 From: Dan Date: Tue, 16 Nov 2021 15:57:37 -0500 Subject: [PATCH 2/2] fixes to our tests related to updates in SpiffWorkflow --- .../enum_options_competing_files.bpmn | 4 ++-- tests/test_lookup_service.py | 4 ++-- tests/test_tasks_api.py | 4 ++-- tests/test_user_roles.py | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/data/enum_options_competing_files/enum_options_competing_files.bpmn b/tests/data/enum_options_competing_files/enum_options_competing_files.bpmn index f1773308..14687339 100644 --- a/tests/data/enum_options_competing_files/enum_options_competing_files.bpmn +++ b/tests/data/enum_options_competing_files/enum_options_competing_files.bpmn @@ -11,10 +11,10 @@ Flow_08kr305 - type == 'fruit' + type == 'animals' - type=="fruit" + type=="fruits" Flow_09ik0zr diff --git a/tests/test_lookup_service.py b/tests/test_lookup_service.py index dda8772c..0b145fa7 100644 --- a/tests/test_lookup_service.py +++ b/tests/test_lookup_service.py @@ -81,7 +81,7 @@ class TestLookupService(BaseTest): processor.do_engine_steps() task = processor.get_ready_user_tasks()[0] - task.data = {"type": "animal"} + task.data = {"type": "animals"} processor.complete_task(task) processor.do_engine_steps() task = processor.get_ready_user_tasks()[0] @@ -94,7 +94,7 @@ class TestLookupService(BaseTest): processor = WorkflowProcessor.reset(workflow, clear_data=True) processor.do_engine_steps() task = processor.get_ready_user_tasks()[0] - task.data = {"type": "fruit"} + task.data = {"type": "fruits"} processor.complete_task(task) processor.do_engine_steps() task = processor.get_ready_user_tasks()[0] diff --git a/tests/test_tasks_api.py b/tests/test_tasks_api.py index 48dd2fef..b663207a 100644 --- a/tests/test_tasks_api.py +++ b/tests/test_tasks_api.py @@ -110,10 +110,10 @@ class TestTasksApi(BaseTest): self.assertEqual(4, len(nav)) self.assertEqual("Do You Have Bananas", nav[1].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("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("EndEvent", nav[2].children[0].children[1].spec_type) diff --git a/tests/test_user_roles.py b/tests/test_user_roles.py index 9d473fec..0107fb82 100644 --- a/tests/test_user_roles.py +++ b/tests/test_user_roles.py @@ -126,7 +126,7 @@ class TestTasksApi(BaseTest): self.assertEqual(4, len(nav)) 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('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) # Navigation as Submitter after handoff to supervisor @@ -136,7 +136,7 @@ class TestTasksApi(BaseTest): nav = workflow_api.navigation 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('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. # 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 @@ -150,7 +150,7 @@ class TestTasksApi(BaseTest): nav = workflow_api.navigation 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('LIKELY', nav[3].state) # Feedback is locked. + self.assertEqual('MAYBE', nav[3].state) # Feedback is locked. self.assertEqual('READY', workflow_api.next_task.state) data = workflow_api.next_task.data