def test_data(self): """Creates an activated workflow with close due date.""" if not TestActivateWorkflow._data: app_workflow = workflow_rest_facade.create_workflow() task_group = workflow_rest_facade.create_task_group( workflow=app_workflow) assignee = person_rest_facade.create_person_with_role( roles.CREATOR) due_date = date_utils.first_working_day_after_today( datetime.date.today()) workflow_rest_facade.create_task_group_task(task_group=task_group, assignees=[assignee], due_date=due_date) workflow_rest_service.WorkflowRestService().activate(app_workflow) # handle GGRC-6527 only try: emails = daily_emails_ui_facade.get_emails_by_user_names( [users.current_user().name, assignee.name]) except TimeoutError as err: if "digest" in err.message: pytest.xfail("GGRC-6527: Digest is not opened") else: raise err TestActivateWorkflow._data = { "wf": app_workflow, "wf_creator_email": emails[users.current_user().name], "assignee_email": emails[assignee.name] } return TestActivateWorkflow._data
def activated_workflow(app_workflow): """Creates an activated workflow.""" task_group = workflow_rest_facade.create_task_group( workflow=app_workflow) workflow_rest_facade.create_task_group_task(task_group=task_group) workflow_rest_service.WorkflowRestService().activate(app_workflow) return app_workflow
def activated_workflow(app_workflow): """Creates an activated workflow.""" task_group = workflow_rest_facade.create_task_group( workflow=app_workflow) workflow_rest_facade.create_task_group_task(task_group=task_group) workflow_rest_service.WorkflowRestService().activate(app_workflow) return app_workflow
def activated_repeat_on_workflow(app_repeat_on_workflow): """Creates an activated repeat on workflow.""" task_group = workflow_rest_facade.create_task_group( workflow=app_repeat_on_workflow) workflow_rest_facade.create_task_group_task(task_group=task_group) app_utils.workaround_edit_without_non_api_request() workflow_rest_service.WorkflowRestService().activate(app_repeat_on_workflow) return app_repeat_on_workflow
def activated_repeat_on_workflow(app_repeat_on_workflow): """Creates an activated repeat on workflow.""" task_group = workflow_rest_facade.create_task_group( workflow=app_repeat_on_workflow) workflow_rest_facade.create_task_group_task(task_group=task_group) app_utils.workaround_edit_without_non_api_request() workflow_rest_service.WorkflowRestService().activate(app_repeat_on_workflow) return app_repeat_on_workflow
def test_destructive_activate_repeat_on_workflow(self, app_repeat_on_workflow, selenium): """Test activation of repeat on workflow. It should be checked separately as different requests are sent when repeat off and repeat on workflows are activated. """ task_group = workflow_rest_facade.create_task_group( workflow=app_repeat_on_workflow) workflow_rest_facade.create_task_group_task(task_group=task_group) workflow_ui_facade.activate_workflow(app_repeat_on_workflow) workflow_cycles = workflow_ui_facade.get_workflow_cycles( app_repeat_on_workflow) expected_workflow_cycle = cycle_entity_population.create_workflow_cycle( app_repeat_on_workflow) test_utils.list_obj_assert(workflow_cycles, [expected_workflow_cycle])
def test_destructive_activate_repeat_on_workflow( self, app_repeat_on_workflow, selenium ): """Test activation of repeat on workflow. It should be checked separately as different requests are sent when repeat off and repeat on workflows are activated. """ task_group = workflow_rest_facade.create_task_group( workflow=app_repeat_on_workflow) workflow_rest_facade.create_task_group_task(task_group=task_group) workflow_ui_facade.activate_workflow(app_repeat_on_workflow) workflow_cycles = workflow_ui_facade.get_workflow_cycles( app_repeat_on_workflow) expected_workflow_cycle = cycle_entity_population.create_workflow_cycle( app_repeat_on_workflow) self.check_ggrc_6491(workflow_cycles, [expected_workflow_cycle]) test_utils.list_obj_assert(workflow_cycles, [expected_workflow_cycle])
def test_data(self): """Creates an activated workflow with close due date.""" if not TestActivateWorkflow._data: app_workflow = workflow_rest_facade.create_workflow() task_group = workflow_rest_facade.create_task_group( workflow=app_workflow) assignee = person_rest_facade.create_person_with_role(roles.CREATOR) due_date = date_utils.first_working_day_after_today( datetime.date.today()) workflow_rest_facade.create_task_group_task( task_group=task_group, assignees=[assignee], due_date=due_date) workflow_rest_service.WorkflowRestService().activate(app_workflow) emails = daily_emails_ui_facade.get_emails_by_user_names( [users.current_user().name, assignee.name]) TestActivateWorkflow._data = { "wf": app_workflow, "wf_creator_email": emails[users.current_user().name], "assignee_email": emails[assignee.name]} return TestActivateWorkflow._data
def test_data(self): """Creates an activated workflow with close due date.""" if not TestActivateWorkflow._data: app_workflow = workflow_rest_facade.create_workflow() task_group = workflow_rest_facade.create_task_group( workflow=app_workflow) assignee = person_rest_facade.create_person_with_role( roles.CREATOR) due_date = date_utils.first_working_day_after_today( datetime.date.today()) workflow_rest_facade.create_task_group_task(task_group=task_group, assignees=[assignee], due_date=due_date) workflow_rest_service.WorkflowRestService().activate(app_workflow) emails = daily_emails_ui_facade.get_emails_by_user_names( [users.current_user().name, assignee.name]) TestActivateWorkflow._data = { "wf": app_workflow, "wf_creator_email": emails[users.current_user().name], "assignee_email": emails[assignee.name] } return TestActivateWorkflow._data
def app_task_group_task(app_task_group): """Creates a Task Group Task within `app_task_group`.""" return workflow_rest_facade.create_task_group_task( task_group=app_task_group)
def app_task_group_task(app_task_group): """Creates a Task Group Task within `app_task_group`.""" return workflow_rest_facade.create_task_group_task(task_group=app_task_group)