Commit Graph

95 Commits

Author SHA1 Message Date
mike cullerton 09d8c8bcba added missing test for update_workflow_spec_category 2021-04-26 12:57:08 -04:00
mike cullerton 0aa3e8f586 added missing test for add_workflow_spec_category 2021-04-26 12:41:50 -04:00
mike cullerton b73c2ff1cb Added missing test for `get_workflow_from_workflow_spec` 2021-04-26 12:00:06 -04:00
Mike Cullerton 39fcab3730
Merge branch 'dev' into launch-workflow-outside-study-204 2021-04-26 10:27:32 -04:00
mike cullerton 7cca559747 Fixed issue where we were passing in a workflow_api instead of a workflow when completing a form in tests. 2021-04-26 08:58:09 -04:00
mike cullerton c002ef1e76 Added test for new api endpoint to get all standalone workflow_specs.
Modified test_add_new_workflow_specification to include new standalone argument
2021-04-26 08:56:21 -04:00
mike cullerton 2d4a68da6d Added test for deleting files on restart. 2021-04-15 11:30:17 -04:00
Dan 6427a54d74 Set the correct default value on enumerations - if it is a multi-select enum (checkbox is set) then it should return a default value of an empty array, and not a dictionary. 2021-04-09 08:40:58 -04:00
mike cullerton 5155db89f9 Added test for deleting multiple files.
Fixed existing tests to accommodate changes to test workflow bpmn file
2021-04-05 15:13:32 -04:00
mike cullerton 33cef2bd2a Added tests for failing conditions 2021-04-05 13:19:29 -04:00
mike cullerton 9317e49e65 Merge branch 'dev' into delete-uploaded-file-script-283 2021-04-05 10:40:33 -04:00
mike cullerton d81497f8cb Test and workflow for new script to delete IRB documents 2021-04-05 08:55:41 -04:00
Dan dcb4e7b736 fixing an error by taking a bit of the magic out of one of Mike's regex hinting tools. I figure the hint is still good, and a little less bittle, and all the information is already there if people need to dig. 2021-04-02 17:58:27 -04:00
Dan 2100f27976 fixing the api.yml file which was starting to throw errors when updating the libraries.
Seems that sqlalchemy now has a hard time incrementing sequences, so putting in a fix for this.
Upgrading many of our libraries, to avoid any disconnects as we try to handle security patches from these automated bumps.
2021-04-02 17:10:05 -04:00
mike cullerton c4b52f85af Test and workflow for testing infinite loop code. 2021-03-17 14:52:50 -04:00
Dan 6f80d816cd My privous efforts didn't take into account the fact that we use dot notation in field names.
I've re-worked the workflow form endpoint, so that it only accepts the data that should be in the form, and ignores any other values that come back from the front end.  It seems Formly has some bugs that were introducing confusing information, and I want everything to behave consistently.
I had to re-work some of the tests, which were relying on an ability to set data through a form post without having a corresponding form to do so.
2021-03-14 12:20:39 -04:00
Dan 576aebab19 Sometimes a workflow can be completely broken and unloadable. For instance, it starts off with a engine step / script task that will not execute. So the failure happens the second it is processed. When calling reset on a workflow, we should catch the failure, and reset the workflow, so we aren't trapped in an unrecoverable state.
To do so, I changed the WorkflowProcessor's reset method to be static, it will try to instantiate the current workflow and execute a cancel_notify event, but if that fails, it will continue and always return a new workflow processor using the latest spec.
2021-03-09 11:52:55 -05:00
Dan 36dcc58705 Merge branch 'dev' of github.com:sartography/cr-connect-workflow into dev 2021-03-08 14:00:14 -05:00
Dan 291216e081 Fixing a bug that prevented proper evaluation of a enum field where the default value was null or empty. 2021-03-08 14:00:03 -05:00
mike cullerton f883eb2bbe We now include field.id in the ApiError message for hidden and default validation. (The field must have a default value or value expression)
While working on this ticket I found a logic error in the test. I expected both default_value and value_expression. It turns out the default_value is always there, it's just null if we don't set it.

Modified the existing test for hidden and required, and added tests to make sure my passing logic is now correct.
2021-03-04 10:42:13 -05:00
mike cullerton 9a2ffb98ad Customer Error is in a place that we can try it out on testing.
So far, there are two known errors.
 - Missing condition type (Ticket 178)
 - Invalid property value in extensions tab for display_name (No ticket for this error)

