Commit Graph

81 Commits

Author SHA1 Message Date
mike cullerton fb660182aa Testing setup changes 2021-10-05 13:36:53 -04:00
Dan 19104303de Refactor of the way we store and return details about users - All the details about a user, or individual associated with a study is returned within in an Ldap model. I've removed duplication between these models. This required some cleanup of the tests, and a migration that will drop the user details. 2021-09-22 13:16:25 -04:00
mike cullerton b0cf74fa3d Merge branch 'dev' into add-by-user-61
# Conflicts:
#	tests/files/test_files_api.py
2021-07-07 10:46:50 -04:00
mike cullerton ac19c3e3c6 Add users first 2021-07-07 10:33:30 -04:00
Dan 1b1a994360 Refactoring Reference files to use the lookup table, rather than parsing the results directly out of the spreadsheet, or attempting to cache them.
Adding a DocumentService to clean up the FileService, and get Documents well seperated, as it seems likely be pulled out or seperated in the future, there is now a Documents api file as well, for the same reason.
Some other minor changes are just fixing white space to assure our code is linting correctly.
I removed _create_study_workflow_approvals from the base test, as we don't use approvals like this anymore.
2021-07-06 13:10:20 -04:00
Dan 8f28970f92 Resolving an alembic conflict.
Upgrading libraries, and resolving issues from that upgrade, including changes to how we manage tokens.  This seems to be working locally.
2021-05-04 13:39:49 -04:00
Dan Funk d6054a9846
Merge branch 'dev' into 310-task-event-timezone 2021-05-04 11:21:36 -04:00
Kelly McDonald 2b9cee6b89 Update database to include timezone and change all points where we set the time on an event to be utc time. If we get something in the database with a timezone, it will display properly on the front end, but by default everything will be put in the database in UTC 2021-04-29 10:25:28 -04:00
Mike Cullerton 39fcab3730
Merge branch 'dev' into launch-workflow-outside-study-204 2021-04-26 10:27:32 -04:00
mike cullerton a17e1bfaca When completing a form in a test, check whether workflow is standalone.
Do not set study_id when workflow is standalone.

