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 test_read_workflow_as_member(self, creator_or_reader, selenium): """Test opening workflow as workflow member.""" workflow = workflow_rest_facade.create_workflow( wf_members=[creator_or_reader]) object_rest_facade.set_attrs_via_get(workflow.modified_by, ["email"]) users.set_current_person(creator_or_reader) actual_workflow = ui_facade.get_obj(workflow) test_utils.obj_assert(actual_workflow, workflow)
def test_read_workflow_as_member(self, creator_or_reader, selenium): """Test opening workflow as workflow member.""" workflow = workflow_rest_facade.create_workflow( wf_members=[creator_or_reader]) object_rest_facade.set_attrs_via_get(workflow.modified_by, ["email"]) users.set_current_person(creator_or_reader) actual_workflow = ui_facade.get_obj(workflow) test_utils.obj_assert(actual_workflow, workflow)
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_repeat_on_workflow(): """Creates a repeat on workflow.""" return workflow_rest_facade.create_workflow( repeat_every=1, repeat_unit=workflow_repeat_units.WEEKDAY)
def app_workflow(): """Creates a Workflow.""" return workflow_rest_facade.create_workflow()
def app_repeat_on_workflow(): """Creates a repeat on workflow.""" return workflow_rest_facade.create_workflow( repeat_every=1, repeat_unit=workflow_repeat_units.WEEKDAY)
def app_workflow(): """Creates a Workflow.""" return workflow_rest_facade.create_workflow()