We now have the option of using regular expressions to pull task_id, etc. from an error to pass back to the user in the hint.
2021-03-01 16:41:55 -05:00
mike cullerton 9d804c36d5 Merge branch 'dev' into customer-error-messages-192.
Needed some sql changes from dev
2021-03-01 10:29:10 -05:00
mike cullerton f937ac3ce9 Getting some thoughts down for the extension property error. This might force us to use regexes for the error service.
Committing so I can work on another branch.
2021-02-24 10:56:25 -05:00
mike cullerton e0de1d0b3b Fixed 3 tests to reflect a change in crc.api.workflow.validate_workflow_specification.
Added a '\n' to the error message between the actual error and our preamble.
2021-02-19 15:55:40 -05:00
mike cullerton 446bff9c8c Modified test for missing default value on hidden and required fields to check for task_id and task_name 2021-02-15 16:28:51 -05:00
mike cullerton 34700568ee Added a test for allowing periods in field ids 2021-02-15 16:28:21 -05:00
mike cullerton 39eb5c5c21 This is a decent beginning framework for customer error messages.
It is not complete, but is in a state where we can start to interact with the front end.
Two tests are failing.
Committing so I can work on an error for Alex.
2021-02-12 14:18:42 -05:00
Dan Funk fe4e737596
Merge pull request #238 from sartography/value-expression-failing-shield-test-194
We now allow value_expression to evaluate to an empty string ("") so …
2021-02-11 11:25:09 -05:00
Dan Funk df25b83958
Merge pull request #235 from sartography/index-error-for-enums-186
Index error for enums 186
2021-02-11 11:21:50 -05:00
mike cullerton 39e874504f We now allow value_expression to evaluate to an empty string ("") so that we *do not* set a default value for enums in some cases.
This was causing an error because "" was not an option for the enum.
2021-02-10 14:35:58 -05:00
mike cullerton 11177b4296 Test, workflow, and empty spreadsheet for the new code. The workflow references the spreadsheet, which has no rows. 2021-02-08 15:12:11 -05:00
mike cullerton eb504465f6 Test and workflow for new code.
We test 2 things.
 - If a field can be hidden and required, it must have a default value or value_expression
 - If a field is hidden and required, make sure we use the default value
2021-02-08 10:20:05 -05:00
mike cullerton fa34bee18a First commit for cleaning up error messages for customers.
This is *not* in a working state.
Committing this so I can work on another ticket.
2021-02-04 11:23:05 -05:00
Dan Funk 329146237e
Merge pull request #232 from sartography/boolean-default-values-175
Boolean default values 175
2021-02-03 16:34:54 -05:00
Dan Funk effd11f947
Merge pull request #231 from sartography/cancellations-137
Cancellations 137
2021-02-03 16:31:18 -05:00
Dan Funk 1eba20f420
Merge pull request #229 from sartography/workflow-spec-order-74
Workflow spec order 74
2021-02-03 16:18:34 -05:00
mike cullerton 1247744463 Test and workflow for new code. 2021-02-03 09:50:37 -05:00
mike cullerton 6f7abc0a97 Added tests to test_workflow_restart to make sure we call cancel_notify events when appropriate. 2021-01-29 14:48:35 -05:00
mike cullerton c026717b4a Changed the call to WorkflowProcessor.reset to reflect the change from class method to instance method 2021-01-29 14:06:25 -05:00
mike cullerton 7b91fb9f61 Modified test to check for display_order within workflow category. 2021-01-27 11:08:28 -05:00
Dan Funk cccb722e07
Merge pull request #226 from sartography/enum_default_value_expression_162
Enum default value expression 162
2021-01-27 10:43:46 -05:00
mike cullerton 420ef0b2b0 Test and data for cleaning up my smell. We now test explicitly whether a task has both a default_value and value_expression. If so, we raise an error. 2021-01-27 10:22:43 -05:00
mike cullerton 2438779470 Test and workflow file for missing form key. Ticket 163 2021-01-22 12:14:59 -05:00
mike cullerton 1ee6a11d46 Test and associated data files for setting enum default values from value_expression. Ticket 162 2021-01-22 10:01:20 -05:00
Dan Funk 5b13195182
Merge pull request #224 from sartography/restart-with-no-data-99
Restart with no data 99
2021-01-20 17:22:18 -05:00
Dan 41dac33039 Removed two tests around soft_reset that are no longer required.
Reset should construct the workflow_processor, thus completing the reset process.
Removed the spec argument from init, as it is never used anywhere.
2021-01-20 13:24:53 -05:00
mike cullerton 61d366c111 Fixed hard_reset test. Now we reset the workflow and run do_engine_steps 2021-01-19 15:39:59 -05:00
mike cullerton 9281a93abb New test for new restart_workflow endpoint 2021-01-19 15:15:44 -05:00
mike cullerton 6a9e6d3570 Restart workflow without form data. Committing so Dan can check it out 2021-01-14 15:32:14 -05:00
mike cullerton 99c1d1b129 Test for changes to hard_reset and soft_reset 2021-01-13 16:12:14 -05:00