*** Note the comment about passing in workflow_spec. We should be passing in a workflow, not a workflow_spec.
2021-04-26 08:50:46 -04:00
mike cullerton 6c98e8a2f4 removed duplicate code 2021-04-26 08:47:03 -04:00
Dan Funk 277beb345f
Merge pull request #290 from sartography/auto-set-primary-bpmn-142
Auto set primary bpmn #142
2021-04-16 13:36:02 -04:00
mike cullerton 8953637466 moved the minimal_bpmn method to base_test 2021-04-15 13:28:03 -04:00
mike cullerton 69396f9888 Modified base_test restart_workflow_api to accept and pass on the new delete_files argument when restarting a workflow 2021-04-15 11:28:35 -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
Dan 15c64c862e Adding an argument to update task that will allow it to complete all remaining tasks through an "update_all" flag,
this will allow us to remove some fairly complex logic from the front end that isn't behaving properly.
2021-03-12 20:41:07 -05:00
Kelly McDonald 003bf2f9b9 Remove Approvals per ticket 183 2021-02-16 09:05:29 -05:00
Dan 5921ce9f10 Merge branch 'dev' into 152-workflow-spec-pull 2021-01-21 12:30:43 -05:00
mike cullerton bfb3871671 Added method for restart_workflow_api. Pulled out some common code with get_workflow_api. 2021-01-19 15:27: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
Kelly McDonald 442a4524c4 Test for new functionality and code coverage 2021-01-12 10:18:35 -05:00
Kelly McDonald ee3ee9fd4a Added tests to cover most of the use cases and code, and a bunch of stuff to make the mocks happy 2020-12-14 10:27:40 -05:00
Kelly McDonald 9eea26e019 add workflow_sync test 2020-12-11 08:34:59 -05:00
Kelly McDonald 92595e3c42 base_test didn't 'know' about the DataStoreModel so it wasn't creating the data_store table, causing a lot of problems after the initial setup/teardown 2020-11-10 09:33:54 -05:00
Aaron Louie 4dc98a6b6b Injects current user into task data. 2020-08-21 13:34:37 -04:00
Carlos Lopez 50b207307a Merge branch 'dev' into feature/update_study_status_latest 2020-07-31 14:26:24 -06:00
Carlos Lopez 5d23223e51 New study status update 2020-07-30 21:03:11 -06:00
Aaron Louie faba0f55ab Adds AdminSession model and refactors impersonation methods to use it. 2020-07-30 12:40:53 -04:00
Aaron Louie aa0f24bd33 Fully deletes users from g in test tearDown 2020-07-30 10:40:06 -04:00
Aaron Louie 1b0ebecbf4 Uses Flask session to store impersonation state. 2020-07-30 10:17:02 -04:00
Aaron Louie d301e9e6fa Adds list_users endpoint. Adds admin impersonate uid parameter to user endpoint. Adds some utility methods to user service. Refactors authentication tests. 2020-07-29 22:47:47 -04:00
Aaron Louie f897ee3aea Merge branch 'feature/approvals_dashboard_prototype' into feature/admin_impersonations 2020-07-29 10:32:46 -04:00
Dan Funk 0ea4c13d09 Convert protocol builder status to always be in lower case in order to better match the front end. And also fixing an issue with the multi_instance that is oddly broken suddenly, and I don't know why. 2020-07-28 17:16:48 -04:00
Dan Funk 4d11fc04a0 dropping the "read_only" flag in favor of a "do_engine_steps" flag, which more clearly defines what is happening. 2020-07-28 13:51:29 -04:00
Dan Funk f15626033d Allow the workflow to be requested without making changes to the workflow - requires that you specify a read_only flag of true, otherwise it assumes that you want a fully prepared workflow with the next ready task set to run. 2020-07-28 13:33:38 -04:00
Dan Funk 452f2c3723 Building out a user service for getting the current user, it will provide a number of functions, one of which will allow administrative users to impersonate other users in some circumstances (but will assure that we log events correctly when an impersonation occures) 2020-07-27 14:38:57 -04:00
Dan Funk 3d9eeab502 Add a few more details to the workflow metadata model. 2020-07-21 15:18:08 -04:00
Dan Funk d85ca1ce51 Whenever a workflow is loaded or updated, add events to the TaskEvent table with assignments for the next set of ready tasks, along with who should complete those tasks.
Add the lane information to the Task model.
Drop the foreign key constraint on the user_uid in the task log, as we might create tasks for users before they ever log into the system.
Add a new endpoint to the API called task events.  It should be possible to query this and get a list of all tasks that need a users attention.
The task events returned include detailed information about the workflow and study as sub-models
Rename all the actions in event log to things that are easier to pass over the api as arguments, make this backwards compatible, updating existing names in the database via the migration.
Throughly test the navigation and task details as control of the workflow is passed between two lanes.
2020-07-14 22:16:44 -04:00
Dan Funk a48322ef6a Partial work on CR Connect Roles.
Adding checks in the API to assure the correct person is completeing a task based on the task's lane.
Adding lane to the Navigation item.
Adding a check to assure that unique user ids can be identified using task.data
Added some additional ldap entries to make testing and development easier.
Removed a big chunk of duplicate code from task_tests_api
Modified some of the helper functions to make it easier to test as specific users.
Added some additional bpmn models to the tests for testing lanes and roles.
2020-07-14 10:29:25 -04:00
Carlos Lopez a302208890 Updating test for study with approvals 2020-07-07 08:32:41 -06:00
Kelly McDonald 1844c93919 STG-26 - basic test case for a looping task
Criteria :
task.multi_instance_type == 'looping'

to terminate, use the standard endpoint for submitting form data with a query variable of terminate_loop=true

Will likely need two buttons:
"Submit and quit"
"Submit and add another"
or something similar
2020-06-17 11:35:06 -04:00
Aaron Louie e3126620b3 Eschews obfuscation 2020-06-12 14:09:08 -04:00
Aaron Louie 561e254315 Prevents non-admin users from editing each others' tasks. Fixes bug where test user uid was not being set from token. Moves complete form and get workflow API test utility methods into BaseTest. 2020-06-12 13:46:10 -04:00
Aaron Louie f51e5e4e6b Adds tests for approval counts and all approvals endpoints 2020-06-11 16:39:00 -04:00
Aaron Louie 768f14b3ac Cleans up console logging 2020-06-11 13:42:44 -04:00
Dan Funk 4e006e2653 Clear out the g.user between tests. 2020-06-11 11:49:07 -04:00
Aaron Louie cccff9b856 Fixes broken unit tests. But still broken. 2020-06-11 11:29:58 -04:00
Aaron Louie 87e2379871 Merge branch 'rrt/dev' into feature/swagger_admin_authentication 2020-06-08 10:30:16 -04:00
Carlos Lopez 4727d87adb Hooking up emails into process - start 2020-06-04 20:37:28 -06:00
Aaron Louie c4a84ac509 Work in progress: Trying to get Swagger to use verify_token_admin to protect admin endpoints. Not working for some reason, though. 2020-05-31 18:01:08 -04:00