Ejemplo n.º 1
0
 def test_create_repeate_on_workflow(self, login_as_creator_or_reader,
                                     selenium):
     """Test creation repeat on workflow."""
     workflow = workflow_entity_factory.WorkflowFactory().create(
         repeat_every=1, repeat_unit=workflow_repeat_units.WEEKDAY)
     workflow_entity_factory.TaskGroupFactory().create(workflow=workflow)
     workflow_ui_facade.create_workflow(workflow)
     actual_workflow = ui_facade.get_obj(workflow)
     object_rest_facade.set_attrs_via_get(workflow, ["created_at"])
     object_rest_facade.set_attrs_via_get(workflow, ["updated_at"])
     test_utils.obj_assert(actual_workflow, workflow)
Ejemplo n.º 2
0
def task_group_ui_to_app(ui_dict):
    """Converts TaskGroup ui dict to App entity."""
    return workflow_entity_factory.TaskGroupFactory().create_empty(
        title=ui_dict["title"],
        assignee=email_to_app_person(ui_dict["assignee"]))
Ejemplo n.º 3
0
def create_task_group(**attrs):
  """Creates TaskGroup via REST."""
  task_group = workflow_entity_factory.TaskGroupFactory().create(**attrs)
  return workflow_rest_service.TaskGroupRestService().create(task_group)
Ejemplo n.º 4
0
 def workflow(self):
     """Create workflow via UI."""
     workflow = workflow_entity_factory.WorkflowFactory().create()
     workflow_entity_factory.TaskGroupFactory().create(workflow=workflow)
     workflow_ui_facade.create_workflow(workflow)
     return workflow
Ejemplo n.º 5
0
 def test_add_task_group(self, app_workflow, selenium):
     """Test creation of task group."""
     task_group = workflow_entity_factory.TaskGroupFactory().create()
     workflow_ui_facade.add_task_group(app_workflow, task_group)
     assert workflow_ui_facade.task_group_objs(app_workflow)
     assert ui_facade.active_tab_name() == "Setup (1)"