def test_active_cycles_task_tree(self, activate_workflow, app_workflow): """Test active cycles tree.""" workflow_cycles = workflow_ui_facade.get_workflow_cycles( app_workflow) expected_workflow_cycle = cycle_entity_creation.create_workflow_cycle( app_workflow) test_utils.list_obj_assert(workflow_cycles, [expected_workflow_cycle])
def test_active_cycles_task_tree(self, activate_workflow, app_workflow): """Test active cycles tree.""" workflow_cycles = workflow_ui_facade.get_workflow_cycles( app_workflow) expected_workflow_cycle = cycle_entity_population.create_workflow_cycle( app_workflow) test_utils.list_obj_assert(workflow_cycles, [expected_workflow_cycle])
def test_move_cycle_task_to_another_state(self, login_as_creator_or_reader, activated_workflow, selenium): """Test starting a cycle task.""" # pylint: disable=invalid-name workflow_cycle = cycle_entity_population.create_workflow_cycle( activated_workflow) cycle_task = workflow_cycle.cycle_task_groups[0].cycle_tasks[0] workflow_ui_facade.start_cycle_task(cycle_task) selenium.refresh() # reload page to check state is changed actual_workflow_cycles = workflow_ui_facade.get_workflow_cycles( activated_workflow) test_utils.list_obj_assert(actual_workflow_cycles, [workflow_cycle])
def test_move_cycle_task_to_another_state( self, login_as_creator_or_reader, activated_workflow, selenium ): """Test starting a cycle task.""" # pylint: disable=invalid-name workflow_cycle = cycle_entity_population.create_workflow_cycle( activated_workflow) cycle_task = workflow_cycle.cycle_task_groups[0].cycle_tasks[0] workflow_ui_facade.start_cycle_task(cycle_task) selenium.refresh() # reload page to check state is changed actual_workflow_cycles = workflow_ui_facade.get_workflow_cycles( activated_workflow) test_utils.list_obj_assert(actual_workflow_cycles, [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) 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])