diff --git a/Gemfile b/Gemfile index 696fb7a49..cf5c0a5f5 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,4 @@ +gem "sidekiq" gem 'erubis', '~> 2.7' gem "holidays", "~>1.0.3" gem "icalendar" diff --git a/app/controllers/rb_all_projects_controller.rb b/app/controllers/rb_all_projects_controller.rb index 217707fe1..58a88d14b 100644 --- a/app/controllers/rb_all_projects_controller.rb +++ b/app/controllers/rb_all_projects_controller.rb @@ -1,7 +1,7 @@ class RbAllProjectsController < ApplicationController unloadable - before_filter :authorize_global + before_action :authorize_global def statistics backlogs_projects = RbCommonHelper.find_backlogs_enabled_active_projects diff --git a/app/controllers/rb_calendars_controller.rb b/app/controllers/rb_calendars_controller.rb index 1db161dca..657150c63 100644 --- a/app/controllers/rb_calendars_controller.rb +++ b/app/controllers/rb_calendars_controller.rb @@ -5,7 +5,7 @@ class RbCalendarsController < RbApplicationController case Backlogs.platform when :redmine - before_filter :require_admin_or_api_request, :only => :ical + before_action :require_admin_or_api_request, :only => :ical accept_api_auth :ical when :chiliproject accept_key_auth :ical diff --git a/app/controllers/rb_impediments_controller.rb b/app/controllers/rb_impediments_controller.rb index 78c5f9f58..d0656bf69 100644 --- a/app/controllers/rb_impediments_controller.rb +++ b/app/controllers/rb_impediments_controller.rb @@ -4,7 +4,7 @@ class RbImpedimentsController < RbApplicationController unloadable def create - @settings = Backlogs.settings + @settings = Backlogs.setting begin @impediment = RbTask.create_with_relationships(params, User.current.id, @project.id, true) rescue => e @@ -23,7 +23,7 @@ def create def update @impediment = RbTask.find_by_id(params[:id]) - @settings = Backlogs.settings + @settings = Backlogs.setting begin result = @impediment.update_with_relationships(params) rescue => e diff --git a/app/controllers/rb_releases_controller.rb b/app/controllers/rb_releases_controller.rb index e37711557..650b7d0c8 100644 --- a/app/controllers/rb_releases_controller.rb +++ b/app/controllers/rb_releases_controller.rb @@ -49,7 +49,7 @@ def edit def update except = ['id', 'project_id'] attribs = params.select{|k,v| (!except.include? k) and (RbRelease.column_names.include? k) } - attribs = Hash[*attribs.flatten] + attribs = attribs.to_enum.to_h begin result = @release.update_attributes attribs rescue => e diff --git a/app/controllers/rb_sprints_controller.rb b/app/controllers/rb_sprints_controller.rb index 3fc5387d4..7d40d7c8c 100644 --- a/app/controllers/rb_sprints_controller.rb +++ b/app/controllers/rb_sprints_controller.rb @@ -12,7 +12,7 @@ class RbSprintsController < RbApplicationController def create attribs = params.select{|k,v| k != 'id' and RbSprint.column_names.include? k } - attribs = Hash[*attribs.flatten] + attribs = attribs.to_enum.to_h @sprint = RbSprint.new(attribs) #share the sprint according to the global setting @@ -43,7 +43,7 @@ def create def update except = ['id', 'project_id'] attribs = params.select{|k,v| (!except.include? k) and (RbSprint.column_names.include? k) } - attribs = Hash[*attribs.flatten] + attribs = attribs.to_enum.to_h begin result = @sprint.update_attributes attribs rescue => e diff --git a/app/controllers/rb_taskboards_controller.rb b/app/controllers/rb_taskboards_controller.rb index eef641a15..3faed279c 100644 --- a/app/controllers/rb_taskboards_controller.rb +++ b/app/controllers/rb_taskboards_controller.rb @@ -7,7 +7,7 @@ def show stories = @sprint.stories @story_ids = stories.map{|s| s.id} - @settings = Backlogs.settings + @settings = Backlogs.setting ## determine status columns to show tracker = Tracker.find_by_id(RbTask.tracker) diff --git a/app/controllers/rb_tasks_controller.rb b/app/controllers/rb_tasks_controller.rb index 7a6e47f13..e756ec428 100644 --- a/app/controllers/rb_tasks_controller.rb +++ b/app/controllers/rb_tasks_controller.rb @@ -4,11 +4,13 @@ class RbTasksController < RbApplicationController unloadable def create - @settings = Backlogs.settings + params.permit! + @settings = Backlogs.setting @task = nil begin @task = RbTask.create_with_relationships(params, User.current.id, @project.id) rescue => e + Rails.logger.debug(e.to_yaml) render :text => e.message.blank? ? e.to_s : e.message, :status => 400 return end @@ -23,8 +25,9 @@ def create end def update + params.permit! @task = RbTask.find_by_id(params[:id]) - @settings = Backlogs.settings + @settings = Backlogs.setting result = @task.update_with_relationships(params) status = (result ? 200 : 400) @include_meta = true diff --git a/app/models/rb_story.rb b/app/models/rb_story.rb index ae26332df..412c03861 100644 --- a/app/models/rb_story.rb +++ b/app/models/rb_story.rb @@ -175,7 +175,7 @@ def self.create_and_position(params) attribs = params.select{|k,v| !['prev', 'next', 'id', 'lft', 'rgt'].include?(k) && RbStory.column_names.include?(k) } attribs[:status] = RbStory.class_default_status - attribs = attribs.to_enum.to_h#Hash[*attribs.flatten] + attribs = attribs.to_enum.to_h s = RbStory.new(attribs) s.save s.position!(params) diff --git a/app/models/rb_task.rb b/app/models/rb_task.rb index f3c64e0fb..cab10c1b3 100644 --- a/app/models/rb_task.rb +++ b/app/models/rb_task.rb @@ -59,7 +59,7 @@ def self.rb_safe_attributes(params) attribs = params.select {|k,v| safe_attributes_names.include?(k) } # lft and rgt fields are handled by acts_as_nested_set attribs = attribs.select{|k,v| k != 'lft' and k != 'rgt' } - attribs = Hash[*attribs.flatten] if attribs.is_a?(Array) + attribs = attribs.to_enum.to_h if attribs.is_a?(Array) return attribs end diff --git a/assets/stylesheets/global.css b/assets/stylesheets/global.css index 72ceacc3f..08a06a079 100644 --- a/assets/stylesheets/global.css +++ b/assets/stylesheets/global.css @@ -30,7 +30,7 @@ a:hover{ position:relative; width:100%; box-shadow: 0 3px 4px #A0A0A0; - z-index:1000; + z-index:98; border-radius: 10px; } #toolbar .breadcrumbs{ diff --git a/assets/stylesheets/taskboard.css b/assets/stylesheets/taskboard.css index cc406b67f..17e7e6772 100644 --- a/assets/stylesheets/taskboard.css +++ b/assets/stylesheets/taskboard.css @@ -44,7 +44,7 @@ See RB.Taskboard.initialize() margin-bottom:0; margin-right:10px; position: absolute; - z-index: 200; + z-index: 100; } #board_header td{ background-color:#EEEEEE; diff --git a/features/.autotest b/features/.autotest deleted file mode 100644 index 9ce98c41d..000000000 --- a/features/.autotest +++ /dev/null @@ -1,19 +0,0 @@ -if RUBY_PLATFORM.downcase.include?("darwin") - require "autotest/growl" - require 'autotest/fsevent' -end -require 'redgreen/autotest' - -Autotest.add_hook :initialize do |at| - %w{.git .DS_Store test assets}.each { |exception| at.add_exception(exception) } - at.remove_exception 'vendor/plugins' - at.find_directories << 'vendor/plugins/redmine_backlogs' - at.libs << 'vendor/plugins/redmine_backlogs/features' - at.libs << 'vendor/plugins/redmine_backlogs/lib' - false -end - -Autotest.add_hook :all_good do |at| - system "rake redmine:backlogs:rcov" - false -end \ No newline at end of file diff --git a/features/burndown.feature b/features/burndown.feature deleted file mode 100644 index ff38b0189..000000000 --- a/features/burndown.feature +++ /dev/null @@ -1,208 +0,0 @@ -Feature: Burndown - As a scrum master - I want to manage sprints and their stories - So that they get done according the product owner's requirements - - Background: - Given the ecookbook project has the backlogs plugin enabled - And I am a scrum master of the project - And I have deleted all existing issues - And I have the following issue statuses available: - | name | is_closed | is_default | default_done_ratio | - | New | 0 | 1 | | - | Assigned | 0 | 0 | | - | In Progress | 0 | 0 | | - | Resolved | 0 | 0 | | - | Feedback | 0 | 0 | | - | Closed | 1 | 0 | | - | Accepted | 1 | 0 | | - | Rejected | 1 | 0 | 1 | - And the current time is 2011-01-01 08:00:00 - - And I have defined the following stories in the product backlog: - | subject | - | Story 1 | - | Story 2 | - | Story 3 | - | Story 4 | - - And I have defined the following sprints: - | name | sprint_start_date | effective_date | - | Sprint siegerv | 2011-08-19 | 2011-09-02 | - And I have defined the following stories in the following sprints: - | subject | sprint | points | - | Siegerv story 1 | Sprint siegerv | 1 | - And I have defined the following tasks: - | subject | story | estimate | status | - | S.1 | Siegerv story 1 | 10 | New | - - And I have defined the following sprints: - | name | sprint_start_date | effective_date | - | Sprint 001 | 2012-02-02 | 2012-02-09 | - And I have defined the following stories in the following sprints: - | subject | sprint | points | - | Story A | Sprint 001 | 1 | - | Story B | Sprint 001 | 2 | - | Story C | Sprint 001 | 4 | - And I have defined the following tasks: - | subject | story | estimate | status | - | A.1 | Story A | 10 | New | - | B.1 | Story B | 20 | New | - | C.1 | Story C | 40 | New | - - Scenario: Tasks closed AFTER remaining hours is set to 0 - Given I am viewing the taskboard for Sprint 001 - And I have made the following task mutations: - | day | task | remaining | status | - | 1 | A.1 | 5 | In Progress | - | 1 | B.1 | 10 | In Progress | - | 2 | A.1 | 0 | | - | 2 | A.1 | | Closed | - | 2 | C.1 | 30 | In Progress | - | 3 | B.1 | 0 | | - | 3 | B.1 | | Closed | - | 3 | C.1 | 25 | | - | 4 | C.1 | 10 | | - | 5 | C.1 | 0 | | - | 5 | C.1 | | Closed | - Then the sprint burndown should be: - | day | points_committed | points_to_resolve | hours_remaining | - | start | 7 | 7 | 70 | - | 1 | 7 | 7 | 55 | - | 2 | 7 | 6 | 40 | - | 3 | 7 | 4 | 25 | - | 4 | 7 | 4 | 10 | - | 5 | 7 | 0 | 0 | - And the sprint burnup should be: - | day | points_committed | points_resolved | hours_remaining | - | start | 7 | 0 | 70 | - | 1 | 7 | 0 | 55 | - | 2 | 7 | 1 | 40 | - | 3 | 7 | 3 | 25 | - | 4 | 7 | 3 | 10 | - | 5 | 7 | 7 | 0 | - - Scenario: Tasks closed BEFORE remaining hours is set to 0 - Given I am viewing the taskboard for Sprint 001 - And I have made the following task mutations: - | day | task | remaining | status | - | 1 | A.1 | 5 | In Progress | - | 1 | B.1 | 10 | In Progress | - | 2 | A.1 | | Closed | - | 2 | A.1 | 0 | | - | 2 | C.1 | 30 | In Progress | - | 3 | B.1 | | Closed | - | 3 | B.1 | 0 | | - | 3 | C.1 | 25 | | - | 4 | C.1 | 10 | | - | 5 | C.1 | | Closed | - | 5 | C.1 | 0 | | - - Then the sprint burndown should be: - | day | points_committed | points_to_resolve | hours_remaining | - | start | 7 | 7 | 70 | - | 1 | 7 | 7 | 55 | - | 2 | 7 | 6 | 40 | - | 3 | 7 | 4 | 25 | - | 4 | 7 | 4 | 10 | - | 5 | 7 | 0 | 0 | - - Scenario: New task and story added during sprint - Given I am viewing the taskboard for Sprint 001 - And I have made the following task mutations: - | day | task | remaining | status | - | 1 | A.1 | 5 | In Progress | - | 1 | B.1 | 10 | In Progress | - | 2 | A.1 | 0 | | - | 2 | A.1 | | Closed | - | 2 | C.1 | 30 | In Progress | - - And I have defined the following stories in the following sprints: - | subject | sprint | points | day | - | Story D | Sprint 001 | 4 | 3 | - - And I have defined the following tasks: - | subject | story | estimate | status | when | - | D.1 | Story D | 40 | New | 3 | - - And I have made the following task mutations: - | day | task | remaining | status | - | 3 | B.1 | 0 | | - | 3 | B.1 | | Closed | - | 3 | C.1 | 25 | | - | 4 | C.1 | 10 | | - | 4 | D.1 | 20 | In Progress | - | 5 | C.1 | 0 | | - | 5 | C.1 | | Closed | - | 5 | D.1 | 0 | | - | 5 | D.1 | | Closed | - - Then the sprint burndown should be: - | day | points_committed | points_to_resolve | hours_remaining | - | start | 7 | 7 | 70 | - | 1 | 7 | 7 | 55 | - | 2 | 7 | 6 | 40 | - | 3 | 11 | 8 | 65 | - | 4 | 11 | 8 | 30 | - | 5 | 11 | 0 | 0 | - - Scenario: Change sprint start date - Given I am viewing the taskboard for Sprint 001 - And I have changed the sprint start date to 2012-02-03 - And I have defined the following stories in the following sprints: - | subject | sprint | points | day | - | Story E | Sprint 001 | 1 | 2012-02-02 01:00:00 | - And I have changed the sprint start date to 2012-02-02 - Then the sprint burnup should be: - | day | points_resolved | - | start | 1 | - | 1 | 1 | - - Scenario: Closed sprint burndown - Given I am viewing the taskboard for Sprint 001 - And I have made the following task mutations: - | day | task | remaining | status | - | 3 | S.1 | 0 | | - - Scenario: Saturday and Sunday are included in burndown chart - Given I have configured backlogs plugin to include Saturday and Sunday in burndown - And I am viewing the taskboard for Sprint 001 - And I have made the following task mutations: - | day | task | remaining | status | - | 1 | A.1 | 5 | In Progress | - | 1 | B.1 | 10 | In Progress | - | 2 | A.1 | 0 | | - | 2 | A.1 | | Closed | - | 2 | C.1 | 30 | In Progress | - | 3 | B.1 | 0 | | - | 3 | B.1 | | Closed | - | 3 | C.1 | 25 | | - | 4 | C.1 | 10 | | - | 5 | C.1 | 5 | | - | 6 | C.1 | 1 | | - | 7 | C.1 | 0 | | - | 7 | C.1 | | Closed | - Then the sprint burndown should be: - | day | points_committed | points_to_resolve | hours_remaining | - | start | 7 | 7 | 70 | - | 1 | 7 | 7 | 55 | - | 2 | 7 | 6 | 40 | - | 3 | 7 | 4 | 25 | - | 4 | 7 | 4 | 10 | - | 5 | 7 | 4 | 5 | - | 6 | 7 | 4 | 1 | - | 7 | 7 | 0 | 0 | - And the sprint burnup should be: - | day | points_committed | points_resolved | hours_remaining | - | start | 7 | 0 | 70 | - | 1 | 7 | 0 | 55 | - | 2 | 7 | 1 | 40 | - | 3 | 7 | 3 | 25 | - | 4 | 7 | 3 | 10 | - | 5 | 7 | 3 | 5 | - | 6 | 7 | 3 | 1 | - | 7 | 7 | 7 | 0 | - - Scenario: View remaining hours in story view - Given I am viewing the issue named "Story A" - Then the issue should display 10 remaining hours diff --git a/features/cecilia_burndown.feature b/features/cecilia_burndown.feature deleted file mode 100644 index 937e1098d..000000000 --- a/features/cecilia_burndown.feature +++ /dev/null @@ -1,46 +0,0 @@ -Feature: Cecilia Burndown - As a scrum master - I want to manage sprints and their stories - So that they get done according the product owner's requirements - - Background: - Given the ecookbook project has the backlogs plugin enabled - And I am a scrum master of the project - And I have deleted all existing issues - And I have the following issue statuses available: - | name | is_closed | is_default | - | New | 0 | 1 | - | Accepted | 0 | 0 | - | Review | 0 | 0 | - | Test | 0 | 0 | - | Closed | 1 | 0 | - | Deferred | 0 | 0 | - | Need more information | 0 | 0 | - | Invalid | 1 | 0 | - | Rejected | 1 | 0 | - | Approved | 1 | 0 | - | Implemented | 1 | 0 | - And the current time is 2012-11-20 08:00:00 - - And I have defined the following stories in the product backlog: - | subject | - | Story B.1 | - | Story B.2 | - | Story B.3 | - | Story B.4 | - - And I have defined the following sprints: - | name | sprint_start_date | effective_date | - | Sprint 1 | 2012-11-21 | 2012-11-28 | - And I have defined the following stories in the following sprint: - | subject | sprint | points | - | Story 1.1 | Sprint 1 | 8 | - And I have defined the following tasks: - | subject | story | estimate | status | - | Task 1.1.1 | Story 1.1 | 40 | New | - - Scenario: See burndown chart for Sprint 1 in a correct way directly - Given I am viewing the burndown for Sprint 1 - Then the sprint burndown should be: - | day | points_committed | points_to_resolve | hours_remaining | - | start | 8 | 8 | 40 | diff --git a/features/common.feature b/features/common.feature deleted file mode 100644 index 4591cac0b..000000000 --- a/features/common.feature +++ /dev/null @@ -1,26 +0,0 @@ -Feature: Common - As a user - I want to do stuff - So that I can do my job - - Background: - Given the ecookbook project has the backlogs plugin enabled - And no versions or issues exist - And I am a team member of the project - And sharing is not enabled - - Scenario: View the product backlog - Given I am viewing the master backlog - When I request the server_variables resource - Then the request should complete successfully - - Scenario: View the product backlog - Given I am viewing the master backlog - And sharing is enabled - When I request the server_variables resource - Then the request should complete successfully - - Scenario: View the product backlog without any stories - Given there are no stories in the project - When I view the master backlog - Then the request should complete successfully diff --git a/features/duplicate_story.feature b/features/duplicate_story.feature deleted file mode 100644 index 7c4bdd672..000000000 --- a/features/duplicate_story.feature +++ /dev/null @@ -1,43 +0,0 @@ -Feature: Duplicate story - As a member - I want be able to duplicate a story - So that I can split a story or continue work in another sprint - - Background: - Given the ecookbook project has the backlogs plugin enabled - And I am a scrum master of the project - And I have deleted all existing issues - And I have defined the following sprints: - | name | sprint_start_date | effective_date | - | Sprint 001 | 2010-01-01 | 2010-01-31 | - | Sprint 002 | 2010-02-01 | 2010-02-28 | - | Sprint 003 | 2010-03-01 | 2010-03-31 | - | Sprint 004 | 2010-04-01 | 2010-04-30 | - And I have defined the following stories in the following sprints: - | subject | sprint | - | Story 1 | Sprint 001 | - And I have defined the following tasks: - | subject | story | - | Task 1 | Story 1 | - | Task 2 | Story 1 | - - Scenario: Duplicate story without tasks - Given I am duplicating Story 1 to Story 1A for Sprint 002 - And I choose to copy none tasks - When I click copy - Then the request should complete successfully - And sprint Sprint 002 should contain Story 1A - - #using javascript to disable redmine2.1 copy_subtasks button - @javascript - Scenario: Duplicate story with tasks - Given I am duplicating Story 1 to Story 1B for Sprint 003 - And I choose to copy open tasks - When I click copy - Then the request should complete successfully - And sprint Sprint 003 should contain Story 1B - And the story named Story 1B should have a task named Task 1 - And the story named Story 1B should have a task named Task 2 - -# Scenario: Duplicate story with some tasks closed - diff --git a/features/extended_timelog.feature b/features/extended_timelog.feature deleted file mode 100644 index 953f9a051..000000000 --- a/features/extended_timelog.feature +++ /dev/null @@ -1,34 +0,0 @@ -Feature: Extended timelog - As a member - I want to update spent time and remaining hours easily - So that I can update everyone on the status of the project - - Background: - Given the ecookbook project has the backlogs plugin enabled - And timelog from taskboard has been enabled - And I am a team member of the project and allowed to update remaining hours - And I have deleted all existing issues - And I have defined the following sprints: - | name | sprint_start_date | effective_date | - | Sprint 001 | 2010-01-01 | 2010-01-31 | - And I have defined the following stories in the following sprints: - | subject | sprint | - | Story 1 | Sprint 001 | - And I have defined the following tasks: - | subject | story | - | Task 1 | Story 1 | - - Scenario: Log time and set remaining hours from "Log time"-view - Given I am logging time for task Task 1 - And I set the hours spent to 2 - And I set the remaining_hours to 5 - When I click save - Then the request should complete successfully - And task Task 1 should have remaining_hours set to 5 - And task Task 1 should have a total time spent of 2 hours - - Scenario: Log time from "Log Time"-view without selecting task - Given I am viewing log time for the ecookbook project - And I set the hours spent to 2 - When I click save - Then the request should complete successfully diff --git a/features/list_with_gaps.feature b/features/list_with_gaps.feature deleted file mode 100644 index 0879321ec..000000000 --- a/features/list_with_gaps.feature +++ /dev/null @@ -1,110 +0,0 @@ -Feature: Scrum Master - As a scrum master - I want to manage sprints and their stories - So that they get done according the product owner's requirements - - Background: - Given the ecookbook project has the backlogs plugin enabled - And the subproject1 project has the backlogs plugin enabled - - And I am a scrum master of the project - And I have deleted all existing issues - And I have defined the following sprints: - | name | sprint_start_date | effective_date | project_id | - | Sprint 001 | 2010-01-01 | 2010-01-31 | ecookbook | - | Sprint 002 | 2010-02-01 | 2010-02-28 | ecookbook | - | Sprint 003 | 2010-03-01 | 2010-03-31 | ecookbook | - | Sprint 004 | 2 weeks ago | next week | ecookbook | - | Sprint S05 | 2010-01-01 | 2010-01-31 | subproject1 | - - Scenario: Interlieve story creation in backlog between projects - Given I have defined the following stories in the product backlog: - | subject | project_id | - | Story 1 | ecookbook | - | Story 2 | ecookbook | - | Story 6 | subproject1 | - | Story 7 | subproject1 | - | Story 3 | ecookbook | - | Story 4 | ecookbook | - | Story 8 | subproject1 | - | Story 9 | subproject1 | - #Then show me the higher_item attributes - Then Story 1 should be the higher item of Story 2 - Then Story 2 should be the higher item of Story 3 - Then Story 3 should be the higher item of Story 4 - Then Story 6 should be the higher item of Story 7 - Then Story 7 should be the higher item of Story 8 - Then Story 8 should be the higher item of Story 9 - - Scenario: Interlieve story creation in sprints between projects - Given I have defined the following stories in the following sprints: - | subject | sprint | - | Story C | Sprint 003 | - | Story D | Sprint S05 | - | Story E | Sprint 003 | - | Story F | Sprint S05 | - Given I am viewing the master backlog - Then Story C should be the higher item of Story E - Then Story D should be the higher item of Story F - - Scenario: Interlieve story creation between sprints - Given I have defined the following stories in the product backlog: - | subject | project_id | - | Story 1 | ecookbook | - | Story 2 | ecookbook | - | Story 3 | ecookbook | - | Story 4 | ecookbook | - Given I have defined the following stories in the following sprints: - | subject | sprint | - | Story C | Sprint 003 | - | Story D | Sprint 004 | - | Story E | Sprint 003 | - | Story F | Sprint 004 | - Given I am viewing the master backlog - Then Story C should be the higher item of Story E - Then Story D should be the higher item of Story F - - When I move the story named Story 2 to the 1st position of the sprint named Sprint 002 - When I move the story named Story 4 to the 1st position of the sprint named Sprint 002 - And Story 4 should be the higher item of Story 2 - And Story 1 should be the higher item of Story 3 - - Scenario: Move a story so that scoped next item in position is from another scope - Given I have defined the following stories in the product backlog: - | subject | project_id | - | Story 1 | ecookbook | - Given I have defined the following stories in the following sprints: - | subject | sprint | - | Story C | Sprint 003 | - | Story D | Sprint 004 | - When I move the story named Story 1 to the 2nd position of the sprint named Sprint 003 - Then Story C should be the higher item of Story 1 - - Scenario: Lowlevel higher_item and lower_item api test; should be an rspec test - Given I have deleted all existing issues from all projects - And I have defined the following stories in the product backlog: - | subject | project_id | - | Story 1 | ecookbook | - | Story 2 | ecookbook | - | Story 6 | subproject1 | - | Story 7 | subproject1 | - | Story 3 | ecookbook | - | Story 4 | ecookbook | - | Story 8 | subproject1 | - | Story 9 | subproject1 | - #move after - When I call move_after("Story 7") on "Story 1" - Then "Story 1".higher_item_unscoped should be "Story 7" - Then "Story 1".lower_item_unscoped should be "Story 3" - #move after to the end - When I call move_after("Story 9") on "Story 1" - Then "Story 1".higher_item_unscoped should be "Story 9" - Then "Story 1".lower_item_unscoped should be "nil" - #move before - When I call move_before("Story 7") on "Story 1" - Then "Story 1".higher_item_unscoped should be "Story 6" - Then "Story 1".lower_item_unscoped should be "Story 7" - #move before to the beginning - When I call move_before("Story 2") on "Story 1" - Then "Story 1".lower_item_unscoped should be "Story 2" - Then "Story 1".higher_item_unscoped should be "nil" diff --git a/features/product_owner.feature b/features/product_owner.feature deleted file mode 100644 index eb01e80ac..000000000 --- a/features/product_owner.feature +++ /dev/null @@ -1,153 +0,0 @@ -Feature: Product Owner - As a product owner - I want to manage story details and story priority - So that they get done according to my requirements - - Background: - Given the ecookbook project has the backlogs plugin enabled - And no versions or issues exist - And I am a product owner of the project - And I add the tracker Bug to the story trackers - And I have defined the following sprints: - | name | sprint_start_date | effective_date | - | Sprint 001 | 2010-01-01 | 2010-01-31 | - | Sprint 002 | 2010-02-01 | 2010-02-28 | - | Sprint 003 | 2010-03-01 | 2010-03-31 | - | Sprint 004 | 2010-03-01 | 2010-03-31 | - And I have deleted all existing issues - And I have defined the following stories in the product backlog: - | subject | tracker | - | Story 1 | Story | - | Story 2 | Story | - | Story 3 | Story | - | Story 4 | Story | - | Bug 1 | Bug | - And I have defined the following stories in the following sprints: - | subject | sprint | - | Story A | Sprint 001 | - | Story B | Sprint 001 | - - Scenario: View the product backlog - Given I am viewing the master backlog - Then I should see the product backlog - And I should see 5 stories in the product backlog - And I should see 4 sprint backlogs - - Scenario: View scrum statistics - When I visit the scrum statistics page - Then the request should complete successfully - - Scenario: Create a new story - Given I am viewing the master backlog - And I want to create a story - And I set the subject of the story to A Whole New Story - When I create the story - Then the request should complete successfully - And the 1st story in the product backlog should be A Whole New Story - - @javascript - Scenario: Create a new story with tracker Story to check default story tracker functionality - Given I add the tracker Bug to the story trackers - And I set the default story tracker to Story - And I am viewing the master backlog - When I create the story with subject "A default Story" - Then the request should complete successfully - And the 1th story in the product backlog should be A default Story - And the 1th story in the product backlog should have the tracker Story - - @javascript - Scenario: Create a new story with tracker Bug to check default story tracker functionality - Given I add the tracker Bug to the story trackers - And I set the default story tracker to Bug - And I am viewing the master backlog - When I create the story with subject "A default Bug" - Then the request should complete successfully - And the 1st story in the product backlog should be A default Bug - And the 1st story in the product backlog should have the tracker Bug - - @javascript - Scenario: Edit an existing default story with full javascript stack to check default tracker does not override when editing. - Given I add the tracker Bug to the story trackers - And I set the default story tracker to Bug - And I am viewing the master backlog - And I want to edit the story with subject Story 1 - When I change the subject of story "Story 1" to "A modified default Story" - Then the request should complete successfully - And the story should have a subject of A modified default Story - And the story should have a tracker of Story - - Scenario: Update a story - Given I am viewing the master backlog - And I want to edit the story with subject Story 3 - And I set the subject of the story to Relaxdiego was here - And I set the tracker of the story to Story - When I update the story - Then the request should complete successfully - And the story should have a subject of Relaxdiego was here - And the story should have a tracker of Story - And the story should be at position 3 - - Scenario: Close a story - Given I am viewing the master backlog - And I want to edit the story with subject Story 4 - And I set the status of the story to Closed - When I update the story - Then the request should complete successfully - And the status of the story should be set as closed - - Scenario: Move a story to the top - Given I am viewing the master backlog - When I move the 3rd story to the 1st position - Then the 1st story in the product backlog should be Story 3 - - Scenario: Move a story to the bottom - Given I am viewing the master backlog - When I move the 2nd story to the last position - Then the 5th story in the product backlog should be Story 2 - - Scenario: Move a story down - Given I am viewing the master backlog - When I move the 2nd story to the 3rd position - Then the 2nd story in the product backlog should be Story 3 - And the 3rd story in the product backlog should be Story 2 - And the 4th story in the product backlog should be Story 4 - - Scenario: Move a story up - Given I am viewing the master backlog - When I move the 4th story to the 2nd position - Then the 2nd story in the product backlog should be Story 4 - And the 3rd story in the product backlog should be Story 2 - And the 4th story in the product backlog should be Story 3 - - Scenario: Move many stories up so the gapspace needs reassignment - Given I am viewing the master backlog - When I move the 4th story to the 2nd position - Given I am viewing the master backlog - When I move the 4th story to the 2nd position - Given I am viewing the master backlog - When I move the 4th story to the 2nd position - Given I am viewing the master backlog - When I move the 4th story to the 2nd position - Given I am viewing the master backlog - When I move the 4th story to the 2nd position - Given I am viewing the master backlog - When I move the 4th story to the 2nd position - Given I am viewing the master backlog - When I move the 4th story to the 2nd position - Given I am viewing the master backlog - When I move the 4th story to the 2nd position - Given I am viewing the master backlog - When I move the 4th story to the 2nd position - Given I am viewing the master backlog - When I move the 4th story to the 2nd position - Given I am viewing the master backlog - When I move the 4th story to the 2nd position - Given I am viewing the master backlog - When I move the 4th story to the 2nd position - Given I am viewing the master backlog - When I move the 4th story to the 2nd position - Given I am viewing the master backlog - Then the 2nd story in the product backlog should be Story 4 - And the 3rd story in the product backlog should be Story 2 - And the 4th story in the product backlog should be Story 3 - diff --git a/features/release-multiview-burnchart-in-progress.disabled b/features/release-multiview-burnchart-in-progress.disabled deleted file mode 100644 index 63b7e0275..000000000 --- a/features/release-multiview-burnchart-in-progress.disabled +++ /dev/null @@ -1,103 +0,0 @@ -Feature: Release multiview burnchart - As a product owner - I want to see progress of multiple releases - So that I can get an overview of the project - - Background: - Given the ecookbook project has the backlogs plugin enabled - And no versions or issues exist - And no releases or release multiviews exist - And I am a product owner of the project - And the current time is 2011-12-31 08:00:00 - And I have defined the following sprints: - | name | sprint_start_date | effective_date | - | Sprint 001 | 2012-01-01 | 2012-01-31 | - | Sprint 002 | 2012-02-01 | 2012-02-28 | - | Sprint 003 | 2012-03-01 | 2012-03-31 | - | Sprint 004 | 2012-04-01 | 2012-04-30 | - | Sprint 005 | 2012-05-01 | 2012-05-31 | - | Sprint 006 | 2012-06-01 | 2012-06-30 | - | Sprint 007 | 2012-07-01 | 2012-07-30 | - | Sprint 008 | 2012-08-01 | 2012-08-31 | - | Sprint 009 | 2012-09-01 | 2012-09-30 | - | Sprint 010 | 2012-10-01 | 2012-10-31 | - | Sprint 011 | 2012-11-01 | 2012-11-30 | - | Sprint 012 | 2012-12-01 | 2012-12-31 | - And I have defined the following releases: - | name | project | release_start_date | release_end_date | - | Rel 1 | ecookbook | 2012-01-01 | 2012-02-28 | - | Rel 2 | ecookbook | 2012-02-01 | 2012-06-30 | - | Rel 3 | ecookbook | 2012-06-01 | 2012-09-30 | - | Rel 4 | ecookbook | 2012-09-01 | 2012-12-31 | - And I have defined the following release multiviews: - | name | project | releases | - | Multi 1 | ecookbook | Rel 1,Rel 2,Rel 3,Rel 4 | - And I have defined the following stories in the product backlog: - | subject | release | points | - | Story 15 | Rel 3 | 5 | - | Story 16 | Rel 4 | 5 | - | Story 17 | Rel 4 | 5 | - | Story 18 | Rel 4 | 5 | - | Story 19 | Rel 4 | 5 | - | Story 20 | Rel 4 | 5 | - And I have defined the following stories in the following sprints: - | subject | sprint | release | points | - | Story 01 | Sprint 001 | Rel 1 | 5 | - | Story 02 | Sprint 001 | Rel 1 | 5 | - | Story 03 | Sprint 002 | Rel 1 | 5 | - | Story 04 | Sprint 002 | Rel 1 | 5 | - | Story 05 | Sprint 003 | Rel 1 | 5 | - | Story 06 | Sprint 003 | Rel 2 | 5 | - | Story 07 | Sprint 004 | Rel 2 | 5 | - | Story 08 | Sprint 004 | Rel 2 | 5 | - | Story 09 | Sprint 005 | Rel 2 | 5 | - | Story 10 | Sprint 005 | Rel 2 | 5 | - | Story 11 | Sprint 006 | Rel 3 | 5 | - | Story 12 | Sprint 006 | Rel 3 | 5 | - | Story 13 | Sprint 007 | Rel 3 | 5 | - | Story 14 | Sprint 007 | Rel 3 | 5 | - And I have defined the following stories in the product backlog: - | subject | release | points | - | Story 21 | | 5 | - | Story 22 | | 5 | - | Story 23 | | 5 | - | Story 24 | | 5 | - | Story 25 | | 5 | - And the current time is 2012-01-01 08:00:00 - And I have made the following story mutations: - | day | story | status | - | 5 | Story 01 | Closed | - | 10 | Story 02 | Closed | - And the current time is 2012-02-01 08:00:00 - And I have made the following story mutations: - | day | story | status | - | 5 | Story 03 | Closed | - | 10 | Story 04 | Closed | - And the current time is 2012-03-01 08:00:00 - And I have made the following story mutations: - | day | story | status | - | 5 | Story 05 | Closed | - | 10 | Story 06 | Closed | - And the current time is 2012-04-01 08:00:00 - And I have made the following story mutations: - | day | story | status | - | 5 | Story 07 | Closed | - | 10 | Story 08 | Closed | - And the current time is 2012-05-01 08:00:00 - And I have made the following story mutations: - | day | story | status | - | 5 | Story 09 | Closed | - | 10 | Story 10 | Closed | - And the current time is 2012-06-01 08:00:00 - And I have made the following story mutations: - | day | story | status | - | 5 | Story 11 | Closed | - | 10 | Story 12 | Closed | - And the current time is 2012-07-01 08:00:00 - - Scenario: Initial - Given I view the release page -# Then dump the database to pg_new.dump - When I follow "Multi 1" - Then the request should complete successfully - Then show me the page diff --git a/features/release-multiview-burnchart-scope-change.disabled b/features/release-multiview-burnchart-scope-change.disabled deleted file mode 100644 index 125f303fe..000000000 --- a/features/release-multiview-burnchart-scope-change.disabled +++ /dev/null @@ -1,135 +0,0 @@ -Feature: Release multiview burnchart - As a product owner - I want to see progress of multiple releases - So that I can get an overview of the project - - Background: - Given the ecookbook project has the backlogs plugin enabled - And no versions or issues exist - And no releases or release multiviews exist - And I am a product owner of the project - And the current time is 2011-12-31 08:00:00 - And I have defined the following sprints: - | name | sprint_start_date | effective_date | - | Sprint 001 | 2012-01-01 | 2012-01-31 | - | Sprint 002 | 2012-02-01 | 2012-02-28 | - | Sprint 003 | 2012-03-01 | 2012-03-31 | - | Sprint 004 | 2012-04-01 | 2012-04-30 | - | Sprint 005 | 2012-05-01 | 2012-05-31 | - | Sprint 006 | 2012-06-01 | 2012-06-30 | - | Sprint 007 | 2012-07-01 | 2012-07-30 | - | Sprint 008 | 2012-08-01 | 2012-08-31 | - | Sprint 009 | 2012-09-01 | 2012-09-30 | - | Sprint 010 | 2012-10-01 | 2012-10-31 | - | Sprint 011 | 2012-11-01 | 2012-11-30 | - | Sprint 012 | 2012-12-01 | 2012-12-31 | - And I have defined the following releases: - | name | project | release_start_date | release_end_date | - | Rel 1 | ecookbook | 2012-01-01 | 2012-02-28 | - | Rel 2 | ecookbook | 2012-02-01 | 2012-06-30 | - | Rel 3 | ecookbook | 2012-06-01 | 2012-09-30 | - | Rel 4 | ecookbook | 2012-09-01 | 2012-12-31 | - And I have defined the following release multiviews: - | name | project | releases | - | Multi 1 | ecookbook | Rel 1,Rel 2,Rel 3,Rel 4 | - # And I have defined the following stories in the product backlog: - # | subject | release | points | - # | Story 01 | Rel 1 | 5 | - # | Story 02 | Rel 1 | 5 | - # | Story 03 | Rel 1 | 5 | - # | Story 04 | Rel 1 | 5 | - # | Story 05 | Rel 1 | 5 | - # | Story 06 | Rel 2 | 5 | - # | Story 07 | Rel 2 | 5 | - # | Story 08 | Rel 2 | 5 | - # | Story 09 | Rel 2 | 5 | - # | Story 10 | Rel 2 | 5 | - # | Story 11 | Rel 3 | 5 | - # | Story 12 | Rel 3 | 5 | - # | Story 13 | Rel 3 | 5 | - # | Story 14 | Rel 3 | 5 | - # | Story 15 | Rel 3 | 5 | - # | Story 16 | Rel 4 | 5 | - # | Story 17 | Rel 4 | 5 | - # | Story 18 | Rel 4 | 5 | - # | Story 19 | Rel 4 | 5 | - # | Story 20 | Rel 4 | 5 | - # | Story 21 | | 5 | - # | Story 22 | | 5 | - # | Story 23 | | 5 | - # | Story 24 | | 5 | - # | Story 25 | | 5 | - And I have defined the following stories in the following sprints: - | subject | sprint | release | points | - | Story 01 | Sprint 001 | Rel 1 | 5 | - | Story 02 | Sprint 001 | Rel 1 | 5 | - | Story 03 | Sprint 002 | Rel 1 | 5 | - | Story 04 | Sprint 002 | Rel 1 | 5 | - | Story 05 | Sprint 003 | Rel 1 | 5 | - | Story 06 | Sprint 003 | Rel 2 | 5 | - | Story 07 | Sprint 004 | Rel 2 | 5 | - | Story 08 | Sprint 004 | Rel 2 | 5 | - | Story 09 | Sprint 005 | Rel 2 | 5 | - | Story 10 | Sprint 005 | Rel 2 | 5 | - | Story 11 | Sprint 006 | Rel 3 | 5 | - | Story 12 | Sprint 006 | Rel 3 | 5 | - | Story 13 | Sprint 007 | Rel 3 | 5 | - | Story 14 | Sprint 007 | Rel 3 | 5 | - | Story 15 | Sprint 008 | Rel 3 | 5 | - | Story 16 | Sprint 008 | Rel 4 | 5 | - | Story 17 | Sprint 009 | Rel 4 | 5 | - | Story 18 | Sprint 009 | Rel 4 | 5 | - | Story 19 | Sprint 010 | Rel 4 | 5 | - | Story 20 | Sprint 010 | Rel 4 | 5 | - And I have defined the following stories in the product backlog: - | subject | release | points | - | Story 21 | | 5 | - | Story 22 | | 5 | - | Story 23 | | 5 | - | Story 24 | | 5 | - | Story 25 | | 5 | - And the current time is 2012-01-01 08:00:00 - And I have made the following story mutations: - | day | story | status | - | 5 | Story 01 | Closed | - | 10 | Story 02 | Closed | - And the current time is 2012-02-01 08:00:00 - And I have made the following story mutations: - | day | story | status | - | 5 | Story 03 | Closed | - | 10 | Story 04 | Closed | - And the current time is 2012-03-01 08:00:00 - And I have made the following story mutations: - | day | story | status | - | 5 | Story 05 | Closed | - | 10 | Story 06 | Closed | - And the current time is 2012-04-01 08:00:00 - And I have made the following story mutations: - | day | story | status | - | 5 | Story 07 | Closed | - | 10 | Story 08 | Closed | - And the current time is 2012-05-01 08:00:00 - And I have made the following story mutations: - | day | story | status | - | 5 | Story 09 | Closed | - | 10 | Story 10 | Closed | - And the current time is 2012-06-01 08:00:00 - And I have made the following story mutations: - | day | story | status | - | 5 | Story 11 | Closed | - | 10 | Story 12 | Closed | - And the current time is 2012-07-01 08:00:00 - And I have made the following story mutations: - | day | story | status | - | 5 | Story 13 | Closed | - | 10 | Story 14 | Closed | - When I move story Story 21 to the release Rel 3 - When I move story Story 22 to the release Rel 3 - And the current time is 2012-08-01 08:00:00 - - Scenario: Initial - Given I view the release page -# Then dump the database to pg_new.dump - When I follow "Multi 1" - Then the request should complete successfully - Then show me the page \ No newline at end of file diff --git a/features/release-multiview-burnchart.disabled b/features/release-multiview-burnchart.disabled deleted file mode 100644 index 0f877e910..000000000 --- a/features/release-multiview-burnchart.disabled +++ /dev/null @@ -1,147 +0,0 @@ -Feature: Release multiview burnchart - As a product owner - I want to see progress of multiple releases - So that I can get an overview of the project - - Background: - Given the ecookbook project has the backlogs plugin enabled - And no versions or issues exist - And no releases or release multiviews exist - And I am a product owner of the project - And the current time is 2011-12-31 08:00:00 - And I have defined the following sprints: - | name | sprint_start_date | effective_date | - | Sprint 001 | 2012-01-01 | 2012-01-31 | - | Sprint 002 | 2012-02-01 | 2012-02-28 | - | Sprint 003 | 2012-03-01 | 2012-03-31 | - | Sprint 004 | 2012-04-01 | 2012-04-30 | - | Sprint 005 | 2012-05-01 | 2012-05-31 | - | Sprint 006 | 2012-06-01 | 2012-06-30 | - | Sprint 007 | 2012-07-01 | 2012-07-30 | - | Sprint 008 | 2012-08-01 | 2012-08-31 | - | Sprint 009 | 2012-09-01 | 2012-09-30 | - | Sprint 010 | 2012-10-01 | 2012-10-31 | - | Sprint 011 | 2012-11-01 | 2012-11-30 | - | Sprint 012 | 2012-12-01 | 2012-12-31 | - And I have defined the following releases: - | name | project | release_start_date | release_end_date | - | Rel 1 | ecookbook | 2012-01-01 | 2012-02-28 | - | Rel 2 | ecookbook | 2012-02-01 | 2012-06-30 | - | Rel 3 | ecookbook | 2012-06-01 | 2012-09-30 | - | Rel 4 | ecookbook | 2012-09-01 | 2012-12-31 | - And I have defined the following release multiviews: - | name | project | releases | - | Multi 1 | ecookbook | Rel 1,Rel 2,Rel 3,Rel 4 | - # And I have defined the following stories in the product backlog: - # | subject | release | points | - # | Story 01 | Rel 1 | 5 | - # | Story 02 | Rel 1 | 5 | - # | Story 03 | Rel 1 | 5 | - # | Story 04 | Rel 1 | 5 | - # | Story 05 | Rel 1 | 5 | - # | Story 06 | Rel 2 | 5 | - # | Story 07 | Rel 2 | 5 | - # | Story 08 | Rel 2 | 5 | - # | Story 09 | Rel 2 | 5 | - # | Story 10 | Rel 2 | 5 | - # | Story 11 | Rel 3 | 5 | - # | Story 12 | Rel 3 | 5 | - # | Story 13 | Rel 3 | 5 | - # | Story 14 | Rel 3 | 5 | - # | Story 15 | Rel 3 | 5 | - # | Story 16 | Rel 4 | 5 | - # | Story 17 | Rel 4 | 5 | - # | Story 18 | Rel 4 | 5 | - # | Story 19 | Rel 4 | 5 | - # | Story 20 | Rel 4 | 5 | - # | Story 21 | | 5 | - # | Story 22 | | 5 | - # | Story 23 | | 5 | - # | Story 24 | | 5 | - # | Story 25 | | 5 | - And I have defined the following stories in the following sprints: - | subject | sprint | release | points | - | Story 01 | Sprint 001 | Rel 1 | 5 | - | Story 02 | Sprint 001 | Rel 1 | 5 | - | Story 03 | Sprint 002 | Rel 1 | 5 | - | Story 04 | Sprint 002 | Rel 1 | 5 | - | Story 05 | Sprint 003 | Rel 1 | 5 | - | Story 06 | Sprint 003 | Rel 2 | 5 | - | Story 07 | Sprint 004 | Rel 2 | 5 | - | Story 08 | Sprint 004 | Rel 2 | 5 | - | Story 09 | Sprint 005 | Rel 2 | 5 | - | Story 10 | Sprint 005 | Rel 2 | 5 | - | Story 11 | Sprint 006 | Rel 3 | 5 | - | Story 12 | Sprint 006 | Rel 3 | 5 | - | Story 13 | Sprint 007 | Rel 3 | 5 | - | Story 14 | Sprint 007 | Rel 3 | 5 | - | Story 15 | Sprint 008 | Rel 3 | 5 | - | Story 16 | Sprint 008 | Rel 4 | 5 | - | Story 17 | Sprint 009 | Rel 4 | 5 | - | Story 18 | Sprint 009 | Rel 4 | 5 | - | Story 19 | Sprint 010 | Rel 4 | 5 | - | Story 20 | Sprint 010 | Rel 4 | 5 | - And I have defined the following stories in the product backlog: - | subject | release | points | - | Story 21 | | 5 | - | Story 22 | | 5 | - | Story 23 | | 5 | - | Story 24 | | 5 | - | Story 25 | | 5 | - And the current time is 2012-01-01 08:00:00 - And I have made the following story mutations: - | day | story | status | - | 5 | Story 01 | Closed | - | 10 | Story 02 | Closed | - And the current time is 2012-02-01 08:00:00 - And I have made the following story mutations: - | day | story | status | - | 5 | Story 03 | Closed | - | 10 | Story 04 | Closed | - And the current time is 2012-03-01 08:00:00 - And I have made the following story mutations: - | day | story | status | - | 5 | Story 05 | Closed | - | 10 | Story 06 | Closed | - And the current time is 2012-04-01 08:00:00 - And I have made the following story mutations: - | day | story | status | - | 5 | Story 07 | Closed | - | 10 | Story 08 | Closed | - And the current time is 2012-05-01 08:00:00 - And I have made the following story mutations: - | day | story | status | - | 5 | Story 09 | Closed | - | 10 | Story 10 | Closed | - And the current time is 2012-06-01 08:00:00 - And I have made the following story mutations: - | day | story | status | - | 5 | Story 11 | Closed | - | 10 | Story 12 | Closed | - And the current time is 2012-07-01 08:00:00 - And I have made the following story mutations: - | day | story | status | - | 5 | Story 13 | Closed | - | 10 | Story 14 | Closed | - And the current time is 2012-08-01 08:00:00 - And I have made the following story mutations: - | day | story | status | - | 5 | Story 15 | Closed | - | 10 | Story 16 | Closed | - And the current time is 2012-09-01 08:00:00 - And I have made the following story mutations: - | day | story | status | - | 5 | Story 17 | Closed | - | 10 | Story 18 | Closed | - And the current time is 2012-10-01 08:00:00 - And I have made the following story mutations: - | day | story | status | - | 5 | Story 19 | Closed | - | 10 | Story 20 | Closed | - - Scenario: Initial - Given I view the release page -# Then dump the database to pg_new.dump - When I follow "Multi 1" - Then the request should complete successfully - Then show me the page \ No newline at end of file diff --git a/features/release-multiview-stacked-data.disabled b/features/release-multiview-stacked-data.disabled deleted file mode 100644 index 02952c1c3..000000000 --- a/features/release-multiview-stacked-data.disabled +++ /dev/null @@ -1,341 +0,0 @@ -Feature: Test internal calculation of release multiview data - - Scenario: Add initial series to stacked data - Given I initialize RbStackedData with closed date 2013-12-01 - And I add the following series "A": - | days | total_points | closed_points | - | 2013-08-01 | 100 | 0 | - | 2013-09-01 | 100 | 15 | - | 2013-10-01 | 100 | 30 | - | 2013-11-01 | 110 | 45 | - | 2013-12-01 | 110 | 60 | - And I finish RbStackedData - Then series 0 should be: - | days | total_points | - | 2013-08-01 | 100 | - | 2013-09-01 | 100 | - | 2013-10-01 | 100 | - | 2013-11-01 | 110 | - | 2013-12-01 | 110 | - And closed series should be: - | days | closed_points | - | 2013-08-01 | 0 | - | 2013-09-01 | 15 | - | 2013-10-01 | 30 | - | 2013-11-01 | 45 | - | 2013-12-01 | 60 | - - Scenario: Add two series to stacked data - Given I initialize RbStackedData with closed date 2015-03-01 - And I add the following series "A": - | days | total_points | closed_points | - | 2013-08-01 | 100 | 0 | - | 2013-09-01 | 100 | 15 | - | 2013-10-01 | 100 | 30 | - | 2013-11-01 | 110 | 45 | - | 2013-12-01 | 110 | 60 | - | 2014-01-01 | 120 | 65 | - | 2014-02-01 | 120 | 70 | - | 2014-03-01 | 120 | 80 | - | 2014-04-01 | 120 | 90 | - | 2014-05-01 | 120 | 100 | - | 2014-06-01 | 120 | 110 | - | 2014-07-01 | 120 | 120 | - And I add the following series "B": - | days | total_points | closed_points | - | 2014-05-01 | 150 | 0 | - | 2014-06-01 | 150 | 5 | - | 2014-07-01 | 140 | 10 | - | 2014-08-01 | 140 | 30 | - | 2014-09-01 | 140 | 50 | - | 2014-10-01 | 140 | 70 | - | 2014-11-01 | 140 | 90 | - | 2014-12-01 | 140 | 110 | - | 2015-01-01 | 140 | 115 | - | 2015-02-01 | 140 | 120 | - | 2015-03-01 | 140 | 125 | - And I finish RbStackedData - Then series 0 should be: - | days | total_points | - | 2013-08-01 | 100 | - | 2013-09-01 | 100 | - | 2013-10-01 | 100 | - | 2013-11-01 | 110 | - | 2013-12-01 | 110 | - | 2014-01-01 | 120 | - | 2014-02-01 | 120 | - | 2014-03-01 | 120 | - | 2014-04-01 | 120 | - | 2014-05-01 | 120 | - | 2014-06-01 | 120 | - | 2014-07-01 | 120 | - And series 1 should be: - | days | total_points | - | 2014-05-01 | 270 | - | 2014-06-01 | 270 | - | 2014-07-01 | 260 | - | 2014-08-01 | 260 | - | 2014-09-01 | 260 | - | 2014-10-01 | 260 | - | 2014-11-01 | 260 | - | 2014-12-01 | 260 | - | 2015-01-01 | 260 | - | 2015-02-01 | 260 | - | 2015-03-01 | 260 | - And closed series should be: - | days | closed_points | - | 2013-08-01 | 0 | - | 2013-09-01 | 15 | - | 2013-10-01 | 30 | - | 2013-11-01 | 45 | - | 2013-12-01 | 60 | - | 2014-01-01 | 65 | - | 2014-02-01 | 70 | - | 2014-03-01 | 80 | - | 2014-04-01 | 90 | - | 2014-05-01 | 100 | - | 2014-06-01 | 115 | - | 2014-07-01 | 130 | - | 2014-08-01 | 150 | - | 2014-09-01 | 170 | - | 2014-10-01 | 190 | - | 2014-11-01 | 210 | - | 2014-12-01 | 230 | - | 2015-01-01 | 235 | - | 2015-02-01 | 240 | - | 2015-03-01 | 245 | - - - Scenario: Add two series without directly overlapping days - Given I initialize RbStackedData with closed date 2015-03-01 - And I add the following series "A": - | days | total_points | closed_points | - |2013-08-01 | 100 | 0 | - |2013-09-01 | 100 | 15 | - |2013-10-01 | 100 | 30 | - |2013-11-01 | 110 | 45 | - |2013-12-01 | 110 | 60 | - |2014-01-01 | 110 | 65 | - |2014-02-01 | 110 | 70 | - And I add the following series "B": - | days | total_points | closed_points | - | 2013-12-15 | 150 | 0 | - | 2014-01-15 | 150 | 5 | - | 2014-02-15 | 140 | 10 | - | 2014-03-15 | 140 | 30 | - | 2014-04-15 | 140 | 50 | - | 2014-05-15 | 140 | 70 | - | 2014-06-15 | 140 | 90 | - And I finish RbStackedData - Then series 0 should be: - | days | total_points | - |2013-08-01 | 100 | - |2013-09-01 | 100 | - |2013-10-01 | 100 | - |2013-11-01 | 110 | - |2013-12-01 | 110 | - |2013-12-15 | 110 | - |2014-01-01 | 110 | - |2014-01-15 | 110 | - |2014-02-01 | 110 | - And series 1 should be: - | days | total_points | - | 2013-12-15 | 260 | - | 2014-01-01 | 260 | - | 2014-01-15 | 260 | - | 2014-02-01 | 260 | - | 2014-02-15 | 250 | - | 2014-03-15 | 250 | - | 2014-04-15 | 250 | - | 2014-05-15 | 250 | - | 2014-06-15 | 250 | - And closed series should be: - | days | closed_points | - | 2013-08-01 | 0 | - | 2013-09-01 | 15 | - | 2013-10-01 | 30 | - | 2013-11-01 | 45 | - | 2013-12-01 | 60 | - | 2013-12-15 | 60 | - | 2014-01-01 | 65 | - | 2014-01-15 | 70 | - | 2014-02-01 | 75 | - | 2014-02-15 | 80 | - | 2014-03-15 | 100 | - | 2014-04-15 | 120 | - | 2014-05-15 | 140 | - | 2014-06-15 | 160 | - - Scenario: 2nd series overlap before start date of first series - Given I initialize RbStackedData with closed date 2015-03-01 - And I add the following series "A": - | days | total_points | closed_points | - |2013-08-01 | 100 | 0 | - |2013-09-01 | 100 | 15 | - |2013-10-01 | 100 | 30 | - |2013-11-01 | 110 | 45 | - |2013-12-01 | 110 | 60 | - |2014-01-01 | 110 | 65 | - |2014-02-01 | 110 | 70 | - And I add the following series "B": - | days | total_points | closed_points | - | 2013-05-01 | 150 | 0 | - | 2013-06-01 | 150 | 5 | - | 2013-07-01 | 140 | 10 | - | 2013-08-01 | 140 | 30 | - | 2013-09-01 | 140 | 50 | - | 2013-10-01 | 140 | 70 | - | 2013-11-01 | 140 | 90 | - | 2013-12-01 | 140 | 100 | - | 2014-01-01 | 140 | 110 | - | 2014-02-01 | 140 | 120 | - | 2014-03-01 | 140 | 130 | - And I finish RbStackedData - Then series 0 should be: - | days | total_points | - |2013-08-01 | 100 | - |2013-09-01 | 100 | - |2013-10-01 | 100 | - |2013-11-01 | 110 | - |2013-12-01 | 110 | - |2014-01-01 | 110 | - |2014-02-01 | 110 | - And series 1 should be: - | days | total_points | - | 2013-05-01 | 250 | - | 2013-06-01 | 250 | - | 2013-07-01 | 240 | - | 2013-08-01 | 240 | - | 2013-09-01 | 240 | - | 2013-10-01 | 240 | - | 2013-11-01 | 250 | - | 2013-12-01 | 250 | - | 2014-01-01 | 250 | - | 2014-02-01 | 250 | - | 2014-03-01 | 250 | - And closed series should be: - | days | closed_points | - | 2013-05-01 | 0 | - | 2013-06-01 | 5 | - | 2013-07-01 | 10 | - | 2013-08-01 | 30 | - | 2013-09-01 | 65 | - | 2013-10-01 | 100 | - | 2013-11-01 | 135 | - | 2013-12-01 | 160 | - | 2014-01-01 | 175 | - | 2014-02-01 | 190 | - | 2014-03-01 | 200 | - - Scenario: Series has days outside closed day limit - Given I initialize RbStackedData with closed date 2013-10-01 - And I add the following series "A": - | days | total_points | closed_points | - |2013-08-01 | 100 | 0 | - |2013-09-01 | 100 | 15 | - |2013-10-01 | 100 | 30 | - |2013-11-01 | 110 | 45 | - And I add the following series "B": - | days | total_points | closed_points | - |2013-08-01 | 100 | 0 | - |2013-09-01 | 100 | 15 | - |2013-10-01 | 100 | 30 | - |2013-11-01 | 110 | 45 | - And I finish RbStackedData - Then series 0 should be: - | days | total_points | - |2013-08-01 | 100 | - |2013-09-01 | 100 | - |2013-10-01 | 100 | - |2013-11-01 | 110 | - Then series 1 should be: - | days | total_points | - |2013-08-01 | 200 | - |2013-09-01 | 200 | - |2013-10-01 | 200 | - |2013-11-01 | 220 | - And closed series should be: - | days | closed_points | - | 2013-08-01 | 0 | - | 2013-09-01 | 30 | - | 2013-10-01 | 60 | - - Scenario: First Series has all days outside closed day limit - Given I initialize RbStackedData with closed date 2013-07-01 - And I add the following series "A": - | days | total_points | closed_points | - |2013-08-01 | 100 | 0 | - |2013-09-01 | 100 | 15 | - |2013-10-01 | 100 | 30 | - |2013-11-01 | 110 | 45 | - And I add the following series "B": - | days | total_points | closed_points | - |2013-04-01 | 100 | 0 | - |2013-05-01 | 100 | 15 | - |2013-06-01 | 100 | 30 | - |2013-07-01 | 110 | 45 | - And I finish RbStackedData - Then series 0 should be: - | days | total_points | - |2013-08-01 | 100 | - |2013-09-01 | 100 | - |2013-10-01 | 100 | - |2013-11-01 | 110 | - Then series 1 should be: - | days | total_points | - |2013-04-01 | 200 | - |2013-05-01 | 200 | - |2013-06-01 | 200 | - |2013-07-01 | 210 | - And closed series should be: - | days | closed_points | - | 2013-04-01 | 0 | - | 2013-05-01 | 15 | - | 2013-06-01 | 30 | - | 2013-07-01 | 45 | - - Scenario: 2nd series has all days outside closed day limit - Given I initialize RbStackedData with closed date 2013-11-01 - And I add the following series "A": - | days | total_points | closed_points | - |2013-08-01 | 100 | 0 | - |2013-09-01 | 100 | 15 | - |2013-10-01 | 100 | 30 | - |2013-11-01 | 110 | 45 | - And I add the following series "B": - | days | total_points | closed_points | - |2013-12-01 | 100 | 0 | - |2014-01-01 | 100 | 15 | - |2014-02-01 | 100 | 30 | - |2014-03-01 | 110 | 45 | - And I finish RbStackedData - Then series 0 should be: - | days | total_points | - |2013-08-01 | 100 | - |2013-09-01 | 100 | - |2013-10-01 | 100 | - |2013-11-01 | 110 | - Then series 1 should be: - | days | total_points | - |2013-12-01 | 210 | - |2014-01-01 | 210 | - |2014-02-01 | 210 | - |2014-03-01 | 220 | - And closed series should be: - | days | closed_points | - | 2013-08-01 | 0 | - | 2013-09-01 | 15 | - | 2013-10-01 | 30 | - | 2013-11-01 | 45 | - - Scenario: Check trendlines and estimated end dates - Given I initialize RbStackedData with closed date 2013-12-01 - And I add the following series "A": - | days | total_points | closed_points | - | 2013-08-01 | 100 | 0 | - | 2013-09-01 | 100 | 15 | - | 2013-10-01 | 100 | 30 | - | 2013-11-01 | 110 | 45 | - | 2013-12-01 | 110 | 60 | - And I finish RbStackedData - Then series "A" trend end date should be 2014-04-07 diff --git a/features/release-multiview.feature b/features/release-multiview.feature deleted file mode 100644 index 64df56c37..000000000 --- a/features/release-multiview.feature +++ /dev/null @@ -1,69 +0,0 @@ -Feature: Release multiview management - As a product owner - I want to see progress of multiple releases - So that I can get an overview of the project - - Background: - Given the ecookbook project has the backlogs plugin enabled - And no versions or issues exist - And I am a product owner of the project - And I have defined the following sprints: - | name | sprint_start_date | effective_date | - | Sprint 001 | 2010-01-01 | 2010-01-31 | - | Sprint 002 | 2010-02-01 | 2010-02-28 | - | Sprint 003 | 2010-03-01 | 2010-03-31 | - And I have defined the following releases: - | name | project | release_start_date | release_end_date | - | Rel 1 | ecookbook | 2010-01-01 | 2010-02-28 | - | Rel 2 | ecookbook | 2010-03-01 | 2010-06-01 | - | Rel Extra|ecookbook | 2010-06-01 | 2010-09-01 | - And I have defined the following release multiviews: - | name | project | releases | - | Multi 1 | ecookbook | Rel 1,Rel 2 | - And I have defined the following stories in the product backlog: - | subject | release | points | - | Story 1 | Rel 1 | 2 | - | Story 2 | Rel 1 | 7 | - | Story 3 | Rel 2 | 13 | - | Story 4 | Rel 2 | 20 | - | Story 5 | | 40 | - And I have defined the following stories in the following sprints: - | subject | sprint | release | points | - | Story A | Sprint 001 | Rel 1 | 2 | - | Story B | Sprint 002 | Rel 1 | 3 | - | Story C | Sprint 003 | Rel 2 | 5 | - | Story D | Sprint 003 | | 5 | - - Scenario: Create new release multiview - Given I view the release page - Then I should see "Release Planning" - When I follow "New release multiview" - Then I should see "New release multiview" within "h2" - When I select multiple "Rel 1,Rel 2" from "release_multiview_release_ids" - And I fill in the following: - | release_multiview_name | A release multiview | - When I press "Create" - Then I should see "Successful creation" - - Scenario: Delete a release multiview - Given I view the release page - Then I should see "Release Planning" - When I follow "Multi 1" - Then I should see "Delete" within ".contextual" - When I follow "Delete" within ".contextual" - Then I should see "Release Planning" - Then I should not see "Multi 1" - - Scenario: Edit a release multiview - Given I view the release page - Then I should see "Release Planning" - When I follow "Multi 1" - Then I should see "Edit" within ".contextual" - When I follow "Edit" within ".contextual" - Then I should see "Release multiview" within "#content" - When I fill in "release_multiview_name" with "A changed multi" - And I select multiple "Rel 1,Rel Extra" from "release_multiview_release_ids" - And I press "Save" - Then I should see "Successful update" - And I should see "A changed multi" within "#content" - And release multiview "A changed multi" should contain "Rel 1,Rel Extra" diff --git a/features/release3.feature b/features/release3.feature deleted file mode 100644 index 9903c725d..000000000 --- a/features/release3.feature +++ /dev/null @@ -1,147 +0,0 @@ -Feature: Release management - As a product owner - I want to manage releases - So that i can break down a large product backlog - - Background: - Given the ecookbook project has the backlogs plugin enabled - And no versions or issues exist - And I am a product owner of the project - And I have defined the following sprints: - | name | sprint_start_date | effective_date | - | Sprint 001 | 2010-01-01 | 2010-01-31 | - | Sprint 002 | 2010-02-01 | 2010-02-28 | - | Sprint 003 | 2010-03-01 | 2010-03-31 | - And I have defined the following releases: - | name | project | release_start_date | release_end_date | - | Rel 1 | ecookbook | 2010-01-01 | 2010-02-28 | - | Rel 2 | ecookbook | 2010-03-01 | 2010-06-01 | - And I have defined the following stories in the product backlog: - | subject | release | points | - | Story 1 | Rel 1 | 2 | - | Story 2 | Rel 1 | 7 | - | Story 3 | Rel 2 | 13 | - | Story 4 | Rel 2 | 20 | - | Story 5 | | 40 | - And I have defined the following stories in the following sprints: - | subject | sprint | release | points | - | Story A | Sprint 001 | Rel 1 | 2 | - | Story B | Sprint 002 | Rel 1 | 3 | - | Story C | Sprint 003 | Rel 2 | 5 | - | Story D | Sprint 003 | | 5 | - - Scenario: View the release page - Given I view the release page - Then I should see "Release Planning" within "h2" - And I should see "Rel 1" within "#content" - And I should see "Rel 2" within "#content" - And story Story 1 should belong to release Rel 1 - And story Story 2 should belong to release Rel 1 - And story Story 3 should belong to release Rel 2 - And story Story 4 should belong to release Rel 2 - And story Story A should belong to release Rel 1 - And story Story B should belong to release Rel 1 - And story Story C should belong to release Rel 2 - And story Story 5 should not belong to any release - And release "Rel 1" should have 14 story points - And release "Rel 2" should have 38 story points - When I follow "Rel 1" - Then release "Rel 1" should have 2 sprints - Then I should see "Sprints" within "#content" - And I should see "Sprint 001" within "#sprints" - And I should see "Sprint 002" within "#sprints" - # Disabled temporarily: And I should see "Release Burndown" within "#content" - - Scenario: Create a new release - Given I view the release page - Then I should see "Release Planning" - When I follow "New release" - Then I should see "New release" within "h2" - When I fill in the following: - | release_name | A totally new release | - | release_release_start_date | 2010-04-01 | - | release_release_end_date | 2010-04-30 | - When I press "Create" - Then I should see "Successful creation" - - Scenario: Delete a release - Given I view the release page - Then I should see "Release Planning" - When I follow "Rel 1" - Then I should see "Delete" within ".contextual" - When I follow "Delete" within ".contextual" - Then I should see "Release Planning" - Then I should not see "Rel 1" - - Scenario: Edit a release - Given I view the release page - Then I should see "Release Planning" - When I follow "Rel 1" - Then I should see "Edit" within ".contextual" - When I follow "Edit" within ".contextual" - Then I should see "Release" within "#content" - When I fill in "release_name" with "A changed release" - And I press "Save" - Then I should see "Successful update" - And I should see "A changed release" within "#content" - - Scenario: Add a story to a release - Given I am viewing the master backlog - When I add story Story 5 to release Rel 1 - Then story Story 5 should belong to release Rel 1 - And release "Rel 1" should have 54 story points - And journal for "Story 5" should show change to release "Rel 1" - - Scenario: Close a release - Given I view the release page - Then I should see "Release Planning" - When I follow "Rel 1" - Then I should see "Edit" within ".contextual" - When I follow "Edit" within ".contextual" - Then I should see "Release" within "#content" - When I select "closed" from "release_status" - And I press "Save" - Then I should see "Successful update" - And The release "Rel 1" should be closed - - Scenario: view master backlog page with releases - Given I am viewing the master backlog - Then I should see the product backlog - And I should see 1 stories in the product backlog - And I should see the release backlog of Rel 1 - And I should see 2 stories in the release backlog of Rel 1 - And I should see the release backlog of Rel 2 - And I should see 2 stories in the release backlog of Rel 2 - And I should see 3 sprint backlogs - And I should see 1 stories in the sprint backlog of Sprint 001 - And I should see 1 stories in the sprint backlog of Sprint 002 - And I should see 2 stories in the sprint backlog of Sprint 003 - - Scenario: View issues grouped by releases - Given I view issues tab grouped by releases - Then I should see "Rel 1" group in the issues list - Then I should see "Rel 2" group in the issues list - - @javascript - Scenario: Go to a release backlog query using the issues sidebar - Given I am viewing the issues list - Then I should see "Rel 1" within "#sidebar" - When I follow "Rel 1" - And I should see "Issues" within "#content" - And I should see "Story A" within "#content" - And I should see "Story B" within "#content" - And I should not see "Story C" within "#content" - - Scenario: Bulk edit issue's release attributes - Given I am viewing the issues list - And I want to bulk edit "Story A" and "Story B" - And I want to set the release to "Rel 2" - And I want to set the release relationship to Initial - When I update the stories - Then story "Story A" should have release "Rel 2" - Then story "Story B" should have release "Rel 2" - Then story "Story A" should have release relationship Initial - Then story "Story B" should have release relationship Initial - -# FIXME Scenario: Bulk edit release attributes across projects -# FIXME Scenario: Shared releases diff --git a/features/release_burndown.disabled b/features/release_burndown.disabled deleted file mode 100644 index 386fed7e6..000000000 --- a/features/release_burndown.disabled +++ /dev/null @@ -1,155 +0,0 @@ -Feature: Release burndown - As a product owner - I want to analyze the progress of my releases - So that i can get a feeling for the projects progress - - Background: - Given the ecookbook project has the backlogs plugin enabled - And no versions or issues exist - And I am a product owner of the project - And I have the following issue statuses available: - | name | is_closed | is_default | default_done_ratio | - | New | 0 | 1 | | - | In Progress | 0 | 0 | | - | Feedback | 0 | 0 | | - | Accepted | 1 | 0 | | - | Rejected | 1 | 0 | 1 | - And the current time is 2011-01-01 08:00:00 - And I have defined the following sprints: - | name | sprint_start_date | effective_date | - | Sprint 001 | 2011-01-02 | 2011-01-08 | - | Sprint 002 | 2011-01-09 | 2011-01-15 | - | Sprint X | | | - And I have defined the following releases: - | name | project | release_start_date | release_end_date | - | Rel 1 | ecookbook | 2011-01-02 | 2011-01-31 | - And I have defined the following stories in the product backlog: - | subject | release | points | - | Story 1 | Rel 1 | 2 | - | Story 2 | Rel 1 | 7 | - | Story 5 | | 40 | - - Scenario: View initial release burndown before release start date - Given I view the release page - Then release "Rel 1" should have 0 sprints - And show me the burndown data for release "Rel 1" - And the release burndown for release "Rel 1" should be: - | sprint| backlog_points | closed_points | added_points | - | start | 9 | 0 | 0 | - - Scenario: Simple release burndown - Given I view the release page - And I have defined the following stories in the following sprints: - | subject | sprint | release | points | - | Story A | Sprint 001 | Rel 1 | 2 | - | Story B | Sprint 002 | Rel 1 | 3 | - Given I have made the following story mutations: - | day | story | status | - | 1 | Story A | In Progress | - | 2 | Story A | Accepted | - | 3 | Story B | Feedback | - | 4 | Story B | Rejected | - And the current time is 2011-01-31 23:00:00 - Then release "Rel 1" should have 2 sprints - And show me the burndown data for release "Rel 1" - #points at the end of the corresponding sprint - And the release burndown for release "Rel 1" should be: - | sprint| backlog_points | closed_points | added_points | - | start | 14 | 0 | 0 | - | 1 | 12 | 2 | 0 | - | 2 | 9 | 2 | 0 | - - Scenario: load burndown csv - Given I request the csv format for release "Rel 1" - Then the request should complete successfully - - Scenario: Story closed after sprint end date should appear closed in the original sprint - Given I view the release page - And I have defined the following stories in the following sprints: - | subject | sprint | release | points | - | Story A | Sprint 001 | Rel 1 | 2 | - | Story B | Sprint 002 | Rel 1 | 3 | - And the current time is 2011-01-12 23:00:00 - And I accept story Story A - Then show me the burndown data for release "Rel 1" - And the release burndown for release "Rel 1" should be: - | sprint| backlog_points | closed_points | added_points | - | start | 14 | 0 | 0 | - | 1 | 12 | 2 | 0 | - | 2 | 12 | 2 | 0 | - And the current time is 2011-01-16 23:00:00 - Then show me the burndown data for release "Rel 1" - And the release burndown for release "Rel 1" should be: - | sprint| backlog_points | closed_points | added_points | - | start | 14 | 0 | 0 | - | 1 | 12 | 2 | 0 | - | 2 | 12 | 2 | 0 | - | 3 | 12 | 2 | 0 | - - Scenario: Release burndown with parallel sprint end dates merged - Given I view the release page - And I have defined the following sprints: - | name | sprint_start_date | effective_date | - | Sprint 001a | 2011-01-02 | 2011-01-08 | - And I have defined the following stories in the following sprints: - | subject | sprint | release | points | - | Story A | Sprint 001 | Rel 1 | 2 | - | Story B | Sprint 002 | Rel 1 | 3 | - | Story C | Sprint 001a | Rel 1 | 4 | - And I have made the following story mutations: - | day | story | status | - | 1 | Story A | Accepted | - | 3 | Story C | Accepted | - And the current time is 2011-01-12 23:00:00 - Then show me the burndown data for release "Rel 1" - And the release burndown for release "Rel 1" should be: - | sprint| backlog_points | closed_points | added_points | - | start | 18 | 0 | 0 | - | 1 | 12 | 6 | 0 | - | 2 | 12 | 6 | 0 | - - Scenario: Close story in release but after sprint end date - Given I view the release page - And the current time is 2011-01-07 23:00:00 - And I accept story Story 1 - And the current time is 2011-01-12 23:00:00 - Then show me the burndown data for release "Rel 1" - And the release burndown for release "Rel 1" should be: - | sprint| backlog_points | closed_points | added_points | - | start | 9 | 0 | 0 | - | 1 | 7 | 2 | 0 | - - Scenario: Close story in release but before sprint start date - Given I view the release page - And I accept story Story 1 - And the current time is 2011-01-12 23:00:00 - Then show me the burndown data for release "Rel 1" - And the release burndown for release "Rel 1" should be: - | sprint| backlog_points | closed_points | added_points | - | start | 7 | 2 | 0 | - | 1 | 7 | 2 | 0 | -# Expecting to see story closed before the sprint - - Scenario: Add story from release to sprint without start/end date - Given I view the release page - And I have defined the following stories in the following sprints: - | subject | sprint | release | points | - | Story X | Sprint X | Rel 1 | 2 | - Then show me the burndown data for release "Rel 1" - - -# Scenario: Add complexity by re-estimating a story -# Given the current time is 2011-01-15 08:00:00 -# When I update story "Story 3" to 13 story points -# -# Scenario: Add a story to running release -# Given the current time is 2011-01-15 08:00:00 -# When I add a story to release "Rel 1" -# -# Scenario: Split a story -# Given the current time is 2011-01-31 08:00:00 -# When I copy story "Story A" into "Story A.cont" -# When I reject story "Story A" -# When update story "Story A.cont" to 5 story points -# -# Scenario: reject and re-open a story diff --git a/features/release_burndown_complex.disabled b/features/release_burndown_complex.disabled deleted file mode 100644 index d987dfc99..000000000 --- a/features/release_burndown_complex.disabled +++ /dev/null @@ -1,143 +0,0 @@ -Feature: Release burndown complex - As a product owner - I want to analyze the progress of my releases - So that i can get a feeling for the projects progress - - Background: - Given the ecookbook project has the backlogs plugin enabled - And no versions or issues exist - And I am a product owner of the project - And I have the following issue statuses available: - | name | is_closed | is_default | default_done_ratio | - | New | 0 | 1 | | - | In Progress | 0 | 0 | | - | Feedback | 0 | 0 | | - | Accepted | 1 | 0 | | - | Rejected | 1 | 0 | 1 | - And the current time is 2011-01-01 08:00:00 - And I have defined the following sprints: - | name | sprint_start_date | effective_date | - | Sprint 001 | 2011-01-01 | 2011-01-31 | - | Sprint 002 | 2011-02-01 | 2011-02-28 | - | Sprint 003 | 2011-03-01 | 2011-03-31 | - | Sprint 004 | 2011-04-01 | 2011-04-30 | - | Sprint 005 | 2011-05-01 | 2011-05-31 | - | Sprint 006 | 2011-06-01 | 2011-06-30 | - | Sprint 007 | 2011-07-01 | 2011-07-31 | - And I have defined the following releases: - | name | project | release_start_date | release_end_date | - | Rel 1 | ecookbook | 2011-01-01 | 2011-07-31 | - And I have defined the following stories in the product backlog: - | subject | release | points | - | Story A | Rel 1 | 3 | - | Story B | Rel 1 | 2 | - | Story C | Rel 1 | 5 | - | Story D | Rel 1 | 4 | - | Story E | Rel 1 | 8 | - | Story X | Rel 1 | 2 | -# Sprint 1 - And I move the story named Story A to the 1st position of the sprint named Sprint 001 - And I move the story named Story B to the 1st position of the sprint named Sprint 001 - And I have made the following story mutations: - | day | story | status | - | 1 | Story A | Closed | - | 2 | Story B | Closed | - And the current time is 2011-01-15 23:00:00 - And I have defined the following stories in the product backlog: - | subject | release | points | - | Story F | Rel 1 | 4 | - | Story G | Rel 1 | 2 | -# Sprint 2 - And I move the story named Story C to the 1st position of the sprint named Sprint 002 - And the current time is 2011-02-01 08:00:00 - And I have made the following story mutations: - | day | story | status | - | 1 | Story C | Closed | -# Sprint 3 - And I move the story named Story E to the 1st position of the sprint named Sprint 003 - And the current time is 2011-03-01 08:00:00 - And I duplicate Story E to release Rel 1 as Story E 2nd - And I set story Story E 2nd release relationship to continued - And I have made the following story mutations: - | day | story | status | - | 5 | Story E | Rejected | -# Sprint 4 - And I move the story named Story G to the 1st position of the sprint named Sprint 004 - And the current time is 2011-04-01 08:00:00 - And I have made the following story mutations: - | day | story | status | - | 5 | Story G | Rejected | -# Sprint 5 - And I move the story named Story X to the 1st position of the sprint named Sprint 005 - And the current time is 2011-05-01 08:00:00 - Given I am viewing the master backlog - When I move story Story E 2nd to the product backlog - And I have made the following story mutations: - | day | story | status | - | 5 | Story X | Closed | -# Sprint 6 - And I move the story named Story D to the 1st position of the sprint named Sprint 006 - And the current time is 2011-06-01 08:00:00 - And I have made the following story mutations: - | day | story | status | - | 5 | Story D | Closed | -# Sprint 7 - And I move the story named Story F to the 1st position of the sprint named Sprint 007 - And the current time is 2011-07-01 08:00:00 - And I have made the following story mutations: - | day | story | status | - | 20 | Story F | Closed | - -#FIXME Closing sprints? - - Scenario: View complete release burndown - Given I view the release page - Then show me the burndown data for release "Rel 1" -# Then dump the database to pg_new.dump - And the release burndown for release "Rel 1" should be: - | sprint| backlog_points | closed_points | added_points | - | start | 24 | 0 | 0 | - | 1 | 19 | 5 | 6 | - | 2 | 14 | 10 | 6 | - | 3 | 14 | 10 | 6 | - | 4 | 14 | 10 | 4 | - | 5 | 4 | 12 | 4 | - | 6 | 0 | 16 | 4 | - | 7 | 0 | 20 | 0 | - - Scenario: Move stories to another release to simulate migrated project - Given I have defined the following releases: - | name | project | release_start_date | release_end_date | - | Moved | ecookbook | 2011-01-01 | 2011-07-31 | - And the current time is 2011-09-01 08:00:00 - When I move story Story A to the release Moved - When I move story Story B to the release Moved - When I move story Story C to the release Moved - When I move story Story D to the release Moved - When I move story Story E to the release Moved - When I move story Story F to the release Moved - When I move story Story G to the release Moved - When I move story Story X to the release Moved - And I set story Story A release relationship to initial - And I set story Story B release relationship to initial - And I set story Story C release relationship to initial - And I set story Story D release relationship to initial - And I set story Story E release relationship to initial - And I set story Story X release relationship to initial - And I set story Story F release relationship to added - And I set story Story G release relationship to added - And I view the release page - Then show me the burndown data for release "Moved" - And the release burndown for release "Moved" should be: - | sprint| backlog_points | closed_points | added_points | - | start | 24 | 0 | 0 | - | 1 | 19 | 5 | 6 | - | 2 | 14 | 10 | 6 | -# The next two backlog_points differ from the original (14=>6) -# Due to the moved stories there is no history information regarding -# Story 2nd being part of the release during sprints 3+4. - | 3 | 6 | 10 | 6 | - | 4 | 6 | 10 | 4 | - | 5 | 4 | 12 | 4 | - | 6 | 0 | 16 | 4 | - | 7 | 0 | 20 | 0 | diff --git a/features/release_burndown_trendline.disabled b/features/release_burndown_trendline.disabled deleted file mode 100644 index 09fd3aac1..000000000 --- a/features/release_burndown_trendline.disabled +++ /dev/null @@ -1,111 +0,0 @@ -Feature: Release burndown - As a product owner - I want to analyze the progress of my releases - So that i can get a feeling for the projects progress - - Background: - Given the ecookbook project has the backlogs plugin enabled - And no versions or issues exist - And I am a product owner of the project - And I have the following issue statuses available: - | name | is_closed | is_default | default_done_ratio | - | New | 0 | 1 | | - | In Progress | 0 | 0 | | - | Feedback | 0 | 0 | | - | Accepted | 1 | 0 | | - | Rejected | 1 | 0 | 1 | - And the current time is 2011-01-01 08:00:00 - And I have defined the following sprints: - | name | sprint_start_date | effective_date | - | Sprint 001 | 2011-01-02 | 2011-01-08 | - | Sprint 002 | 2011-01-09 | 2011-01-15 | - | Sprint X | | | - And I have defined the following releases: - | name | project | release_start_date | release_end_date | - | Rel 1 | ecookbook | 2011-01-02 | 2011-01-31 | - And I have defined the following stories in the product backlog: - | subject | release | points | - | Story 1 | Rel 1 | 2 | - | Story 2 | Rel 1 | 7 | - | Story 5 | | 40 | - - Scenario: See planned end date at different time in the release. - Given I view the release page - And I have set planned velocity to 5 points per month for Rel 1 - And I have defined the following stories in the following sprints: - | subject | sprint | release | points | - | Story A | Sprint 001 | Rel 1 | 2 | - | Story B | Sprint 002 | Rel 1 | 3 | - And I have made the following story mutations: - | day | story | status | - | 1 | Story A | Accepted | - And the current time is 2011-01-12 23:00:00 - Then show me the burndown data for release "Rel 1" - And Rel 1 has planned timespan of 72 days starting from 2011-01-08 - And the current time is 2011-01-16 23:00:00 -# Reason: No current sprint - planned estimate should start from today. - And Rel 1 has planned timespan of 72 days starting from 2011-01-16 - - - Scenario: See trend end date at different time in the release. - Given I view the release page - And I have defined the following stories in the following sprints: - | subject | sprint | release | points | - | Story A | Sprint 001 | Rel 1 | 2 | - | Story B | Sprint 002 | Rel 1 | 3 | - And I have made the following story mutations: - | day | story | status | - | 1 | Story A | Accepted | - And the current time is 2011-01-12 23:00:00 - Then show me the burndown data for release "Rel 1" - And Rel 1 has trend closed based on dates "2011-01-02,2011-01-08" - And Rel 1 has trend closed with slope of 0.333 points per day intercepting at 0.0 points - And Rel 1 has trend scope based on dates "2011-01-08,2011-01-15" - And Rel 1 has trend scope with slope of 0 points per day intercepting at 14 points -# Reason: Trend closed uses data available from the past sprints -# Trend scope is allowed to use latest available changes to project scope - And Rel 1 has trend estimate end date at 2011-02-13 -# Reason: Slope of 0.333 points per day => 36 days to complete 12 remaining points in backlog - - And the current time is 2011-01-16 23:00:00 - Then show me the burndown data for release "Rel 1" - And Rel 1 has trend closed based on dates "2011-01-02,2011-01-08,2011-01-15,2011-01-16" - And Rel 1 has trend closed with slope of 0.128 points per day intercepting at 0.442 points -# Slope is least mean square estimate from closed points [0,2,2,2]. - And Rel 1 has trend scope based on dates "2011-01-02,2011-01-08,2011-01-15,2011-01-16" - And Rel 1 has trend scope with slope of 0 points per day intercepting at 14 points -# Reason: No current sprint - today is taking into the estimates also. - And Rel 1 has trend estimate end date at 2011-04-17 # Equation: 14 = 0.128155*x + 0.442 => x= 105 days - - - Scenario: See impact of added stories to trend estimate end date - Given I view the release page - And I have defined the following stories in the following sprints: - | subject | sprint | release | points | - | Story A | Sprint 001 | Rel 1 | 2 | - | Story B | Sprint 002 | Rel 1 | 3 | - And I have made the following story mutations: - | day | story | status | - | 1 | Story A | Accepted | - And the current time is 2011-01-12 23:00:00 - And I have defined the following stories in the following sprints: - | subject | sprint | release | points | - | Story C | Sprint 002 | Rel 1 | 1 | - Then show me the burndown data for release "Rel 1" -# Added story already in calculation window - And Rel 1 has trend closed based on dates "2011-01-02,2011-01-08" - And Rel 1 has trend closed with slope of 0.333 points per day intercepting at 0 points - And Rel 1 has trend scope based on dates "2011-01-08,2011-01-15" - And Rel 1 has trend scope with slope of 0.143 points per day intercepting at 14 points - And Rel 1 has trend estimate end date at 2011-03-12 -# Verified by calculating crossing date of trend closed and trend scope in spreadsheet - And the current time is 2011-01-16 23:00:00 - Then show me the burndown data for release "Rel 1" - And Rel 1 has trend closed based on dates "2011-01-02,2011-01-08,2011-01-15,2011-01-16" - And Rel 1 has trend closed with slope of 0.128 points per day intercepting at 0.442 points - And Rel 1 has trend scope based on dates "2011-01-02,2011-01-08,2011-01-15,2011-01-16" -# Next one verified by linear regression in spreadsheet. - And Rel 1 has trend scope with slope of 0.082 points per day intercepting at 13.83 points -# By linear regression of trend scope and trend closed crossing date is found in spreadsheet. - And Rel 1 has trend estimate end date at 2011-10-16 - diff --git a/features/routes.feature b/features/routes.feature deleted file mode 100644 index 3f60b337e..000000000 --- a/features/routes.feature +++ /dev/null @@ -1,60 +0,0 @@ -Feature: Routes - As a user - I want pages to have proper urls - So that I can bookmark them - - Background: - Given the ecookbook project has the backlogs plugin enabled - And I am a scrum master of the project - - Scenario: Backlogs page - When I get the "rb/master_backlog/ecookbook" page - Then application should route me to: - | controller | rb_master_backlogs | - | action | show | - | project_id | ecookbook | - And the request should complete successfully - - Scenario: Server variables script for all projects - When I get the "rb/server_variables.js" page - Then application should route me to: - | controller | rb_server_variables | - | action | index | - | format | js | - And the request should complete successfully - - Scenario: Server variables script for project - When I get the "rb/server_variables/project/ecookbook.js" page - Then application should route me to: - | controller | rb_server_variables | - | action | project | - | project_id | ecookbook | - | format | js | - And the request should complete successfully - - Scenario: Server variables script for sprint - When I get the "rb/server_variables/sprint/1.js" page - Then application should route me to: - | controller | rb_server_variables | - | action | sprint | - | sprint_id | 1 | - | format | js | - And the request should complete successfully - - Scenario: Task create page - When I post the "rb/task" page with params: - | project_id | ecookbook | - Then application should route me to: - | controller | rb_tasks | - | action | create | - And the request should complete successfully - - Scenario: Task update page - When I put the "rb/task/1" page with params: - | project_id | ecookbook | - Then application should route me to: - | controller | rb_tasks | - | action | update | - | id | 1 | - And the request should complete successfully - diff --git a/features/scrum_master.feature b/features/scrum_master.feature deleted file mode 100644 index ed26fe4a2..000000000 --- a/features/scrum_master.feature +++ /dev/null @@ -1,207 +0,0 @@ -Feature: Scrum Master - As a scrum master - I want to manage sprints and their stories - So that they get done according the product owner's requirements - - Background: - Given the ecookbook project has the backlogs plugin enabled - And I am a scrum master of the project - And I have deleted all existing issues - And I have defined the following sprints: - | name | sprint_start_date | effective_date | - | Sprint 001 | 2010-01-01 | 2010-01-31 | - | Sprint 002 | 2010-02-01 | 2010-02-28 | - | Sprint 003 | 2010-03-01 | 2010-03-31 | - | Sprint 004 | 2 weeks ago | next week | - And I have defined the following stories in the product backlog: - | subject | - | Story 1 | - | Story 2 | - | Story 3 | - | Story 4 | - And I have defined the following stories in the following sprints: - | subject | sprint | - | Story A | Sprint 001 | - | Story B | Sprint 001 | - And I have defined the following impediments: - | subject | sprint | blocks | - | Impediment 1 | Sprint 001 | Story A | - And I have defined the following tasks: - | subject | story | assigned_to | - | Task 1 | Story A | | - - Scenario: Create an impediment - Given I am viewing the taskboard for Sprint 001 - And I want to create an impediment for Sprint 001 - And I want to set the subject of the impediment to Bad Impediment - And I want to indicate that the impediment blocks Story B - When I create the impediment - Then the request should complete successfully - And the sprint named Sprint 001 should have 2 impediments named Bad Impediment and Impediment 1 - - Scenario: Update an impediment - Given I am viewing the taskboard for Sprint 001 - And I want to edit the impediment named Impediment 1 - And I want to set the subject of the impediment to Good Impediment - And I want to indicate that the impediment blocks Story B - When I update the impediment - Then the request should complete successfully - And the sprint named Sprint 001 should have 1 impediment named Good Impediment - - Scenario: View impediments - Given I am viewing the issues sidebar for Sprint 001 - Then the request should complete successfully - When I follow "Impediments" - Then the request should complete successfully - And I should see "Impediment 1" - - Scenario: Create a new sprint - Given I am viewing the master backlog - And I want to create a sprint - And I want to set the name of the sprint to sprint 005 - And I want to set the sprint_start_date of the sprint to 2010-03-01 - And I want to set the effective_date of the sprint to 2010-03-20 - When I create the sprint - Then the request should complete successfully - And I should see "sprint 005" - And the sprint "sprint 005" should not be shared - - Scenario: Create a new sprint with auto-sharing - Given I am viewing the master backlog - And sharing is enabled - And default sharing for new sprints is hierarchy - And I want to create a sprint - And I want to set the name of the sprint to sprint 006 - And I want to set the sprint_start_date of the sprint to 2010-03-01 - And I want to set the effective_date of the sprint to 2010-03-20 - When I create the sprint - Then the request should complete successfully - And I should see "sprint 006" - And the sprint "sprint 006" should be shared by hierarchy - - Scenario: Update sprint details - Given I am viewing the master backlog - And I want to edit the sprint named Sprint 001 - And I want to set the name of the sprint to sprint xxx - And I want to set the sprint_start_date of the sprint to 2010-03-01 - And I want to set the effective_date of the sprint to 2010-03-20 - When I update the sprint - Then the request should complete successfully - And the sprint should be updated accordingly - - @javascript - Scenario: Bug #855 update sprint details must not change project of sprint - Given the subproject1 project has the backlogs plugin enabled - And sharing is enabled - And I am a scrum master of all projects - And I have defined the following sprints: - | name | sprint_start_date | effective_date | project_id | sharing | - | Shared | 2010-01-01 | 2010-01-31 | ecookbook | descendants | - And I have selected the subproject1 project - Given I am viewing the master backlog - When I change the sprint name of "Shared" to "sprint xxx" - Then the sprint "sprint xxx" should be in project "ecookbook" - - Scenario: Update sprint with no name - Given I am viewing the master backlog - And I want to edit the sprint named Sprint 001 - And I want to set the name of the sprint to an empty string - When I try to update the sprint - Then the server should return an update error - - Scenario: Move a story from product backlog to sprint backlog - Given I am viewing the master backlog - When I move the story named Story 1 to the 1st position of the sprint named Sprint 001 - Then the request should complete successfully - When I move the story named Story 4 to the 2nd position of the sprint named Sprint 001 - And I move the story named Story 2 to the 1st position of the sprint named Sprint 002 - And I move the story named Story 4 to the 1st position of the sprint named Sprint 001 - Then Story 4 should be in the 1st position of the sprint named Sprint 001 - And Story 1 should be in the 2nd position of the sprint named Sprint 001 - And Story 2 should be in the 1st position of the sprint named Sprint 002 - - Scenario: Move a story down in a sprint - Given I am viewing the master backlog - When I move the story named Story B above Story A - Then the request should complete successfully - And Story A should be in the 2nd position of the sprint named Sprint 001 - And Story B should be the higher item of Story A - - Scenario: Authorized request to the project calendar feed - Given I move the story named Story 4 to the 1st position of the sprint named Sprint 004 - And I have set my API access key - And I am logged out - When I try to download the calendar feed - Then the request should complete successfully - And calendar feed download should succeed - - Scenario: Unauthorized request to the project calendar feed - Given I move the story named Story 4 to the 1st position of the sprint named Sprint 004 - And I have set my API access key - And I am logged out - And I have guessed an API access key - When I try to download the calendar feed - Then the request should fail - And calendar feed download should fail - - Scenario: Download printable cards for the product backlog - And I am viewing the issues sidebar - When I follow "Product backlog cards" - Then the request should complete successfully - - Scenario: Download printable cards for the task board - And I move the story named Story 4 to the 1st position of the sprint named Sprint 001 - And I am viewing the issues sidebar for Sprint 001 - When I follow "Sprint cards" - Then the request should complete successfully - - Scenario: view the sprint notes - Given I have set the content for wiki page Sprint Template to Sprint Template - And I have made Sprint Template the template page for sprint notes - And I am viewing the taskboard for Sprint 001 - When I view the sprint notes - Then the request should complete successfully - Then the wiki page Sprint 001 should contain Sprint Template - - Scenario: edit the sprint notes - Given I have set the content for wiki page Sprint Template to Sprint Template - And I have made Sprint Template the template page for sprint notes - And I am viewing the taskboard for Sprint 001 - When I edit the sprint notes - Then the request should complete successfully - Then the wiki page Sprint 001 should contain Sprint Template - - @javascript - Scenario: click the various links to the sprint wiki page and inspect the frontend visually - Given I have set the content for wiki page Sprint Template to Sprint Template - And I have made Sprint Template the template page for sprint notes - And I am viewing the issues list - #check wiki link from sidebar - When I follow "Sprint 001" within "#sidebar" - When I follow "Wiki" within "#sidebar" - Then I should see "Sprint Template" within ".wiki-page" - # now check edit wiki page on version page - When I follow "Settings" within "#main-menu" - And I follow "Versions" within ".tabs" - And I follow "Sprint 001" within "#tab-content-versions .versions td.name" - And I follow "Edit wiki page" within ".contextual" - Then I should see "Sprint Template" within "#content_text" - # check from backlogs sprint menu does not test reliably. 2bd. - #When I follow "Backlogs" within "#main-menu" - # And I follow "Wiki" from the menu of a Sprint - #Then I should see "Sprint Template" within ".wiki-page" - - Scenario: Update sprint with start date greater than end date - Given I am viewing the master backlog - And I want to edit the sprint named Sprint 001 - And I want to set the sprint_start_date of the sprint to 2012-03-01 - And I want to set the effective_date of the sprint to 2012-02-20 - When I try to update the sprint - Then the server should return an update error - And the error message should say "Sprint cannot end before it starts" - - Scenario: Download sprint as XML spreadsheet - Given I am viewing the master backlog - And I have set my API access key - When I try to download the XML sheet for Sprint 001 - Then the request should complete successfully diff --git a/features/settings.feature b/features/settings.feature deleted file mode 100644 index abcf0bab9..000000000 --- a/features/settings.feature +++ /dev/null @@ -1,51 +0,0 @@ -Feature: Configuration - As an administrator - I want to manage backlogs configuration - So that it fits my needs - - Background: - Given the ecookbook project has the backlogs plugin enabled - Given backlogs is configured - - Scenario: view the global settings - Given I am admin - And I am on the homepage - When I follow "Administration" - When I follow "Plugins" - When I follow "Configure" - Then I should see "Story and Task settings" - And I should see "Product backlog page settings" - - Scenario: view the project local settings - Given I am a product owner of the project - And sharing is enabled - And I am viewing the backlog settings page for project ecookbook - Then I should see "Show stories from subprojects" - And show_stories_from_subprojects for ecookbook should be true - And the "settings[show_stories_from_subprojects]" checkbox should be checked - When I uncheck "settings[show_stories_from_subprojects]" - And I press "Save" - Then show_stories_from_subprojects for ecookbook should be false - - Scenario: disable subproject for product backlog - Given I am a product owner of the project - And sharing is enabled - And I have selected the ecookbook project - And the project selected not to include subprojects in the product backlog - And I am viewing the backlog settings page for project ecookbook - Then I should see "Show stories from subprojects" - And show_stories_from_subprojects for ecookbook should be false - And the "settings[show_stories_from_subprojects]" checkbox should not be checked - When I check "settings[show_stories_from_subprojects]" - And I press "Save" - Then show_stories_from_subprojects for ecookbook should be true - - Scenario: Change setting Show project in Scrum statistics - Given I am a product owner of the project - And I am viewing the backlog settings page for project ecookbook - Then I should see "Show project in Scrum statistics" - And show_in_scrum_stats for ecookbook should be true - And the "settings[show_in_scrum_stats]" checkbox should be checked - When I uncheck "settings[show_in_scrum_stats]" - And I press "Save" - Then show_in_scrum_stats for ecookbook should be false diff --git a/features/shared-versions-burndown.feature b/features/shared-versions-burndown.feature deleted file mode 100644 index 2ec3b1722..000000000 --- a/features/shared-versions-burndown.feature +++ /dev/null @@ -1,218 +0,0 @@ -Feature: Burndown - As a scrum master - I want to manage sprints and their stories - So that they get done according the product owner's requirements - - Background: - Given the ecookbook project has the backlogs plugin enabled - And sharing is enabled - And the subproject1 project has the backlogs plugin enabled - And no versions or issues exist - And I am a scrum master of the project - And I have selected the ecookbook project - And I have the following issue statuses available: - | name | is_closed | is_default | default_done_ratio | - | New | 0 | 1 | | - | Assigned | 0 | 0 | | - | In Progress | 0 | 0 | | - | Resolved | 0 | 0 | | - | Feedback | 0 | 0 | | - | Closed | 1 | 0 | | - | Accepted | 1 | 0 | | - | Rejected | 1 | 0 | 1 | - - And the current time is 2011-01-01 07:00:00 - - And I have defined the following sprints: - | name | sprint_start_date | effective_date | sharing | project_id | - | Sprint 001 | 2012-02-02 | 2012-02-09 | descendants | ecookbook | - | Sprint siegerv | 2011-08-19 | 2011-09-02 | descendants | ecookbook | - - And I have defined the following stories in the product backlog: - | subject | project_id | - | Story 1 | ecookbook | - | Story 2 | ecookbook | - | Story 3 | ecookbook | - | Story 4 | subproject1 | - And I have defined the following stories in the following sprints: - | subject | sprint | points | project_id | - | Story A | Sprint 001 | 1 | ecookbook | - | Story B | Sprint 001 | 2 | ecookbook | - | Story C | Sprint 001 | 4 | subproject1 | - | Siegerv story 1 | Sprint siegerv | 1 | ecookbook | - - And I have defined the following tasks: - | subject | story | estimate | status | - | A.1 | Story A | 10 | New | - | B.1 | Story B | 20 | New | - | C.1 | Story C | 40 | New | - - | S.1 | Siegerv story 1 | 10 | New | - - Scenario: Check baseline without sharing - Given I have selected the ecookbook project - And sharing is not enabled - And I am viewing the master backlog - Then I should see 3 stories in the product backlog - And I should see 2 sprint backlogs - # And I should see 2 stories in the backlog of sprint Sprint 001 - - Scenario: Check baseline with sharing - Given I have selected the ecookbook project - And I am viewing the master backlog - Then I should see 4 stories in the product backlog - And I should see 2 sprint backlogs - # And I should see 3 stories in the backlog of sprint Sprint 001 - - Scenario: Tasks closed AFTER remaining hours is set to 0 - Given I am viewing the taskboard for Sprint 001 - And I have made the following task mutations: - | day | task | remaining | status | - | 1 | A.1 | 5 | In Progress | - | 1 | B.1 | 10 | In Progress | - | 2 | A.1 | 0 | | - | 2 | A.1 | | Closed | - | 2 | C.1 | 30 | In Progress | - | 3 | B.1 | 0 | | - | 3 | B.1 | | Closed | - | 3 | C.1 | 25 | | - | 4 | C.1 | 10 | | - | 5 | C.1 | 0 | | - | 5 | C.1 | | Closed | - Then the sprint burndown should be: - | day | points_committed | points_to_resolve | hours_remaining | - | start | 7 | 7 | 70 | - | 1 | 7 | 7 | 55 | - | 2 | 7 | 6 | 40 | - | 3 | 7 | 4 | 25 | - | 4 | 7 | 4 | 10 | - | 5 | 7 | 0 | 0 | - And the sprint burnup should be: - | day | points_committed | points_resolved | hours_remaining | - | start | 7 | 0 | 70 | - | 1 | 7 | 0 | 55 | - | 2 | 7 | 1 | 40 | - | 3 | 7 | 3 | 25 | - | 4 | 7 | 3 | 10 | - | 5 | 7 | 7 | 0 | - - Scenario: Tasks closed BEFORE remaining hours is set to 0 - Given I am viewing the taskboard for Sprint 001 - And I have made the following task mutations: - | day | task | remaining | status | - | 1 | A.1 | 5 | In Progress | - | 1 | B.1 | 10 | In Progress | - | 2 | A.1 | | Closed | - | 2 | A.1 | 0 | | - | 2 | C.1 | 30 | In Progress | - | 3 | B.1 | | Closed | - | 3 | B.1 | 0 | | - | 3 | C.1 | 25 | | - | 4 | C.1 | 10 | | - | 5 | C.1 | | Closed | - | 5 | C.1 | 0 | | - - Then the sprint burndown should be: - | day | points_committed | points_to_resolve | hours_remaining | - | start | 7 | 7 | 70 | - | 1 | 7 | 7 | 55 | - | 2 | 7 | 6 | 40 | - | 3 | 7 | 4 | 25 | - | 4 | 7 | 4 | 10 | - | 5 | 7 | 0 | 0 | - - Scenario: New task and story added during sprint - Given I am viewing the taskboard for Sprint 001 - And I have made the following task mutations: - | day | task | remaining | status | - | 1 | A.1 | 5 | In Progress | - | 1 | B.1 | 10 | In Progress | - | 2 | A.1 | 0 | | - | 2 | A.1 | | Closed | - | 2 | C.1 | 30 | In Progress | - - And I have defined the following stories in the following sprints: - | subject | sprint | points | day | - | Story D | Sprint 001 | 4 | 3 | - - And I have defined the following tasks: - | subject | story | estimate | status | - | D.1 | Story D | 40 | New | - - And I have made the following task mutations: - | day | task | remaining | status | - | 3 | B.1 | 0 | | - | 3 | B.1 | | Closed | - | 3 | C.1 | 25 | | - | 4 | C.1 | 10 | | - | 4 | D.1 | 20 | In Progress | - | 5 | C.1 | 0 | | - | 5 | C.1 | | Closed | - | 5 | D.1 | 0 | | - | 5 | D.1 | | Closed | - - Then the sprint burndown should be: - | day | points_committed | points_to_resolve | hours_remaining | - | start | 7 | 7 | 70 | - | 1 | 7 | 7 | 55 | - | 2 | 7 | 6 | 40 | - | 3 | 11 | 8 | 65 | - | 4 | 11 | 8 | 30 | - | 5 | 11 | 0 | 0 | - - Scenario: Change sprint start date - Given I am viewing the taskboard for Sprint 001 - And I have changed the sprint start date to 2012-02-03 - And I have defined the following stories in the following sprints: - | subject | sprint | points | day | - | Story D | Sprint 001 | 1 | 2012-02-02 01:00:00 | - And I have changed the sprint start date to 2012-02-02 - Then the sprint burnup should be: - | day | points_resolved | - | start | 1 | - | 1 | 1 | - - Scenario: Closed sprint burndown - Given I am viewing the taskboard for Sprint 001 - And I have made the following task mutations: - | day | task | remaining | status | - | 3 | S.1 | 0 | | - - Scenario: Saturday and Sunday are included in burndown chart - Given I have configured backlogs plugin to include Saturday and Sunday in burndown - And I am viewing the taskboard for Sprint 001 - And I have made the following task mutations: - | day | task | remaining | status | - | 1 | A.1 | 5 | In Progress | - | 1 | B.1 | 10 | In Progress | - | 2 | A.1 | 0 | | - | 2 | A.1 | | Closed | - | 2 | C.1 | 30 | In Progress | - | 3 | B.1 | 0 | | - | 3 | B.1 | | Closed | - | 3 | C.1 | 25 | | - | 4 | C.1 | 10 | | - | 5 | C.1 | 5 | | - | 6 | C.1 | 1 | | - | 7 | C.1 | 0 | | - | 7 | C.1 | | Closed | - Then the sprint burndown should be: - | day | points_committed | points_to_resolve | hours_remaining | - | start | 7 | 7 | 70 | - | 1 | 7 | 7 | 55 | - | 2 | 7 | 6 | 40 | - | 3 | 7 | 4 | 25 | - | 4 | 7 | 4 | 10 | - | 5 | 7 | 4 | 5 | - | 6 | 7 | 4 | 1 | - | 7 | 7 | 0 | 0 | - And the sprint burnup should be: - | day | points_committed | points_resolved | hours_remaining | - | start | 7 | 0 | 70 | - | 1 | 7 | 0 | 55 | - | 2 | 7 | 1 | 40 | - | 3 | 7 | 3 | 25 | - | 4 | 7 | 3 | 10 | - | 5 | 7 | 3 | 5 | - | 6 | 7 | 3 | 1 | - | 7 | 7 | 7 | 0 | diff --git a/features/shared-versions-chief_product_owner.feature b/features/shared-versions-chief_product_owner.feature deleted file mode 100644 index 5eb4fcbef..000000000 --- a/features/shared-versions-chief_product_owner.feature +++ /dev/null @@ -1,58 +0,0 @@ -Feature: Shared versions multiple subprojects, one sprint - As a chief project manager - I want to manage two backlogs but one team - So that both projects get priorized and done according to my decisions - - Background: - Given the ecookbook project has the backlogs plugin enabled - And sharing is enabled - And I have defined the following projects: - | name | - | p1 | - | p1s1 | - | p1s2 | - - And the p1 project has the backlogs plugin enabled - And the p1s1 project has the backlogs plugin enabled - And the p1s1 project is subproject of the p1 project - And the p1s2 project has the backlogs plugin enabled - And the p1s2 project is subproject of the p1 project - And no versions or issues exist - And I am a product owner of the project - And I have defined the following sprints: - | name | sprint_start_date | effective_date | sharing | project_id | - | Sp001 | 2010-01-01 | 2010-01-31 | descendants | p1 | - - And I have defined the following stories in the product backlog: - | subject | project_id | - | Story 1 | ecookbook | - | Story 2 | p1 | - | Story 3 | p1s1 | - | Story 4 | p1s1 | - | Story 5 | p1s2 | - | Story 6 | p1s2 | - - @javascript - Scenario: Plan a sprint in the parent project from two subprojects backlogs, which do not share any version - Given I have selected the p1 project - And I am viewing the master backlog - Then I should see the product backlog - And I should see 5 stories in the product backlog - And I should see 1 sprint backlogs - And I should see the backlog of Sprint Sp001 - And I should see 0 stories in the sprint backlog of Sp001 - And The menu of the product backlog should allow to create a new Story in project p1 - And The menu of the product backlog should allow to create a new Story in project p1s1 - And The menu of the product backlog should allow to create a new Story in project p1s2 - And The menu of the sprint backlog of Sp001 should allow to create a new Story in project p1 - And The menu of the sprint backlog of Sp001 should allow to create a new Story in project p1s1 - And The menu of the sprint backlog of Sp001 should allow to create a new Story in project p1s2 -# When I drag story Story 3 to the sprint backlog of Sp001 -# Then Story 3 should be in the 1st position of the sprint named Sp001 -# When I drag story Story 4 to the sprint backlog of Sp001 -# Then Story 4 should be in the 2nd position of the sprint named Sp001 -# When I drag story Story 5 to the sprint backlog of Sp001 -# Then Story 5 should be in the 3rd position of the sprint named Sp001 -# When I drag story Story 6 to the sprint backlog of Sp001 before the story Story 4 -# Then Story 6 should be in the 2nd position of the sprint named Sp001 -# And I should see 4 stories in the sprint backlog of Sp001 diff --git a/features/shared-versions-chief_product_owner2.feature b/features/shared-versions-chief_product_owner2.feature deleted file mode 100644 index eecfe7931..000000000 --- a/features/shared-versions-chief_product_owner2.feature +++ /dev/null @@ -1,68 +0,0 @@ -@optional -Feature: Shared versions one backlog multiple subproject team sprints - As a chief project manager - I want to manage one backlogs but two teams - So that both teams work in their own sprint - - Background: - Given the ecookbook project has the backlogs plugin enabled - And sharing is enabled - And I have defined the following projects: - | name | - | p1 | - | p1s1 | - | p1s2 | - - And the p1 project has the backlogs plugin enabled - And the p1s1 project has the backlogs plugin enabled - And the p1s1 project is subproject of the p1 project - And the p1s2 project has the backlogs plugin enabled - And the p1s2 project is subproject of the p1 project - And no versions or issues exist - And I am a product owner of the project - And I have defined the following sprints: - | name | sprint_start_date | effective_date | sharing | project_id | - | Sp001 | 2010-01-01 | 2010-01-31 | hierarchy | p1s1 | - | Sp002 | 2010-01-01 | 2010-01-31 | hierarchy | p1s2 | - - And I have defined the following stories in the product backlog: - | subject | project_id | - | Story 1 | ecookbook | - | Story 2 | p1 | - | Story 3 | p1 | - | Story 4 | p1 | - | Story 5 | p1 | - | Story 6 | p1 | - - @javascript - Scenario: Plan 2 sprints of subprojects from the parent projects backlog - Given I have selected the p1 project - And I am viewing the master backlog - Then I should see the product backlog - And I should see 5 stories in the product backlog - And I should see 2 sprint backlogs - And I should see the backlog of Sprint Sp001 - And I should see the backlog of Sprint Sp002 - And I should see 0 stories in the sprint backlog of Sp001 - And I should see 0 stories in the sprint backlog of Sp002 - And The menu of the product backlog should allow to create a new Story in project p1 - And The menu of the product backlog should allow to create a new Story in project p1s1 - And The menu of the product backlog should allow to create a new Story in project p1s2 - And The menu of the sprint backlog of Sp001 should allow to create a new Story in project p1 - And The menu of the sprint backlog of Sp001 should allow to create a new Story in project p1s1 - And The menu of the sprint backlog of Sp002 should allow to create a new Story in project p1 - And The menu of the sprint backlog of Sp002 should allow to create a new Story in project p1s2 - And The menu of the sprint backlog of Sp001 should not allow to create a new Story in project p1s2 - And The menu of the sprint backlog of Sp002 should not allow to create a new Story in project p1s1 -# When I drag story Story 2 to the sprint backlog of Sp001 -# Then Story 2 should be in the 1st position of the sprint named Sp001 -# When I drag story Story 3 to the sprint backlog of Sp001 -# Then Story 3 should be in the 2nd position of the sprint named Sp001 -# When I drag story Story 4 to the sprint backlog of Sp002 -# Then Story 4 should be in the 1st position of the sprint named Sp002 -# When I drag story Story 5 to the sprint backlog of Sp002 -# Then Story 5 should be in the 2nd position of the sprint named Sp002 -# When I drag story Story 6 to the sprint backlog of Sp001 before the story Story 3 -# Then Story 6 should be in the 2nd position of the sprint named Sp001 -# And I should see 3 stories in the sprint backlog of Sp001 -# And I should see 2 stories in the sprint backlog of Sp002 diff --git a/features/shared-versions-pblpage.feature b/features/shared-versions-pblpage.feature deleted file mode 100644 index 1424151a6..000000000 --- a/features/shared-versions-pblpage.feature +++ /dev/null @@ -1,311 +0,0 @@ -Feature: Shared versions - As a project manager - I want to use shared versions - So that I can manage release over projects - - Background: - Given the ecookbook project has the backlogs plugin enabled - And sharing is enabled - And I have defined the following projects: - | name | - | p1 | - | p1s1 | - | p1s1s1 | - | p1s2 | - | p2 | - - And the p1 project has the backlogs plugin enabled - And the p2 project has the backlogs plugin enabled - And the p1s1 project has the backlogs plugin enabled - And the p1s1 project is subproject of the p1 project - And the p1s1s1 project has the backlogs plugin enabled - And the p1s1s1 project is subproject of the p1s1 project - And the p1s2 project has the backlogs plugin enabled - And the p1s2 project is subproject of the p1 project - And no versions or issues exist - And I am a product owner of the project - And I have defined the following sprints: - | name | sprint_start_date | effective_date | sharing | project_id | status | - | Sp001 | 2010-01-01 | 2010-01-31 | none | p1 | | - | Sp002 | 2010-01-01 | 2010-01-31 | tree | p1 | | - | Sp002c | 2010-01-01 | 2010-01-31 | tree | p1 | closed | - | Sp003 | 2010-01-01 | 2010-01-31 | none | p1s1 | | - | Sp004 | 2010-01-01 | 2010-01-31 | hierarchy | p1s1 | | - | Sp004c | 2009-08-08 | 2009-09-08 | hierarchy | p1s1 | closed | - | Sp005 | 2010-01-01 | 2010-01-31 | tree | p1s1 | | - | Sp006 | 2010-01-01 | 2010-01-31 | descendants | p1s1 | | - | Sp007 | 2010-01-01 | 2010-01-31 | none | p1s2 | | - | Sp009 | 2010-01-01 | 2010-01-31 | none | p1s1s1 | | - | Sp010 | 2010-01-01 | 2010-01-31 | hierarchy | p1s1s1 | | - | Sp011 | 2010-01-01 | 2010-01-31 | none | p2 | | - | Sp012 | 2010-01-01 | 2010-01-31 | system | p2 | | - | Sp013 | 2010-01-01 | 2010-01-31 | none | p1 | | - - And I have defined the following stories in the following sprints: - | subject | sprint | project_id | - | Story 1 | Sp001 | p1 | - | Story 2 | Sp002 | p1 | - | Story 3 | Sp003 | p1s1 | - | Story 4 | Sp004 | p1s1 | - | Story 5 | Sp005 | p1s1 | - | Story 6 | Sp006 | p1s1 | - | Story 7 | Sp007 | p1s2 | - | Story 9 | Sp009 | p1s1s1 | - | Story10 | Sp010 | p1s1s1 | - | Story11 | Sp011 | p2 | - | Story12 | Sp012 | p2 | - | Story13 | Sp013 | p1 | - - And I have defined the following stories in the product backlog: - | subject | project_id | - | Story a | ecookbook | - | Story b | p1 | - | Story c | p2 | - | Story d | p1s1 | - | Story e | p1s2 | - | Story f | p1s1s1 | - - And I have defined the following impediments: - | subject | sprint | blocks | - | Impediment 1 | Sp001 | Story 1 | - | Impediment 2 | Sp002 | Story 2 | - - Scenario: View the toplevel backlog page without sharing - Given I have selected the p1 project - And sharing is not enabled - And I am viewing the master backlog - Then I should see the product backlog - And I should see 3 sprint backlogs - And I should see 1 stories in the product backlog - - Scenario: View the toplevel backlog page with subprojects excluded - Given I have selected the p1 project - And the project selected not to include subprojects in the product backlog - And I am viewing the master backlog - Then I should see the product backlog - And I should see 1 stories in the product backlog - - @javascript - Scenario: View the toplevel backlog page with sharing defaults - Given I have selected the p1 project - And I am viewing the master backlog - Then I should see the product backlog - And I should see 4 stories in the product backlog - And I should see 7 sprint backlogs - And I should see the backlog of Sprint Sp001 - And I should see the backlog of Sprint Sp002 - And I should not see the backlog of Sprint Sp003 - And I should see the backlog of Sprint Sp004 - And I should see the backlog of Sprint Sp005 - And I should not see the backlog of Sprint Sp006 - And I should not see the backlog of Sprint Sp007 - And I should not see the backlog of Sprint Sp009 - And I should see the backlog of Sprint Sp010 - And I should not see the backlog of Sprint Sp011 - And I should see the backlog of Sprint Sp012 - And I should see the backlog of Sprint Sp013 - And I should see 1 stories in the sprint backlog of Sp001 - And I should see 1 stories in the sprint backlog of Sp002 - And I should see 1 stories in the sprint backlog of Sp013 - And I should see 1 stories in the sprint backlog of Sp004 - And I should see 1 stories in the sprint backlog of Sp005 - And I should see 1 stories in the sprint backlog of Sp010 - And I should see 1 stories in the sprint backlog of Sp012 -# When I drag story Story 2 to the product backlog before the story Story d -# Then the 2nd story in the product backlog should be Story 2 -# When I drag story Story12 to the product backlog before the story Story d -# Then story Story12 is unchanged -# And the 1st story in Sp012 should be Story12 -# When I drag story Story10 to the product backlog before the story Story d -# Then the 3rd story in the product backlog should be Story10 -# When I drag story Story 4 to the product backlog before the story Story d -# Then the 4th story in the product backlog should be Story 4 -# When I drag story Story 5 to the product backlog before the story Story d -# Then the 5th story in the product backlog should be Story 5 - - @javascript @optional - Scenario: View the subproject backlog page in the middle - Given I have selected the p1s1 project - And I am viewing the master backlog - Then I should see the product backlog - And I should see 2 stories in the product backlog - And I should see 7 sprint backlogs - And I should not see the backlog of Sprint Sp001 - And I should see the backlog of Sprint Sp002 - And I should see the backlog of Sprint Sp003 - And I should see the backlog of Sprint Sp004 - And I should see the backlog of Sprint Sp005 - And I should see the backlog of Sprint Sp006 - And I should not see the backlog of Sprint Sp007 - And I should not see the backlog of Sprint Sp009 - And I should see the backlog of Sprint Sp010 - And I should not see the backlog of Sprint Sp011 - And I should see the backlog of Sprint Sp012 - And I should not see the backlog of Sprint Sp013 - Then The menu of the product backlog should not allow to create a new Story in project p1 - And The menu of the product backlog should not allow to create a new Story in project p2 - And The menu of the product backlog should allow to create a new Story in project p1s1 - And The menu of the product backlog should allow to create a new Story in project p1s1s1 - And The menu of the sprint backlog of Sp002 should allow to create a new Story in project p1 - And The menu of the sprint backlog of Sp002 should allow to create a new Story in project p1s1 - And The menu of the sprint backlog of Sp002 should allow to create a new Story in project p1s1s1 - And The menu of the sprint backlog of Sp002 should allow to create a new Story in project p1s2 - And The menu of the sprint backlog of Sp002 should not allow to create a new Story in project p2 - And The menu of the sprint backlog of Sp003 should allow to create a new Story in project p1s1 - And The menu of the sprint backlog of Sp003 should not allow to create a new Story in project p1 - And The menu of the sprint backlog of Sp003 should not allow to create a new Story in project p1s1s1 - And The menu of the sprint backlog of Sp003 should not allow to create a new Story in project p2 - And The menu of the sprint backlog of Sp004 should allow to create a new Story in project p1 - And The menu of the sprint backlog of Sp004 should allow to create a new Story in project p1s1 - And The menu of the sprint backlog of Sp004 should allow to create a new Story in project p1s1s1 - And The menu of the sprint backlog of Sp004 should not allow to create a new Story in project p2 - And The menu of the sprint backlog of Sp005 should allow to create a new Story in project p1 - And The menu of the sprint backlog of Sp005 should allow to create a new Story in project p1s1 - And The menu of the sprint backlog of Sp005 should allow to create a new Story in project p1s1s1 - And The menu of the sprint backlog of Sp005 should allow to create a new Story in project p1s2 - And The menu of the sprint backlog of Sp005 should not allow to create a new Story in project p2 - - And The menu of the sprint backlog of Sp006 should allow to create a new Story in project p1s1 - And The menu of the sprint backlog of Sp006 should allow to create a new Story in project p1s1s1 - And The menu of the sprint backlog of Sp006 should not allow to create a new Story in project p1 - And The menu of the sprint backlog of Sp006 should not allow to create a new Story in project p1s2 - And The menu of the sprint backlog of Sp006 should not allow to create a new Story in project p2 - And The menu of the sprint backlog of Sp010 should allow to create a new Story in project p1 - And The menu of the sprint backlog of Sp010 should allow to create a new Story in project p1s1 - And The menu of the sprint backlog of Sp010 should allow to create a new Story in project p1s1s1 - And The menu of the sprint backlog of Sp010 should not allow to create a new Story in project p1s2 - And The menu of the sprint backlog of Sp010 should not allow to create a new Story in project p2 - And The menu of the sprint backlog of Sp012 should allow to create a new Story in project p1 - And The menu of the sprint backlog of Sp012 should allow to create a new Story in project p1s1 - And The menu of the sprint backlog of Sp012 should allow to create a new Story in project p1s1s1 - And The menu of the sprint backlog of Sp012 should allow to create a new Story in project p1s2 - And The menu of the sprint backlog of Sp012 should allow to create a new Story in project p2 -# When I drag story Story 3 to the product backlog -# Then the 3rd story in the product backlog should be Story 3 -# When I drag story Story10 to the product backlog -# Then the 4th story in the product backlog should be Story10 -# When I drag story Story 2 to the sprint backlog of Sp004 -# Then the 2nd story in Sp004 should be Story 2 -# When I drag story Story 2 to the sprint backlog of Sp005 -# Then the 2nd story in Sp005 should be Story 2 -# When I drag story Story 2 to the sprint backlog of Sp012 before the story Story12 -# Then the 1st story in Sp012 should be Story 2 -# When I drag story Story12 to the product backlog -# Then story Story12 is unchanged -# And the 2nd story in Sp012 should be Story12 -# When I drag story Story12 to the product backlog -# Then story Story12 is unchanged -# And the 2nd story in Sp012 should be Story12 -# When I drag story Story 2 to the sprint backlog of Sp003 -# Then story Story 2 is unchanged -# And the 1st story in Sp012 should be Story 2 -# When I drag story Story 2 to the sprint backlog of Sp006 -# Then story Story 2 is unchanged -# And the 1st story in Sp012 should be Story 2 -# When I drag story Story12 to the sprint backlog of Sp002 -# Then story Story12 is unchanged -# And the 2nd story in Sp012 should be Story12 -# When I drag story Story12 to the sprint backlog of Sp003 -# Then story Story12 is unchanged -# And the 2nd story in Sp012 should be Story12 -# When I drag story Story12 to the sprint backlog of Sp004 -# Then story Story12 is unchanged -# And the 2nd story in Sp012 should be Story12 -# When I drag story Story12 to the sprint backlog of Sp005 -# Then story Story12 is unchanged -# And the 2nd story in Sp012 should be Story12 -# When I drag story Story12 to the sprint backlog of Sp006 -# Then story Story12 is unchanged -# And the 2nd story in Sp012 should be Story12 -# When I drag story Story12 to the sprint backlog of Sp010 -# Then story Story12 is unchanged -# And the 2nd story in Sp012 should be Story12 -# When I drag story Story12 to the sprint backlog of Sp012 before the story Story 2 -# Then the 1st story in Sp012 should be Story12 -# When I drag story Story f to the sprint backlog of Sp003 -# Then story Story f is unchanged -# And the 2nd story in the product backlog should be Story f - - @optional - Scenario: View the subproject backlog page at a leaf project - Given I have selected the p1s1s1 project - And I am viewing the master backlog - Then I should see the product backlog - And I should see 1 stories in the product backlog - And I should see 7 sprint backlogs - And I should not see the backlog of Sprint Sp001 - And I should see the backlog of Sprint Sp002 - And I should not see the backlog of Sprint Sp003 - And I should see the backlog of Sprint Sp004 - And I should see the backlog of Sprint Sp005 - And I should see the backlog of Sprint Sp006 - And I should not see the backlog of Sprint Sp007 - And I should see the backlog of Sprint Sp009 - And I should see the backlog of Sprint Sp010 - And I should not see the backlog of Sprint Sp011 - And I should see the backlog of Sprint Sp012 - And I should not see the backlog of Sprint Sp013 - - @optional - Scenario: View the subproject backlog page at a middle leaf project - Given I have selected the p1s2 project - And I am viewing the master backlog - Then I should see the product backlog - And I should see 1 stories in the product backlog - And I should see 4 sprint backlogs - And I should not see the backlog of Sprint Sp001 - And I should see the backlog of Sprint Sp002 - And I should not see the backlog of Sprint Sp003 - And I should not see the backlog of Sprint Sp004 - And I should see the backlog of Sprint Sp005 - And I should not see the backlog of Sprint Sp006 - And I should see the backlog of Sprint Sp007 - And I should not see the backlog of Sprint Sp009 - And I should not see the backlog of Sprint Sp010 - And I should not see the backlog of Sprint Sp011 - And I should see the backlog of Sprint Sp012 - And I should not see the backlog of Sprint Sp013 - - @optional - Scenario: View the subproject backlog page of a separate project - Given I have selected the p2 project - And I am viewing the master backlog - Then I should see the product backlog - And I should see 1 stories in the product backlog - And I should see 2 sprint backlogs - And I should not see the backlog of Sprint Sp001 - And I should not see the backlog of Sprint Sp002 - And I should not see the backlog of Sprint Sp003 - And I should not see the backlog of Sprint Sp004 - And I should not see the backlog of Sprint Sp005 - And I should not see the backlog of Sprint Sp006 - And I should not see the backlog of Sprint Sp007 - And I should not see the backlog of Sprint Sp009 - And I should not see the backlog of Sprint Sp010 - And I should see the backlog of Sprint Sp011 - And I should see the backlog of Sprint Sp012 - And I should not see the backlog of Sprint Sp013 - - @javascript - Scenario: View closed sprints on toplevel project - Given I have selected the p1 project - And I am viewing the master backlog - Then I should see the product backlog - And I should not see the backlog of Sprint Sp002c - And I should not see the backlog of Sprint Sp004c - When I request the completed sprints - Then I should see the backlog of Sprint Sp002c - And I should see the backlog of Sprint Sp004c - - @javascript @optional - Scenario: View closed sprints on the middle project - Given I have selected the p1s1 project - And I am viewing the master backlog - Then I should see the product backlog - And I should not see the backlog of Sprint Sp002c - And I should not see the backlog of Sprint Sp004c - When I request the completed sprints - Then I should see the backlog of Sprint Sp002c - And I should see the backlog of Sprint Sp004c - - diff --git a/features/shared-versions-positioning.feature b/features/shared-versions-positioning.feature deleted file mode 100644 index 6b9b62d23..000000000 --- a/features/shared-versions-positioning.feature +++ /dev/null @@ -1,202 +0,0 @@ -Feature: Chief Product Owner story ordering - As a product owner - I want to delegate story management to sub project owners - So that they can priorize the subproject but have minimal impact on the overall ordering - - Background: - Given the ecookbook project has the backlogs plugin enabled - And the subproject1 project has the backlogs plugin enabled - And sharing is enabled - And I have selected the ecookbook project - And no versions or issues exist - And I am a product owner of the project - And I have defined the following stories in the product backlog: - | subject | project_id | - | Story 1 | ecookbook | - | Story 2 | ecookbook | - | Story 6 | subproject1 | - | Story 7 | subproject1 | - | Story 3 | ecookbook | - | Story 4 | ecookbook | - | Story 5 | ecookbook | - | Story 8 | subproject1 | - | Story 9 | subproject1 | - And I have defined the following sprints: - | name | sprint_start_date | effective_date | sharing | project_id | - | Sp001 | 2010-01-01 | 2010-01-31 | descendants | ecookbook | - And I have defined the following stories in the following sprints: - | subject | sprint | project_id | - | Story A | Sp001 | ecookbook | - | Story B | Sp001 | subproject1 | - - @optional - Scenario: View the toplevel product backlog - Given I am viewing the master backlog - Then I should see the product backlog - And I should see 9 stories in the product backlog - And I should see 1 sprint backlogs - And the 1st story in the product backlog should be Story 1 - And the 2nd story in the product backlog should be Story 2 - And the 3rd story in the product backlog should be Story 6 - And the 4th story in the product backlog should be Story 7 - And the 5th story in the product backlog should be Story 3 - And the 6th story in the product backlog should be Story 4 - And the 7th story in the product backlog should be Story 5 - And the 8th story in the product backlog should be Story 8 - And the 9th story in the product backlog should be Story 9 - - @optional - Scenario: View the sub product backlog - Given I have selected the subproject1 project - And I am viewing the master backlog - Then I should see the product backlog - And I should see 4 stories in the product backlog - And I should see 1 sprint backlogs - And the 1st story in the product backlog should be Story 6 - And the 2nd story in the product backlog should be Story 7 - And the 3rd story in the product backlog should be Story 8 - And the 4th story in the product backlog should be Story 9 - - Scenario: Move story 7 in subproject to 3rd pos and expect 7 to be before 9 and after 8 - Given I have selected the subproject1 project - And I am viewing the master backlog - Then I should see the product backlog - When I move the 2nd story to the 3rd position - Then the 1st story in the product backlog should be Story 6 - And the 2nd story in the product backlog should be Story 8 - And the 3rd story in the product backlog should be Story 7 - And the 4th story in the product backlog should be Story 9 - Given I have selected the ecookbook project - And I am viewing the master backlog - Then I should see the product backlog - And the 1st story in the product backlog should be Story 1 - And the 2nd story in the product backlog should be Story 2 - And the 3rd story in the product backlog should be Story 6 - And the 4th story in the product backlog should be Story 3 - And the 5th story in the product backlog should be Story 4 - And the 6th story in the product backlog should be Story 5 - And the 7th story in the product backlog should be Story 8 - And the 8th story in the product backlog should be Story 7 - And the 9th story in the product backlog should be Story 9 - - @optional - Scenario: Move story 6 in subproject to 2nd pos and expect 6 to be after 5 and before 8 - Given I have selected the subproject1 project - And I am viewing the master backlog - Then I should see the product backlog - When I move the 1st story to the 2nd position - Then the 1st story in the product backlog should be Story 7 - And the 2nd story in the product backlog should be Story 6 - And the 3rd story in the product backlog should be Story 8 - And the 4th story in the product backlog should be Story 9 - Given I have selected the ecookbook project - And I am viewing the master backlog - Then I should see the product backlog - And the 1st story in the product backlog should be Story 1 - And the 2nd story in the product backlog should be Story 2 - And the 3rd story in the product backlog should be Story 7 - And the 4th story in the product backlog should be Story 3 - And the 5th story in the product backlog should be Story 4 - And the 6th story in the product backlog should be Story 5 - And the 7th story in the product backlog should be Story 6 - And the 8th story in the product backlog should be Story 8 - And the 9th story in the product backlog should be Story 9 - - Scenario: Move story 7 in subproject to the top and expect 7 to be after 2 and before 6 - Given I have selected the subproject1 project - And I am viewing the master backlog - Then I should see the product backlog - When I move the 2nd story to the 1st position - Then the 1st story in the product backlog should be Story 7 - And the 2nd story in the product backlog should be Story 6 - And the 3rd story in the product backlog should be Story 8 - And the 4th story in the product backlog should be Story 9 - Given I have selected the ecookbook project - And I am viewing the master backlog - Then I should see the product backlog - And the 1st story in the product backlog should be Story 1 - And the 2nd story in the product backlog should be Story 2 - And the 3rd story in the product backlog should be Story 7 - And the 4th story in the product backlog should be Story 6 - And the 5th story in the product backlog should be Story 3 - And the 6th story in the product backlog should be Story 4 - And the 7th story in the product backlog should be Story 5 - And the 8th story in the product backlog should be Story 8 - And the 9th story in the product backlog should be Story 9 - - @optional - Scenario: Move story 8 in subproject to 2nd pos and expect 8 to be after 6 and before 7 - Given I have selected the subproject1 project - And I am viewing the master backlog - Then I should see the product backlog - When I move the 3rd story to the 2nd position - Then the 1st story in the product backlog should be Story 6 - And the 2nd story in the product backlog should be Story 8 - And the 3rd story in the product backlog should be Story 7 - And the 4th story in the product backlog should be Story 9 - Given I have selected the ecookbook project - And I am viewing the master backlog - Then I should see the product backlog - And the 1st story in the product backlog should be Story 1 - And the 2nd story in the product backlog should be Story 2 - And the 3rd story in the product backlog should be Story 6 - And the 4th story in the product backlog should be Story 8 - And the 5th story in the product backlog should be Story 7 - And the 6th story in the product backlog should be Story 3 - And the 7th story in the product backlog should be Story 4 - And the 8th story in the product backlog should be Story 5 - And the 9th story in the product backlog should be Story 9 - - @optional - Scenario: Move story 9 in subproject to 3rd pos and expect 9 to be after 5 and before 8 - Given I have selected the subproject1 project - And I am viewing the master backlog - Then I should see the product backlog - When I move the 4th story to the 3rd position - Then the 1st story in the product backlog should be Story 6 - And the 2nd story in the product backlog should be Story 7 - And the 3rd story in the product backlog should be Story 9 - And the 4th story in the product backlog should be Story 8 - Given I have selected the ecookbook project - And I am viewing the master backlog - Then I should see the product backlog - And the 1st story in the product backlog should be Story 1 - And the 2nd story in the product backlog should be Story 2 - And the 3rd story in the product backlog should be Story 6 - And the 4th story in the product backlog should be Story 7 - And the 5th story in the product backlog should be Story 3 - And the 6th story in the product backlog should be Story 4 - And the 7th story in the product backlog should be Story 5 - And the 8th story in the product backlog should be Story 9 - And the 9th story in the product backlog should be Story 8 - - @optional - Scenario: Move story 7 in subproject to the bottom and expect 7 to be after 9 - Given I have selected the subproject1 project - And I am viewing the master backlog - Then I should see the product backlog - When I move the 2nd story to the 4th position - Then the 1st story in the product backlog should be Story 6 - And the 2nd story in the product backlog should be Story 8 - And the 3rd story in the product backlog should be Story 9 - And the 4th story in the product backlog should be Story 7 - Given I have selected the ecookbook project - And I am viewing the master backlog - Then I should see the product backlog - And the 1st story in the product backlog should be Story 1 - And the 2nd story in the product backlog should be Story 2 - And the 3rd story in the product backlog should be Story 6 - And the 4th story in the product backlog should be Story 3 - And the 5th story in the product backlog should be Story 4 - And the 6th story in the product backlog should be Story 5 - And the 7th story in the product backlog should be Story 8 - And the 8th story in the product backlog should be Story 9 - And the 9th story in the product backlog should be Story 7 - -# Scenario: Create new story in subproject and expect it to be before the first of subproject but after all others which where before already -# Scenario: Move a story from a sprint back to the subproject backlog at the top -# Scenario: Move a story from a sprint back to the subproject backlog at the 2nd position -# Scenario: Move a story from a sprint back to the subproject backlog at the 3rd position -# Scenario: Move a story from a sprint back to the subproject backlog at the bottom -# Scenario: Create a new story in subproject when new stories default to top and expect it before 6 and after 2 -# Scenario: Create a new story in subproject when new stories default to bottom and expect after 9 diff --git a/features/shared-versions-scrum_master-dnd.feature b/features/shared-versions-scrum_master-dnd.feature deleted file mode 100644 index 0bb0b8b5d..000000000 --- a/features/shared-versions-scrum_master-dnd.feature +++ /dev/null @@ -1,67 +0,0 @@ -Feature: Scrum Master impediments - As a scrum master - I want to create impediments across projects - So that I can mitigate issues to ensure the process is improved continuously. - - Background: - Given the ecookbook project has the backlogs plugin enabled - And the subproject1 project has the backlogs plugin enabled - And sharing is enabled - And cross_project_issue_relations is enabled - And I have selected the ecookbook project - And no versions or issues exist - And I am a scrum master of the project - And I have deleted all existing issues - And I have defined the following sprints: - | name | sprint_start_date | effective_date | project_id | sharing | - | Sprint 001 | 2010-01-01 | 2010-01-31 | ecookbook | descendants | - | Sprint 002 | 2010-02-01 | 2010-02-28 | ecookbook | descendants | - And I have defined the following stories in the following sprints: - | subject | sprint | project_id | - | Story 1 | Sprint 001 | ecookbook | - | Story 2 | Sprint 001 | ecookbook | - | Story 3 | Sprint 001 | subproject1 | - | Story 4 | Sprint 002 | ecookbook | - And I have defined the following tasks: - | subject | story | - | Task 1 | Story 1 | - | Task 2 | Story 2 | - | Task 3 | Story 3 | - | Task 4 | Story 4 | - And I have defined the following impediments: - | subject | sprint | blocks | - | Impediment 1 | Sprint 001 | Story 1 | - | Impediment 3 | Sprint 001 | Story 3 | - - @javascript - Scenario: Create an impediment using the ajax task editor - Given I am viewing the taskboard for Sprint 001 - Then I should see the taskboard - When I create an impediment named Impediment 4 which blocks Task 1 - Then impediment Impediment 4 should be created without error - And I should see impediment Impediment 4 in the state New - - @javascript @optional - Scenario: Create an impediment using the ajax task editor for a sub-project - Given I am viewing the taskboard for Sprint 001 - Then I should see the taskboard - When I create an impediment named Impediment 5 which blocks Task 3 - Then impediment Impediment 5 should be created without error - And I should see impediment Impediment 5 in the state New - - @javascript @optional - Scenario: Create an impediment using the ajax task editor for a sub-project with 2 blocks and cpir disabled - Given I am viewing the taskboard for Sprint 001 - And cross_project_issue_relations is disabled - Then I should see the taskboard - When I create an impediment named Impediment 6 which blocks Task 3 and Task 4 - Then I should see a msgbox with "Validation failed: Related issue doesn't belong to the same project" - - @javascript @optional - Scenario: Create an impediment using the ajax task editor for a sub-project with 2 blocks and cpir enabled - Given I am viewing the taskboard for Sprint 001 - Then I should see the taskboard - When I create an impediment named Impediment 6 which blocks Task 3 and Task 4 - Then impediment Impediment 6 should be created without error - Then I should see impediment Impediment 6 in the state New - diff --git a/features/shared-versions-team_member-dnd.feature b/features/shared-versions-team_member-dnd.feature deleted file mode 100644 index 81c6b967c..000000000 --- a/features/shared-versions-team_member-dnd.feature +++ /dev/null @@ -1,70 +0,0 @@ -Feature: Team Member - As a team member - I want to drag tasks on a sprint shared across projects - So that I can update everyone on the status of the sprint - - Background: - Given the ecookbook project has the backlogs plugin enabled - And the subproject1 project has the backlogs plugin enabled - And sharing is enabled - And I have selected the ecookbook project - And no versions or issues exist - And I am a team member of the project - And I have deleted all existing issues - And I have defined the following sprints: - | name | sprint_start_date | effective_date | project_id | sharing | - | Sprint 001 | 2010-01-01 | 2010-01-31 | ecookbook | descendants | - | Sprint 002 | 2010-02-01 | 2010-02-28 | ecookbook | descendants | - And I have defined the following stories in the following sprints: - | subject | sprint | project_id | - | Story 1 | Sprint 001 | ecookbook | - | Story 2 | Sprint 001 | ecookbook | - | Story 3 | Sprint 001 | subproject1 | - | Story 4 | Sprint 002 | ecookbook | - And I have defined the following tasks: - | subject | story | - | Task 1 | Story 1 | - | Task 2 | Story 2 | - | Task 3 | Story 3 | - And I have defined the following impediments: - | subject | sprint | blocks | - | Impediment 1 | Sprint 001 | Story 1 | - | Impediment 3 | Sprint 001 | Story 3 | - - @javascript - Scenario: View a taskboard - Given I am viewing the taskboard for Sprint 001 - Then I should see the taskboard - And I should see task Task 1 in the row of story Story 1 in the state New - And I should see task Task 2 in the row of story Story 2 in the state New - And I should see task Task 3 in the row of story Story 3 in the state New - And I should see impediment Impediment 1 in the state New - And I should see impediment Impediment 3 in the state New - - @javascript @optional - Scenario: Drag a task to a new state in the same story - Given I am viewing the taskboard for Sprint 001 - Then I should see the taskboard - When I drag task Task 1 to the state Assigned in the row of Story 1 - Then I should see task Task 1 in the row of story Story 1 in the state Assigned - And task Task 1 should have the status Assigned - - @javascript - Scenario: Drag a task of a subproject to a new state in the same story - Given I am viewing the taskboard for Sprint 001 - Then I should see the taskboard - When I drag task Task 3 to the state Assigned in the row of Story 3 - Then I should see task Task 3 in the row of story Story 3 in the state Assigned - And task Task 3 should have the status Assigned - - @javascript - Scenario: Drag a task to a new state in another story - Given I am viewing the taskboard for Sprint 001 - Then I should see the taskboard - When I drag task Task 1 to the state Assigned in the row of Story 2 - Then I should see task Task 1 in the row of story Story 2 in the state Assigned - And task Task 1 should have the status Assigned - #negative test: drag into a disabled area (other project) - When I drag task Task 1 to the state New in the row of Story 3 - Then I should see task Task 1 in the row of story Story 2 in the state Assigned - And task Task 1 should have the status Assigned diff --git a/features/shared-versions.feature b/features/shared-versions.feature deleted file mode 100644 index 18c97440a..000000000 --- a/features/shared-versions.feature +++ /dev/null @@ -1,75 +0,0 @@ -Feature: Shared versions - As a project manager - I want to use shared versions - So that I can manage release over projects - - Background: - Given the ecookbook project has the backlogs plugin enabled - And the private-child project has the backlogs plugin enabled - And the project6 project has the backlogs plugin enabled - And the onlinestore project has the backlogs plugin enabled - And sharing is enabled - And no versions or issues exist - And I am a team member of the project - - And I have defined the following sprints: - | name | sprint_start_date | effective_date | sharing | project_id | - | Sprint 001 | 2010-01-01 | 2010-01-31 | hierarchy | ecookbook | - | Sprint 002 | 2010-02-01 | 2010-02-28 | none | private-child | - | Sprint 003 | 2010-03-01 | 2010-03-31 | tree | project6 | - | Sprint 004 | 2010-03-01 | 2010-03-31 | system | onlinestore | - - And I have defined the following stories in the following sprints: - | subject | sprint | project_id | - | Story 1 | Sprint 001 | ecookbook | - | Story 2 | Sprint 001 | ecookbook | - | Story 3 | Sprint 001 | ecookbook | - | Story 4 | Sprint 002 | private-child | - - And I have defined the following tasks: - | subject | story | - | Task 1 | Story 1 | - - And I have defined the following impediments: - | subject | sprint | blocks | - | Impediment 1 | Sprint 001 | Story 1 | - | Impediment 2 | Sprint 001 | Story 2 | - - Scenario: Create a task for a story - Given I have selected the ecookbook project - And I am viewing the taskboard for Sprint 001 - And I want to create a task for Story 1 - And I set the subject of the task to A Whole New Task - When I create the task - And the 2nd task for Story 1 should be A Whole New Task - - Scenario: Update a task for a story - Given I have selected the ecookbook project - And I am viewing the taskboard for Sprint 001 - And I want to edit the task named Task 1 - And I set the subject of the task to Whoa there, Sparky - When I update the task - Then the story named Story 1 should have 1 task named Whoa there, Sparky - - Scenario: View a taskboard - Given I have selected the ecookbook project - And I am viewing the taskboard for Sprint 001 - Then I should see the taskboard - - Scenario: View the burndown chart - Given I have selected the ecookbook project - And I am viewing the burndown for Sprint 002 - Then I should see the burndown chart - - Scenario: View sprint stories in the issues tab - Given I have selected the ecookbook project - And I am viewing the master backlog - When I view the stories of Sprint 001 in the issues tab - Then I should see the Issues page - - Scenario: View the project stories in the issues tab - Given I have selected the ecookbook project - And I am viewing the master backlog - When I view the stories in the issues tab - Then I should see the Issues page - diff --git a/features/sidebar.feature b/features/sidebar.feature deleted file mode 100644 index 34b0b31d5..000000000 --- a/features/sidebar.feature +++ /dev/null @@ -1,81 +0,0 @@ -Feature: Sidebar, which requires javascript to show - As a user - I want to have useful links in the redmine sidebar - So that i can quickly navigate to relevant views - - Background: - Given the ecookbook project has the backlogs plugin enabled - And I am a team member of the project - And the current date is 2009-11-04 - And I have defined the following sprints: - | name | sprint_start_date | effective_date | - | Sprint 001 | 2010-01-01 | 2010-01-31 | - | Sprint 002 | 2010-02-01 | 2010-02-28 | - And I have defined the following stories in the product backlog: - | subject | - | Story 1 | - And I have defined the following stories in the following sprints: - | subject | sprint | - | Story A | Sprint 001 | - | Story B | Sprint 002 | - And backlogs setting show_burndown_in_sidebar is enabled - - @javascript - Scenario: Look at the sidebar on the default issues page - Given I am viewing the issues list - Then I should see "Sprints" within "#sidebar" - And I should see "Sprint 001" within "#sidebar" - And I should see "Sprint 002" within "#sidebar" - And I should see "eCookbook" within "#sidebar" - And I should see "Product backlog" within "#sidebar" - - @javascript - Scenario: Go to the sprint which is current - Given I am viewing the issues list - When I follow "Sprint 001" - Then I should see "Issues" within "#content" - And I should see "Story A" within "#content" - And I should see "Task board" within "#sidebar" - And I should see "Burndown" within "#sidebar" - And I should see "Sprint cards" within "#sidebar" - And I should see "Wiki" within "#sidebar" - And I should see "Impediments" within "#sidebar" - And I should see the mini-burndown-chart in the sidebar -#TODO: from here click on Task board, Burndown, Impediments - - @javascript - Scenario: Go to the sprint which is current and then to the task board - Given I am viewing the issues list - When I follow "Sprint 001" - And I follow "Task board" - Then show me a screenshot at /tmp/1.png - Then I should see the taskboard - - @javascript - Scenario: Go to the sprint which is current and then to the burndown - Given I am viewing the issues list - When I follow "Sprint 001" - And I follow "Burndown" - Then show me a screenshot at /tmp/1.png - Then I should see the burndown chart of sprint Sprint 001 - - @javascript - Scenario: Go to the product backlog using the sidebar - Given I am viewing the issues list - Then I should see "Product backlog" within "#sidebar" - When I follow "Product backlog" - And I should see "Issues" within "#content" - And I should see "Story 1" within "#content" - -# TODO: -# @javascript -# Scenario: Open backlog cards using the sidebar -# Given I am viewing the issues list -# Then I should see "Product backlog cards" within "#sidebar" -# When I follow "Product backlog cards" -# And I should see "Issues" within "#content" -# And I should see "Story 1" within "#content" - -# @javascript -# Scenario: Check the url of the javascript snippet which loads the rb sidebar features - when using a relative url not on / -# Given I am viewing the issues list diff --git a/features/step_definitions/_given_steps.rb b/features/step_definitions/_given_steps.rb deleted file mode 100644 index ca7fbe60b..000000000 --- a/features/step_definitions/_given_steps.rb +++ /dev/null @@ -1,673 +0,0 @@ -require 'rubygems' -require 'timecop' -require 'chronic' - -Before do - Timecop.return - @projects = nil - @sprint = nil - @story = nil - #sanitize settings, they spill over from previous tests - Backlogs.setting[:include_sat_and_sun] = false - Backlogs.setting[:sharing_enabled] = false - Backlogs.setting[:story_follow_task_status] = nil - Backlogs.setting[:release_burnup_enabled] = 'enabled' - Backlogs.setting[:new_story_position] = 'top' - Backlogs.setting[:sharing_new_sprint_sharingmode] = nil - Backlogs.setting[:new_story_position] = 'top' - Time.zone = 'UTC' -end - -After do |scenario| - Timecop.return -end - -Given /^I am admin$/ do - login_as_admin -end - -Given /^I am a product owner of the project$/ do - login_as_product_owner -end - -Given /^I am a scrum master of the project$/ do - login_as_scrum_master -end - -#must not login twice on redmine 2.3 -Given /^I am a scrum master of all projects$/ do - setup_permissions('scrum master') -end - -Given /^I am a team member of the project$/ do - login_as_team_member -end - -Given /^I am logged out$/ do - logout -end - -Given /^I am viewing the master backlog$/ do - visit url_for(:controller => :projects, :action => :show, :id => @project.identifier, :only_path=>true) - verify_request_status(200) - click_link("Backlogs") - page.current_path.should == url_for(:controller => :rb_master_backlogs, :action => :show, :project_id => @project.identifier, :only_path=>true) - verify_request_status(200) -end - -Then /^at ([0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2})$/ do |time| - set_now(time, :msg => "at #{time}") -end -Then /^on ([0-9]{4}-[0-9]{2}-[0-9]{2})$/ do |date| - set_now(time, :msg => "on #{date}") -end -Then /^after (the current )?sprint(.*)$/ do |current, name| - raise "Improperly phrased" if (current == '' && name == '') || (current != '' && name != '') - sprint = current == '' ? RbSprint.find_by_name(name) : current_sprint - set_now(sprint.effective_date + 1, :msg => "after sprint #{sprint.name}") -end - -Given /^the current (time|date) (is|forwards to) (.+)$/ do |what, action, time| - reset = case action - when 'is' then true - when 'forwards to' then false - else raise "I don't know how to #{action} time" - end - set_now(time, :msg => "#{what} #{action} #{time}", :reset => reset) -end - -Given /^I am viewing the burndown for (.+)$/ do |sprint_name| - visit url_for(:controller => :rb_burndown_charts, :action => :show, :sprint_id => current_sprint(sprint_name).id, :only_path=>true) - verify_request_status(200) -end - -Given /^I am viewing the taskboard for (.+)$/ do |sprint_name| - visit url_for(:controller => :rb_taskboards, :action => :show, :sprint_id => current_sprint(sprint_name).id, :only_path=>true) - verify_request_status(200) -end - -Given /^I am viewing the backlog settings page for project (.*)$/ do |project_name| - visit url_for(:controller => :projects, :action => :settings, :id => Project.find(project_name).id, :tab => 'backlogs', :only_path=>true) - verify_request_status(200) -end - -Given /^I set the (.+) of the story to (.+)$/ do |attribute, value| - if attribute=="tracker" - attribute="tracker_id" - value = Tracker.where(name: value).first.id - elsif attribute=="status" - attribute="status_id" - value = IssueStatus.where(name: value).first.id - end - @story_params[attribute] = value -end - -Given /^I set the (.+) of the task to (.+)$/ do |attribute, value| - value = '' if value == 'an empty string' - if attribute=="assigned_to" - attribute="assigned_to_id" - value = User.where(login: value).first.id - end - @task_params[attribute] = value -end - -Given /^I add the tracker (.+) to the story trackers$/ do |tracker| - tracker_id = Tracker.where(name: tracker).first.id - @project.update_attribute :tracker_ids, (@project.tracker_ids << tracker_id) - t = Backlogs.setting[:story_trackers] - t << tracker_id - Backlogs.setting[:story_trackers] = t -end - -Given /^I set the default story tracker to (.+)$/ do |tracker| - t = get_tracker(tracker) - Backlogs.setting[:default_story_tracker] = t.id.to_s -end - -Given /^I want to create a story$/ do - @story_params = initialize_story_params -end - -Given /^I want to create a task for (.+)$/ do |story_subject| - story = RbStory.where(subject: story_subject).first - @task_params = initialize_task_params(story.id) -end - -Given /^I want to create an impediment for (.+)$/ do |sprint_subject| - sprint = RbSprint.where(name: sprint_subject ).first - @impediment_params = initialize_impediment_params(:project_id => sprint.project_id, :fixed_version_id => sprint.id) -end - -Given /^I want to create a sprint$/ do - @sprint_params = initialize_sprint_params -end - -Given /^I want to edit the task named (.+)$/ do |task_subject| - task = RbTask.where(:subject => task_subject ).first - task.should_not be_nil - @task_params = HashWithIndifferentAccess.new(task.attributes) -end - -Given /^I want to edit the impediment named (.+)$/ do |impediment_subject| - impediment = RbTask.where(subject: impediment_subject ).first - impediment.should_not be_nil - @impediment_params = HashWithIndifferentAccess.new(impediment.attributes) -end - -Given /^I want to edit the sprint named (.+)$/ do |name| - sprint = RbSprint.find_by_name(name) - sprint.should_not be_nil - @sprint_params = HashWithIndifferentAccess.new(sprint.attributes) -end - -Given /^I want to indicate that the impediment blocks (.+)$/ do |blocks_csv| - blocks_csv = RbStory.where( :subject => blocks_csv.split(', ') ).map{ |s| s.id }.join(',') - @impediment_params[:blocks] = blocks_csv -end - -Given /^I want to set the (.+) of the sprint to (.+)$/ do |attribute, value| - value = '' if value == "an empty string" - @sprint_params[attribute] = value -end - -Given /^I want to set the (.+) of the impediment to (.+)$/ do |attribute, value| - value = '' if value == "an empty string" - @impediment_params[attribute] = value -end - -Given /^I want to edit the story with subject (.+)$/ do |subject| - @story = RbStory.where(subject: subject).first - @story.should_not be_nil - @story_params = HashWithIndifferentAccess.new(@story.attributes) -end - -Given /^backlogs is configured$/ do - Backlogs.configured?.should be true -end - - -Given /^the (.*) project has the backlogs plugin enabled$/ do |project_id| - @project = get_project(project_id) - @projects = [] if @projects.nil? - @projects.push(@project) - @project.should_not be_nil - - # Enable the backlogs plugin - @project.enable_module!('backlogs') - - defaultstatus = IssueStatus.find_by(:name => 'New') - # Configure the story and task trackers - story_trackers = [(Tracker.find_by_name('Story') || Tracker.create!(:name => 'Story', :default_status => defaultstatus))] - task_tracker = (Tracker.find_by_name('Task') || Tracker.create!(:name => 'Task', :default_status => defaultstatus)) - - copy_from = Tracker.find_by(:name => 'Feature request') - story_trackers.each{|tracker| - if copy_from.respond_to? :workflow_rules #redmine 2 master - tracker.workflow_rules.copy(copy_from) - else - tracker.workflows.copy(copy_from) - end - } - copy_from = Tracker.find_by(:name => 'Bug') - if copy_from.respond_to? :workflow_rules - task_tracker.save! - task_tracker.workflow_rules.copy(copy_from) - else - task_tracker.workflows.copy(copy_from) - end - - story_trackers = story_trackers.map{|tracker| tracker.id } - task_tracker = task_tracker.id - Backlogs.setting[:story_trackers] = story_trackers - Backlogs.setting[:default_story_tracker] = story_trackers[0] - Backlogs.setting[:task_tracker] = task_tracker - - # Make sure these trackers are enabled in the project - @project.update_attribute :tracker_ids, (story_trackers << task_tracker) - - # make sure existing stories don't occupy positions that the tests are going to use - Issue.connection.execute("update issues set position = (position - #{Issue.minimum(:position)}) + #{Issue.maximum(:position)} + 50000") - - Backlogs.setting[:show_in_scrum_stats] = true - Backlogs.setting[:show_stories_from_subprojects] = true #db is default true - Backlogs.setting[:card_spec] = 'Zweckform 3474' - BacklogsPrintableCards::CardPageLayout.selected.should_not be_nil -end - -Given /^no versions or issues exist$/ do - Issue.destroy_all - Version.destroy_all -end - -Given(/^no releases or release multiviews exist$/) do - RbRelease.destroy_all - RbReleaseMultiview.destroy_all -end - -Given /^I have selected the (.*) project$/ do |project_id| - @project = get_project(project_id) -end - -Given /^backlogs setting show_burndown_in_sidebar is enabled$/ do - Backlogs.setting[:show_burndown_in_sidebar] = 'enabled' #app/views/backlogs/view_issues_sidebar.html.erb -end - -Given /^I have defined the following sprints?:$/ do |table| - @project.versions.delete_all - table.hashes.each do |version| - - #need to get current project defined in the table FIXME: (pa sharing) check this - version['project_id'] = get_project((version['project_id']||'ecookbook')).id - - ['effective_date', 'sprint_start_date'].each do |date_attr| - date_string = Chronic.parse(version[date_attr]) - version[date_attr] = date_string.nil? ? nil : date_string.strftime("%Y-%m-%d") - end - - version['sharing'] = 'none' if version['sharing'].nil? - status = version.delete('status') - - sprint = RbSprint.create! version - sprint.update_attribute(:status, 'closed') if status == 'closed' - end -end - -Given /^I have the following issue statuses available:$/ do |table| - table.hashes.each do |status| - s = IssueStatus.where(name: status['name']).first - unless s - s = IssueStatus.new - s.name = status['name'] - end - - s.is_closed = status['is_closed'] == '1' - #s.is_default = status['is_default'] == '1' - s.default_done_ratio = status['default_done_ratio'].to_i unless status['default_done_ratio'].blank? - - s.save! - end -end - -Given /^I have defined the following logins:$/ do |table| - table.hashes.each do |user| - u = User.new - u.login = user['login'] - u.mail = "#{user['login']}@example.org" - u.firstname = "Test" - u.lastname = "Run" - u.save! - m = Member.new(:role_ids => [Role.find_by_name("Developer").id], :user_id => u.id) - @project.members << m - end -end - -Given /^I have made the following task mutations:$/ do |table| - table.hashes.each do |mutation| - mutation.delete_if{|k, v| v.to_s.strip == '' } - task = RbTask.find_by_subject(mutation.delete('task')) - task.should_not be_nil - - set_now(mutation.delete('day'), :msg => task.subject, :sprint => current_sprint) - Time.zone.now.should be >= task.created_on - - task.init_journal(User.current) - - status_name = mutation.delete('status').to_s - if status_name.blank? - status = nil - else - status = IssueStatus.find_by_name(status_name) - raise "No such status '#{status_name}'" unless status - status = status.id - end - - remaining = mutation.delete('remaining') - - task.remaining_hours = remaining.to_f unless remaining.blank? - task.status_id = status if status - task.save!.should be true - - mutation.should == {} - end -end - -Given /^I have deleted all existing issues from all projects$/ do - Issue.delete_all -end - -Given /^I have deleted all existing issues$/ do - @project.issues.delete_all -end - -Given /^I have defined the following stories in the product backlog:$/ do |table| - table.hashes.each do |story| - if story['project_id'] - project = get_project(story.delete('project_id')) - else - project = @project - end - - t_value = story.delete('tracker') - t = get_tracker(t_value.strip) unless t_value.nil? - - params = initialize_story_params project.id - params['subject'] = story.delete('subject').strip - params['tracker_id'] = t.id unless t.nil? - params['story_points'] = story.delete('points').to_i if story['points'].to_s != '' - params['release_id'] = RbRelease.find_by_name(story['release']).id if story['release'].to_s.strip != '' - story.delete('release') unless story['release'].nil? - - story.should == {} - - # NOTE: We're bypassing the controller here because we're just - # setting up the database for the actual tests. The actual tests, - # however, should NOT bypass the controller - RbStory.create_and_position(params).move_to_bottom - end -end - -Given /^I have defined the following stories in the following sprints?:$/ do |table| - table.hashes.each do |story| - sprint = RbSprint.find_by_name(story.delete('sprint')) #find by name only, please use unique sprint names over projects for tests - if story['project_id'] # where to put the story into, so we can have a story of project A in a sprint of project B - project = get_project(story.delete('project_id')) - else - project = sprint.project || @project - end - sprint.should_not be_nil - t = get_tracker(story.delete('tracker')) - params = initialize_story_params project.id - params['subject'] = story.delete('subject') - params['fixed_version_id'] = sprint.id - params['story_points'] = story.delete('points').to_i if story['points'].to_s != '' - params['release_id'] = RbRelease.find_by_name(story['release']).id if story['release'].to_s.strip != '' - story.delete('release') unless story['release'].nil? - - set_now(story.delete('day'), :msg => params['subject'], :sprint => sprint) - - story.should == {} - - # NOTE: We're bypassing the controller here because we're just - # setting up the database for the actual tests. The actual tests, - # however, should NOT bypass the controller - RbStory.create_and_position(params).move_to_bottom - end -end - -Given /^I have defined the following tasks:$/ do |table| - table.hashes.each do |task| - story = RbStory.where( :subject => task.delete('story') ).first - story.should_not be nil - - params = initialize_task_params(story.id) - params['subject'] = task.delete('subject') - - username = task.delete('assigned_to') - params['assigned_to_id'] = User.find_by_login(username).id unless username.nil? || username.strip == '' - - status = task.delete('status') - params['status_id'] = IssueStatus.where(name: status).first.id unless status.blank? - - hours = task.delete('estimate') - params['estimated_hours'] = hours.to_f unless hours.blank? - params['remaining_hours'] = hours.to_f unless hours.blank? - - at = task.delete('when').to_s - if at =~ /^0-9+/ - set_now(at, :sprint => story.fixed_version, :msg => params['subject']) - else - set_now(at, :msg => params['subject']) - end - Time.zone.now.should be >= story.created_on - - task.should == {} - - # NOTE: We're bypassing the controller here because we're just - # setting up the database for the actual tests. The actual tests, - # however, should NOT bypass the controller - task = RbTask.create_with_relationships(params, @user.id, story.project.id) - task.parent_issue_id = story.id # workaround racktest driver weirdness: user is not member of subprojects. phantomjs driver works as expected, though. - task.save! # workaround racktest driver weirdness - task - end -end - -Given /^I have defined the following impediments:$/ do |table| - # sharing: an impediment can block more than on issues, each from different projects, when - # cross_project_issue_relations is enabled. This is tested not here but using javascript tests. - table.hashes.each do |impediment| - sprint = RbSprint.where(:name => impediment.delete('sprint') ).first - blocks = RbStory.where('subject in (?)', impediment['blocks'].split(', ')).first - params = initialize_impediment_params(:project_id => blocks.project_id, :fixed_version_id => sprint.id) - params['subject'] = impediment.delete('subject') - params['blocks'] = RbStory.where(['subject in (?)', impediment.delete('blocks').split(', ')]).map{ |s| s.id }.join(',') - impediment.should == {} - - # NOTE: We're bypassing the controller here because we're just - # setting up the database for the actual tests. The actual tests, - # however, should NOT bypass the controller - RbTask.create_with_relationships(params, @user.id, blocks.project_id, true).should_not be_nil - end - -end - -Given /^I am viewing the issues list$/ do - visit url_for(:controller => 'issues', :action=>'index', :project_id => @project, :only_path=>true) - verify_request_status(200) -end - -Given /^I am viewing the issues sidebar$/ do - visit url_for(:controller => 'rb_hooks_render', :action=>'view_issues_sidebar', :project_id => @project, :only_path=>true) - verify_request_status(200) -end - -Given /^I am viewing the issues sidebar for (.+)$/ do |name| - visit url_for(:controller => 'rb_hooks_render', - :action=>'view_issues_sidebar', - :project_id => @project, - :sprint_id => RbSprint.find_by_name(name).id, - :only_path => true) - verify_request_status(200) -end - -Given /^I am viewing the issue named "([^\"]*)"$/ do |name| - issue = Issue.find_by_subject(name) - visit url_for(:controller => 'issues', :action=>'show', :id => issue.id, :project_id => @project, :only_path=>true) - verify_request_status(200) -end - -Given /^I have selected card label stock (.+)$/ do |stock| - Backlogs.setting[:card_spec] = stock - BacklogsPrintableCards::CardPageLayout.selected.should_not be_nil -end - -Given /^I have set my API access key$/ do - Setting.rest_api_enabled = '1' - @user.reload - @user.api_key.should_not be_nil - @api_key = @user.api_key -end - -Given /^I have guessed an API access key$/ do - Setting.rest_api_enabled = '1' - @api_key = 'guess' -end - -Given /^I have set the content for wiki page (.+) to (.+)$/ do |title, content| - title = Wiki.titleize(title) - page = @project.wiki.find_page(title) - if ! page - page = WikiPage.new(:wiki => @project.wiki, :title => title) - page.content = WikiContent.new - page.save - end - - page.content.text = content - page.save.should be true -end - -Given /^I have made (.+) the template page for sprint notes/ do |title| - Backlogs.setting[:wiki_template] = Wiki.titleize(title) -end - -Given /^there are no stories in the project$/ do - @project.issues.delete_all -end - -Given /^show me the task hours$/ do - header = ['task', 'hours'] - data = Issue.where(['tracker_id = ? and fixed_version_id = ?', RbTask.tracker, current_sprint.id]).collect{|t| [t.subject, t.remaining_hours.inspect]} - show_table("Task hours", header, data) -end - -Given /^I have changed the sprint start date to (.*)$/ do |date| - case date - when 'today' - date = Time.zone.today - when 'tomorrow' - date = (Time.zone.today + 1) - else - date = Time.zone.parse(date).to_date - end - current_sprint.sprint_start_date = date - current_sprint(:keep).save! -end - -Given /^I have configured backlogs plugin to include Saturday and Sunday in burndown$/ do - Backlogs.setting[:include_sat_and_sun] = true -end - -Given /^timelog from taskboard has been enabled$/ do - Backlogs.setting[:timelog_from_taskboard] = 'enabled' -end - -Given /^I am a team member of the project and allowed to update remaining hours$/ do - role = Role.where(name: 'Manager').first - role.permissions << :view_master_backlog - role.permissions << :view_releases - role.permissions << :view_taskboards - role.permissions << :create_tasks - role.permissions << :update_tasks - role.permissions << :update_remaining_hours - role.save! - login_as_team_member -end - -Given /^I am logging time for task (.+)$/ do |subject| - issue = Issue.find_by_subject(subject) - visit "/issues/#{issue.id}/time_entries" - click_link('Log time') - verify_request_status(200) -end - -Given /^I am viewing log time for the (.*) project$/ do |project_id| - visit "/projects/#{project_id}/time_entries" - click_link('Log time') - verify_request_status(200) -end - -Given /^I set the hours spent to (\d+)$/ do |arg1| - fill_in 'time_entry[hours]', :with => arg1 -end - -Given /^I set the remaining_hours to (\d+)$/ do |arg1| - fill_in 'remaining_hours', :with => arg1 -end - -Given /^I am duplicating (.+) to (.+) for (.+)$/ do |story_old, story_new, sprint_name| - issue = Issue.find_by_subject(story_old) - visit "/projects/#{@project.id}/issues/#{issue.id}/copy" - verify_request_status(200) - fill_in 'issue_subject', :with => story_new - page.select(sprint_name, :from => "issue_fixed_version_id") -end - -Given /^I choose to copy (none|open|all) tasks$/ do |copy_option| - if copy_option == "none" - choose('copy_tasks_none') - elsif copy_option == "open" - field_id = page.find(:xpath, '//input[starts-with(@id,"copy_tasks_open")]')['id'] - choose(field_id) - else - field_id = page.find(:xpath, '//input[starts-with(@id,"copy_tasks_all")]')['id'] - choose(field_id) - end -end - -Given /^I have defined the following projects:$/ do |table| - table.hashes.each do |project| - name = project.delete('name') - project.should == {} - pr = Project.create! :identifier => name, :name => name - end -end - -Given /^the (.*) project is subproject of the (.*) project$/ do |arg1, arg2| - sub = Project.find(arg1) - parent = Project.find(arg2) - sub.set_parent! parent -end - -Given /^sharing is (.*)enabled$/ do |neg| - Backlogs.setting[:sharing_enabled] = !!(neg=='') -end - -Given /^default sharing for new sprints is (.+)$/ do |sharing| - Backlogs.setting[:sharing_new_sprint_sharingmode] = sharing -end - -Given /^the project selected not to include subprojects in the product backlog$/ do - settings = @project.rb_project_settings - settings.show_stories_from_subprojects = false - settings.save -end - -Given /cross_project_issue_relations is (enabled|disabled)/ do | enabled | - Setting[:cross_project_issue_relations] = enabled=='enabled'?1:0 -end - -Given /^I have defined the following releases:$/ do |table| - RbRelease.delete_all - table.hashes.each do |release| - release['project_id'] = get_project((release.delete('project')||'ecookbook')).id - RbRelease.create!(release) - end -end - -Given /^I have defined the following release multiviews:$/ do |table| - RbReleaseMultiview.delete_all - table.hashes.each do |release_multiview| - release_multiview['project_id'] = get_project((release_multiview.delete('project')||'ecookbook')).id - release_multiview['release_ids'] = get_releases(release_multiview['releases']) - release_multiview.delete('releases') - RbReleaseMultiview.create! release_multiview - end -end - - -Given /^I view the release page$/ do - visit url_for(:controller => :projects, :action => :show, :id => @project, :only_path => true) - click_link("Releases") -end - -Given /^Story closes when all Tasks are closed$/ do - Backlogs.setting[:story_follow_task_status] = 'close' - status = IssueStatus.find_by_name('Closed') - Backlogs.setting[:story_close_status_id] = status.id -end - -Given /^Story states loosely follow Task states$/ do - Backlogs.setting[:story_follow_task_status] = 'loose' - Backlogs.setting[:story_close_status_id] = '0' - Setting.issue_done_ratio = 'issue_status' #auto done_ratio for issues. issue_field is not supported (yet) -end - -Given /^Issue done_ratio is determined by the issue field$/ do - Setting.issue_done_ratio = 'issue_field' -end - -Given(/^I request the csv format for release "(.*?)"$/) do |arg1| - r = RbRelease.where(:name => arg1).first - r.should_not be_nil - visit url_for(:controller => :rb_releases, :action => :show, :format => :csv, :release_id => r.id, :only_path => true) -end diff --git a/features/step_definitions/_then_steps.rb b/features/step_definitions/_then_steps.rb deleted file mode 100644 index 45e32400f..000000000 --- a/features/step_definitions/_then_steps.rb +++ /dev/null @@ -1,576 +0,0 @@ -require 'rubygems' -require 'pp' - -Then /^show me the history for (.+)$/ do |subject| - issue = RbStory.find_by_subject(subject) - puts "== #{subject} ==" - issue.history.history.each{|h| - puts h.inspect - } - puts "// #{subject} //" -end - -Then /^the history for (.+) should be:$/ do |subject, table| - story = RbStory.find_by_subject(subject) - history = story.history.filter(current_sprint) - table.hashes.each_with_index do |metrics, i| - metrics.each_pair{|k, v| - "#{i}, #{k}: #{history[i][k.intern]}".should == "#{i}, #{k}: #{v}" - } - end -end - -Then /^(.+) should be in the (\d+)(?:st|nd|rd|th) position of the sprint named (.+)$/ do |story_subject, position, sprint_name| - position = position.to_i - story = RbStory.where(subject: story_subject).joins(:fixed_version).includes(:fixed_version).where(versions: {name: sprint_name}).first - story.rank.should == position.to_i -end - -Then /^I should see (\d+) sprint backlogs$/ do |count| - sprint_backlogs = page.all(:css, "#sprint_backlogs_container .sprint", :visible => true) - sprint_backlogs.length.should == count.to_i -end - -Then /^I should see the burndown chart$/ do - page.should have_css("#burndown_#{current_sprint.id.to_s}") -end - -Then /^I should see the burndown chart of sprint (.+)$/ do |sprint_name| - sprint = RbSprint.find_by_name(sprint_name) - page.should have_css("#burndown_#{sprint.id.to_s}") -end - -Then /^I should see the Issues page$/ do - page.should have_css("#query_form") -end - -Then /^I should see custom backlog columns on the Issues page$/ do - page.should have_css("#query_form") - ['story_points','release','position','velocity_based_estimate','remaining_hours'].each{|c| - page.should have_xpath("//td[@class='#{c}']") - } -end - -Then /^I should see the taskboard$/ do - page.should have_css('#taskboard') -end - -Then /^I should see the product backlog$/ do - page.should have_css('#product_backlog_container') - page.should have_css('#stories-for-product-backlog') -end - -Then /^I should see (\d+) stories in the product backlog$/ do |count| - RbStory.product_backlog(@project).all.length.should == count.to_i - page.all(:css, "#stories-for-product-backlog .story").length.should == count.to_i -end - -Then /^show me the list of sprints$/ do - header = [['id', 3], ['name', 18], ['sprint_start_date', 18], ['effective_date', 18], ['updated_on', 20]] - data = RbSprint.open_sprints(@project).collect{|sprint| [sprint.id, sprint.name, sprint.start_date, sprint.effective_date, sprint.updated_on] } - - show_table("Sprints", header, data) -end - -Then /^show me the list of shared sprints$/ do - header = [['id', 3], ['name', 18], ['project id', 5], ['sprint_start_date', 18], ['effective_date', 18], ['updated_on', 20]] - sprints = @project.shared_versions.scoped(:conditions => {:status => ['open', 'locked']}, :order => 'sprint_start_date ASC, effective_date ASC').collect{|v| v.becomes(RbSprint) } - data = sprints.collect{|sprint| [sprint.id, sprint.name, sprint.project_id, sprint.start_date, sprint.effective_date, sprint.updated_on] } - - show_table("Sprints", header, data) -end - -Then /^the sprint "([^"]*)" should not be shared$/ do |sprint| - sprint = RbSprint.find_by_name(sprint) - sprint.sharing.should == "none" -end - -Then /^the sprint "([^"]*)" should be shared by (.+)$/ do |sprint, sharing| - sprint = RbSprint.find_by_name(sprint) - sprint.sharing.should == sharing -end - -Then /^show me the list of issues( on )?(all )?(project)?s?(.*)?$/ do |on, all, project, name| - query = RbStory,order("position ASC") - if all.to_s.strip == 'all' - # - elsif name.to_s != '' - query = query.where(project_id: Project.find_by_name(name).id) - else - query = query.where(project_id: @project.id) - end - - header = [['id', 5], ['tracker', 10], ['created', 20], ['position', 8], ['rank', 8], ['status', 12], ['subject', 30], ['sprint', 20], ['remaining', 10]] - data = query.collect {|story| - [story.id, story.tracker.name, story.created_on, story.position, story.rank, story.status.name, story.subject, story.fixed_version_id.nil? ? 'Product Backlog' : story.fixed_version.name, story.remaining_hours] - } - - show_table("Stories", header, data) -end - -Then /^show me the sprint impediments$/ do - puts "Impediments for #{current_sprint.name}: #{current_sprint(:keep).impediments.collect{|i| i.subject}.inspect}" -end - -Then /^show me the projects$/ do - show_projects -end - -Then /^show me the response body$/ do - puts page.driver.body -end - -Then /^(.+) should be the higher item of (.+)$/ do |higher_subject, lower_subject| - higher = RbStory.find_by_subject(higher_subject) - lower = RbStory.find_by_subject(lower_subject) - higher.should_not be_nil - lower.should_not be_nil - lower.higher_item.should_not be_nil - higher.lower_item.should_not be_nil - - higher.position.should < lower.position - lower.higher_item.id.should == higher.id - higher.lower_item.id.should == lower.id -end - -Then /^the request should complete successfully$/ do - verify_request_status(200) -end - -Then /^the request should fail$/ do - verify_request_status(401) -end - -Then /^calendar feed download should (succeed|fail)$/ do |status| - (status == 'succeed').should == page.body.include?('BEGIN:VCALENDAR') -end - -Then /^the (\d+)(?:st|nd|rd|th) story in (.+) should be (.+)$/ do |position, backlog, subject| - sprint = (backlog == 'the product backlog' ? nil : Version.find_by_name(backlog)) - story = RbStory.backlog_scope(:project => @project, :sprint => sprint).find_by_rank(position.to_i) - - story.should_not be_nil - story.subject.should == subject -end - -Then /^the (\d+)(?:st|nd|rd|th) story in (.+) should have the tracker (.+)$/ do |position, backlog, tracker| - sprint = (backlog == 'the product backlog' ? nil : Version.find_by_name(backlog)) - story = RbStory.backlog_scope(:project => @project, :sprint => sprint).find_by_rank(position.to_i) - - t = get_tracker(tracker) - - story.should_not be_nil - story.tracker.should == t -end - -Then /^the (\d+)(?:st|nd|rd|th) task for (.+) should be (.+)$/ do |position, story_subject, task_subject| - story = RbStory.where(subject: story_subject).first - story.should_not be_nil - story.children.length.should be >= position.to_i - story.children[position.to_i - 1].subject.should == task_subject -end - -Then /^the (\d+)(?:st|nd|rd|th) task for (.+) is assigned to (.+)$/ do |position, story_subject, task_assigned_to| - story = RbStory.where(subject: story_subject).first - story.should_not be_nil - story.children.length.should be >= position.to_i - story.children[position.to_i - 1].assigned_to.should == User.where(login: task_assigned_to).first -end - -Then /^the server should return an update error$/ do - verify_request_status(400) -end - -Then /^the server should return (\d+) updated (.+)$/ do |count, object_type| - page.all("##{object_type.pluralize} .#{object_type.singularize}").length.should == count.to_i -end - -Then /^Story "([^"]*)" should be updated$/ do |story| - story_id = RbStory.find_by_subject(story).id - page.should have_css("#story_#{story_id}") -end -Then /^Story "([^"]*)" should not be updated$/ do |story| - story_id = RbStory.find_by_subject(story).id - page.should_not have_css("#story_#{story_id}") -end - -Then /^The last_update information should be near (.+)$/ do |t| - lu = page.find(:css, "#last_updated").text() - lu.start_with?(t).should be true #coarse. hmm. -end - -Then /^the sprint named (.+) should have (\d+) impediments? named (.+)$/ do |sprint_name, count, impediment_subject| - sprint = RbSprint.where(name: sprint_name).all - sprint.length.should == 1 - sprint = sprint.first - - impediments = sprint.impediments - impediments.size.should == count.to_i - - subjects = {} - impediment_subject.split(/(?:\s+and\s+)|(?:\s*,\s*)/).each {|s| - subjects[s] = 0 - } - sprint.impediments.each{|i| - subjects[i.subject].should_not be_nil - subjects[i.subject] += 1 if subjects[i.subject] - } - subjects.values.select{|v| v == 0}.size.should == 0 -end - -Then /^the sprint should be updated accordingly$/ do - sprint = RbSprint.find(@sprint_params['id']) - - sprint.attributes.each_key do |key| - unless ['updated_on', 'created_on'].include?(key) - case - when sprint[key].nil? - @sprint_params[key].should be_nil - when key =~ /_date/ - sprint[key].strftime("%Y-%m-%d").should == @sprint_params[key] - else - sprint[key].should == @sprint_params[key] - end - end - end -end - -Then /^the sprint "([^"]*)" should be in project "([^"]*)"$/ do |sprint, project| - project = get_project(project) - sprint = RbSprint.find_by_name(sprint) - project.should_not be_nil - sprint.should_not be_nil - sprint.project.should == project -end - -Then /^the status of the story should be set as (.+)$/ do |status| - @story.reload - @story.status.name.downcase.should == status -end - -Then /^the story named (.+) should have (\d+) task named (.+)$/ do |story_subject, count, task_subject| - stories = RbStory.where(subject: story_subject ).all - stories.length.should == 1 - - tasks = stories.first.descendants - tasks.length.should == 1 - - tasks.first.subject.should == task_subject -end - -Then /^the story should be at the (top|bottom)$/ do |position| - if position == 'top' - story_position(@story).should == 1 - else - story_position(@story).should == @story_ids.length - end -end - -Then /^the story should be at position (.+)$/ do |position| - story_position(@story).should == position.to_i -end - -Then /^the story should have a (.+) of (.+)$/ do |attribute, value| - @story.reload - if attribute=="tracker" - attribute="tracker_id" - value = Tracker.find_by_name(value).id - end - @story[attribute].should == value -end - -Then /^the wiki page (.+) should contain (.+)$/ do |title, content| - title = Wiki.titleize(title) - page = @project.wiki.find_page(title) - page.should_not be_nil - - raise "\"#{content}\" not found on page \"#{title}\"" unless page.content.text.match(/#{content}/) -end - -Then /^(issue|task|story) (.+) should have (.+) set to (.+)$/ do |type, subject, attribute, value| - issue = Issue.find_by_subject(subject) - issue.send(attribute.intern).should == value.to_i -end - -Then /^the sprint burn(down|up) should be:$/ do |direction, table| - dayno = table.hashes[-1]['day'] - dayno = '0' if dayno == 'start' - set_now(dayno.to_i + 1, :sprint => @sprint) - - bd = current_sprint(:keep).burndown - bd.direction = direction - bd = bd.data - - days = current_sprint(:keep).days - - table.hashes.each do |metrics| - day = metrics.delete('day') - day = (day == 'start' ? 0 : day.to_i) - date = days[day] - - metrics.keys.sort{|a, b| a.to_s <=> b.to_s}.each do |k| - expected = metrics[k] - got = bd[k.intern][day] - - # If we get a nil, leave expected alone -- if expected is '' or nil, it'll match, otherwise it's a mismatch anyhow - expected = got.to_s.match(/\./) ? expected.to_f : expected.to_i unless got.nil? - - "#{date}, #{k}: #{got}".should == "#{date}, #{k}: #{expected}" - end - end -end - -Then /^show me the sprint burn(.*)$/ do |direction| - sprint = current_sprint(:keep) - burndown = sprint.burndown - burndown.direction = direction - - series = burndown.series(false) - dates = burndown.days - - tz = RbIssueHistory.burndown_timezone - ticks = dates.collect{|d| #Copypasta of tick renderer in _burndown. - tz.local(d.year, d.mon, d.mday) - }.collect{|t| t.strftime('%a')[0, 1].downcase + ' ' + t.strftime(::I18n.t('date.formats.short')) } - - data = series.collect{|s| burndown.data[s.intern].enum_for(:each_with_index).collect{|d,i| [i*2, d]}} - - puts "== #{sprint.name} ==" - puts dates.inspect - puts series.inspect - puts data.inspect - puts burndown.data.inspect - puts "// #{sprint.name} //" - #show_table("Burndown for #{current_sprint(:keep).name} (#{current_sprint(:keep).sprint_start_date} - #{current_sprint(:keep).effective_date})", header, data) -end - -Then /^show me the (.+) burndown for story (.+)$/ do |series, subject| - story = RbStory.find_by_subject(subject) - show_table("Burndown for story #{subject}, created on #{story.created_on}", ['date', 'hours'], current_sprint.days.zip(story.burndown[series.intern])) -end -Then /^show me the burndown for task (.+)$/ do |subject| - sprint = task.fixed_version.becomes(RbSprint) - - task = RbTask.find_by_subject(subject) - show_table("Burndown for #{subject}, created on #{task.created_on}", ['date', 'hours'], sprint.days.zip(task.burndown)) -end - -Then /^show me the journal for (.+)$/ do |subject| - columns = [] - data = [] - subject.split(',').each{|s| - issue = RbStory.find_by_subject(s.strip) - raise "No issue with subject '#{subject}'" unless issue - - columns = (columns + issue.history.history.collect{|d| d.keys}.flatten).uniq - data << issue.history.history.collect{|d| d.reject{|k, v| [:origin, :status_id].include?(k)}.merge(:issue => issue.subject)} - #puts "\n#{issue.subject}:\n #{issue.history.history.inspect}\n #{issue.is_story? ? issue.burndown.inspect : ''}\n" - } - columns = [:issue, :date] + columns.reject{|c| [:issue, :date].include?(c)}.sort{|a, b| a.to_s <=> b.to_s} - data.flatten! - data.sort!{|a, b| "#{a[:date]}:#{a[:issue]}" <=> "#{b[:date]}:#{b[:issue]}"} - - puts "\n" - puts columns.collect{|c| c.to_s}.join("\t") - - data.each{|mutation| - puts columns.collect{|c| mutation[c].to_s}.join("\t") - } - puts "\n" -end - -Then /^show me the story burndown for (.+)$/ do |story| - story = RbStory.where(subject: story).first - bd = story.burndown - header = ['day'] + bd.keys.sort{|a, b| a.to_s <=> b.to_s} - bd['day'] = current_sprint(:keep).days - data = bd.transpose.collect{|row| header.collect{|k| row[k]}} - show_table("Burndown for story #{story.subject}", header.collect{|h| h.to_s}, data) -end - -Then /^task (.+) should have a total time spent of (\d+) hours$/ do |subject,value| - issue = Issue.find_by_subject(subject) - issue.spent_hours.should == value.to_f -end - -Then /^sprint (.+) should contain (.+)$/ do |sprint_name, story_subject| - story = RbStory.where(:subject => story_subject).joins(:fixed_version).includes(:fixed_version).where(versions: {:name => sprint_name}).first #beware, fixed_version is the relation, Versions the class and versions the table for our sprint. Duh. - story.should_not be_nil -end - -Then /^the story named (.+) should have a task named (.+)$/ do |story_subject, task_subject| - stories = RbStory.where(:subject => story_subject).all - stories.length.should == 1 - - tasks = RbTask.where(:subject => task_subject, :parent_id => stories.first.id).all - tasks.length.should == 1 -end - -Then /^I should see (\d+) stories in the sprint backlog of (.+)$/ do |arg1, arg2| - sprint_id = sprint_id_from_name(arg2.strip) - stories = page.all(:css, "#stories-for-#{sprint_id} .story") - stories.length.should == arg1.to_i -end - -Then /^The menu of the sprint backlog of (.*) should (.*)allow to create a new Story in project (.*)$/ do |arg1, neg, arg3| - sprint_id = sprint_id_from_name(arg1.strip) - project = get_project(arg3) - links = page.all(:xpath, "//div[@id='sprint_#{sprint_id}']/..//a[contains(@class,'add_new_story')]") - found = check_backlog_menu_new_story(links, project) - found.should == !!(neg=='') -end - -Then /^The menu of the product backlog should (.*)allow to create a new Story in project (.+)$/ do |neg, arg3| - project = get_project(arg3) - links = page.all(:css, "#product_backlog_container a.add_new_story") - found = check_backlog_menu_new_story(links, project) - found.should == !!(neg=='') -end - -Then /^I should (.*)see the backlog of Sprint (.+)$/ do |neg, arg1| - sprint_id = sprint_id_from_name(arg1.strip) -# page.should_not have_css(:css, "#sprint_#{sprint_id}", :visible => true) if neg != '' -# page.should have_css(:css, "#sprint_#{sprint_id}", :visible => true) if neg == '' - begin - page.find(:css, "#sprint_#{sprint_id}", :visible => true) - found = true - rescue - found = false - end - found.should == !!(neg=='') -end - -Then /^story (.+?) is unchanged$/ do |story_name| - story = RbStory.find_by_subject(story_name) - @last_drag_and_drop.should_not be_nil - @last_drag_and_drop[:position_before].should == story.position - @last_drag_and_drop[:version_id_before].should == story.fixed_version_id -end - -Then /^story (.+?) is in the product backlog$/ do |story_name| - story = RbStory.find_by_subject(story_name) - story.fixed_version_id.should be_nil -end - -#taskboard visual checks: -Then /^I should see task (.+) in the row of story (.+) in the state (.+)$/ do |task, story, state| - task_id = RbTask.find_by_subject(task).id - story_id = RbStory.find_by_subject(story).id - n = get_taskboard_state_index[state] - page.should have_css("#taskboard #swimlane-#{story_id} td:nth-child(#{n}) div#issue_#{task_id}") -end - -Then /^task (.+?) should have the status (.+)$/ do |task, state| - state = IssueStatus.find_by_name(state) - task = RbTask.find_by_subject(task) - task.should_not be_nil - task.status_id.should == state.id -end - -Then /^story (.+?) should have the status (.+)$/ do |story, state| - state = IssueStatus.find_by_name(state) - story = RbStory.find_by_subject(story) - story.status_id.should == state.id -end - -Then /^I should see impediment (.+) in the state (.+)$/ do |impediment, state| - task = Issue.find_by_subject(impediment) - n = get_taskboard_state_index[state] - page.should have_css("#impediments td:nth-child(#{n}) div#issue_#{task.id}") -end - -Then /^impediment (.+) should be created without error$/ do |impediment_name| - impediment = Issue.find_by_subject(impediment_name) - impediment.should_not be_nil - begin - msg = page.find(:css, "div#msgBox") - #puts "Got msg box: #{msg.text}" if msg - rescue - end - msg.should be_nil - page.should have_css("#issue_#{impediment.id}") -end - -Then /^I should see a msgbox with "([^"]*)"$/ do |arg1| - msg = page.find(:css, "div#msgBox") - msg.text.strip.should == arg1.strip -end - -Then /^I should see the mini-burndown-chart in the sidebar$/ do - page.should have_css("#sidebar .burndown_chart canvas.jqplot-base-canvas") -end - -Then /^show me the html content$/ do - puts page.html -end - -Then /^(.+) for (.+) should be (true|false)$/ do |key, project, value| - project = Project.find(project) - project.should_not be nil - setting = project.rb_project_settings.send(key) - if value=="true" || value === true - setting.should be true - else - setting.should be false - end -end - -#only with phantomjs driver: -Then /^show me a screenshot at (.+)$/ do |arg1| - page.driver.render(arg1, :full=>true) -end - -Then /^dump the database to (.+)$/ do |arg1| - system("pg_dump redmine_test > #{arg1}") -end - -Then /^open the remote inspector$/ do - page.driver.debug -end - -Then /^the error message should say "([^"]*)"$/ do |msg| - response_msg = page.find(:xpath,"//div[@class='errors']/div") - response_msg.text.strip.should == msg -end - -Then /^the issue should display (\d+) remaining hours$/ do |hours| - field = page.find(:xpath, "//th[contains(normalize-space(text()),'Remaining')]/following-sibling::td") - field.text.should == "#{"%.2f" % hours.to_f} hours" -end - -Then /^the done ratio for story (.+?) should be (\d+)$/ do |story, ratio| - story = RbStory.find_by_subject(story) - story.should_not be_nil - story.done_ratio.should == ratio.to_i -end - -# Low level tests on private methods higher_item_unscoped and lower_item_unscoped, should be rspec tests -Then /^"([^"]*)"\.higher_item_unscoped should be "([^"]*)"$/ do |obj, arg| - obj = RbStory.find_by_subject(obj) - if arg == "nil" - obj.send(:higher_item_unscoped).should be_nil - else - arg = RbStory.find_by_subject(arg) - obj.send(:higher_item_unscoped).should == arg - arg.send(:lower_item_unscoped).should == obj - end -end -Then /^"([^"]*)"\.lower_item_unscoped should be "([^"]*)"$/ do |obj, arg| - obj = RbStory.find_by_subject(obj) - if arg == "nil" - obj.send(:lower_item_unscoped).should be_nil - else - arg = RbStory.find_by_subject(arg) - obj.send(:lower_item_unscoped).should == arg - arg.send(:higher_item_unscoped).should == obj - end -end - -Then(/^release multiview "(.*?)" should contain "(.*?)"$/) do |release_multiview_name, releases| - m = RbReleaseMultiview.find_by_name(release_multiview_name) - m.should_not be_nil - - release_names = releases.split(",") - expected_releases = RbRelease.where(name: release_names).all.map{|r| r.id} - m.releases.map{|r| r.id}.should == expected_releases -end diff --git a/features/step_definitions/_when_steps.rb b/features/step_definitions/_when_steps.rb deleted file mode 100644 index 0c7e4c2dc..000000000 --- a/features/step_definitions/_when_steps.rb +++ /dev/null @@ -1,294 +0,0 @@ -require 'pp' - -When /^I (try to )?create the impediment( on project )?(.*)$/ do |attempt, on, project| - params = @impediment_params.dup - params['project_id'] = Project.find(project) if project != '' - path = url_for(:controller => :rb_impediments, - :action => :create, - :only_path => true) - @sessiondriver.submit :post, path, @impediment_params - verify_request_status(200) unless attempt -end - -When /^I (try to )?create the story$/ do |attempt| - path = url_for(:controller => :rb_stories, - :action => :create, - :only_path => true) - @sessiondriver.submit :post, path, @story_params - verify_request_status(200) unless attempt -end - -When /^I (try to )?create the task$/ do |attempt| - initial_estimate = @task_params.delete('initial_estimate') - path = url_for(:controller => :rb_tasks, - :action => :create, - :only_path => true) - @sessiondriver.submit :post, path, @task_params - verify_request_status(200) unless attempt -end - -When /^I (try to )?create the sprint$/ do |attempt| - path = url_for(:controller => :rb_sprints, - :action => :create, - :only_path => true) - @sessiondriver.submit :post, path, @sprint_params - verify_request_status(200) unless attempt -end - -When /^I (try to )?move the story named (.+) above (.+)$/ do |attempt, story_subject, next_subject| - story = RbStory.find_by_subject(story_subject) - nxt = RbStory.find_by_subject(next_subject) - - attributes = story.attributes - attributes[:next] = nxt.id - - path = url_for(:controller => 'rb_stories', - :action => "update", - :id => story.id, - :only_path => true) - @sessiondriver.submit :put, path, attributes - verify_request_status(200) unless attempt -end - -When /^I (try to )?move the story named (.+) to the (\d+)(?:st|nd|rd|th) position of the sprint named (.+)$/ do |attempt, story_subject, position, sprint_name| - position = position.to_i - story = RbStory.find_by_subject(story_subject) - sprint = RbSprint.find_by_name(sprint_name) - story.fixed_version = sprint - - attributes = story.attributes - attributes[:next] = story_after(position, sprint.project, sprint).to_s - - path = url_for(:controller => 'rb_stories', - :action => "update", - :id => story.id, - :only_path => true) - @sessiondriver.submit :put, path, attributes - verify_request_status(200) unless attempt -end - -When /^I (try to )?move the (\d+)(?:st|nd|rd|th) story to the (\d+|last)(?:st|nd|rd|th)? position$/ do |attempt, old_pos, new_pos| - @story_ids = page.all(:css, "#product_backlog_container .stories .story .id .v").collect{|s| s.text} -# @story_ids = page.all(:css, "#product_backlog_container .stories .story .id .v") - - story_id = @story_ids.delete_at(old_pos.to_i-1) - story_id.should_not == nil - - new_pos = new_pos.to_i unless new_pos == 'last' - case new_pos - when 'last' - nxt = '' - else - nxt = @story_ids[new_pos-1] - end - - path = url_for(:controller => :rb_stories, - :action => :update, - :id => story_id, - :only_path => true) - @sessiondriver.submit :put, path, {:next => nxt, :project_id => @project.id} - verify_request_status(200) unless attempt - - @story = RbStory.find(story_id.to_i) -end - -When /^I (try to )?request the server_variables resource$/ do |attempt| - visit url_for(:controller => :rb_server_variables, :action => :project, :project_id => @project.id, :format => 'js', :only_path => true, :context => 'backlogs') - verify_request_status(200) unless attempt -end - -When /^I (try to )?update the impediment$/ do |attempt| - path = url_for(:controller => :rb_impediments, - :action => :update, - :id => @impediment_params['id'], - :only_path => true) - @sessiondriver.submit :post, path, @impediment_params - verify_request_status(200) unless attempt -end - -When /^I (try to )?update the sprint$/ do |attempt| - path = url_for(:controller => 'rb_sprints', - :action => "update", - :sprint_id => @sprint_params['id'], - :only_path => true) - @sessiondriver.submit :put, path, @sprint_params - verify_request_status(200) unless attempt -end - -# Bug #855 update sprint details must not change project of sprint. Use complete javascript stack, as it injects project_id into request -When /^I change the sprint name of "([^"]*)" to "([^"]*)"$/ do |sprint, newname| - page.find(:xpath, "//div[contains(normalize-space(text()), '#{sprint}')]").click - within "#content" do - fill_in('name', :with => newname) - click_link('Save') - end - wait_for_ajax -end - -When /^I create the story with subject "([^"]*)"$/ do |subject| - page.find(:xpath,"//div[contains(@class,'product_backlog')]//div[@class='menu']").click - page.find(:xpath,"//a[contains(normalize-space(text()),'New Story')]").click - #Remove focus from menu to avoid overlap when saving - page.find(:xpath,"//div[@id='backlogs_container']").click - within ".product_backlog" do - fill_in('subject', :with => subject) - click_link('Save') - wait_for_ajax - end -end - -When(/^I change the subject of story "([^"]*)" to "([^"]*)"$/) do |story, subject| - page.find(:xpath,"//span[contains(normalize-space(text()), '#{story}')]").click - within "#content" do - fill_in('subject', :with => subject) - click_link('Save') - end - wait_for_ajax -end - -When(/^I change the subject of task "([^"]*)" to "([^"]*)"$/) do |task, subject| - page.find(:xpath,"//div[normalize-space(text())='#{task}']").click - within "#task_editor" do - fill_in('subject', :with => subject) - end - page.find(:xpath,"//button/span[contains(normalize-space(text()),'OK')]").click - wait_for_ajax -end - -When /^I (try to )?update the story$/ do |attempt| - path = url_for(:controller => :rb_stories, - :action => :update, - :id => @story_params[:id], - :only_path => true) - @sessiondriver.submit :put, path, @story_params - verify_request_status(200) unless attempt - @story.reload -end - -When /^I (try to )?update the task$/ do |attempt| - path = url_for(:controller => :rb_tasks, - :action => :update, - :id => @task_params[:id], - :only_path => true) - @sessiondriver.submit :put, path, @task_params - verify_request_status(200) unless attempt -end - -Given /^I visit the scrum statistics page$/ do - visit url_for(:controller => 'rb_all_projects', :action => 'statistics', :only_path => true) -end - -When /^I try to download the calendar feed$/ do - visit url_for({ :key => @api_key, :controller => 'rb_calendars', :action => 'ical', :project_id => @project, :format => 'xml', :only_path => true}) -end - -When /^I try to download the XML sheet for (.+)$/ do |sprint_name| - sprint = RbSprint.find_by_name(sprint_name) - visit url_for({:key => @api_key, :controller => :rb_sprints, :action => :download, - :sprint_id => sprint, :format => :xml, :only_path => true}) -end - -When /^I view the master backlog$/ do - visit url_for(:controller => :projects, :action => :show, :id => @project, :only_path => true) - click_link("Backlogs") -end - -When /^I view the stories of (.+) in the issues tab/ do |sprint_name| - sprint = RbSprint.find_by_name(sprint_name) - visit url_for(:controller => :rb_queries, :action => :show, :project_id => sprint.project_id, :sprint_id => sprint.id, :only_path => true) -end - -When /^I view the stories in the issues tab/ do - visit url_for(:controller => :rb_queries, :action => :show, :project_id=> @project.id, :only_path => true) -end - -When /^I view issues tab with backlog columns/ do - visit url_for(:controller => :issues, :action => :index, :project_id=> @project.id, :c => ["subject","story_points","release","position","velocity_based_estimate","remaining_hours"], :only_path => false) -end - -When /^I view the sprint notes$/ do - visit url_for(:controller => 'rb_wikis', :action => 'show', :sprint_id => current_sprint.id, :only_path => true) -end - -When /^I edit the sprint notes$/ do - visit url_for(:controller => 'rb_wikis', :action => 'edit', :sprint_id => current_sprint.id, :only_path => true) -end - -#FIXME this does not work well. -#When /^I follow "Wiki" from the menu of a Sprint$/ do -# #capybara will not follow our menu. so here a hack. -# page.find(:xpath, "//div[@id='main']//div[@class='menu']").click -# node = page.find(:xpath, "//div[@id='main']//a[contains(normalize-space(text()),'Wiki')]").click -#end - -When /^the browser fetches (.+) updated since (\d+) (\w+) (.+)$/ do |object_type, how_many, period, direction| - date = eval("#{ how_many }.#{ period }.#{ direction=='from now' ? 'from_now' : 'ago' }") - date = date.strftime("%B %d, %Y %H:%M:%S") + '.' + (date.to_f % 1 + 0.001).to_s.split('.')[1] - visit url_for(:controller => 'rb_updated_items', :action => :show, :project_id => @project.id, :only => object_type, :since => date, :only_path => true) -end - -When /^I click (create|copy|save)$/ do |command| - page.find(:xpath, '//input[@name="commit"]').click -end - -#backlog dnd -When /^I drag story (.+) to the sprint backlog of (.+?)( before the story (.+))?$/ do |story, sprint, before, beforearg| - drag_story(story, sprint, beforearg) -end - -When /^I drag story (.+?) to the product backlog( before the story (.+))?$/ do |story, before, beforearg| - drag_story(story, nil, beforearg) -end - -#taskboard dnd -When /^I drag task (.+) to the state (.+) in the row of (.+)$/ do |task, state, story| - drag_task(task, state, story) -end - -When /^I create an impediment named (.+) which blocks (.+?)(?: and (.+))?$/ do |impediment_name, blocked_name, blocked2_name| - blocked = Issue.find_by_subject(blocked_name) - blocked_list = [blocked.id.to_s] - blocked2 = Issue.find_by_subject(blocked2_name) if blocked2_name != '' - blocked_list << blocked2.id.to_s if blocked2 - page.find("#impediments span.add_new").click - with_scope('#task_editor') do - fill_in("subject", :with => impediment_name) - fill_in("blocks", :with => blocked_list.join(',')) - end - with_scope('.task_editor_dialog') do - click_button("OK") - end - wait_for_ajax - page.should have_xpath("//div", :text => impediment_name) #this did not work as documented. so wait explicitely for ajax above. -end - -When /^I update the status of task (.+?) to (.+?)$/ do |task, state| - task = RbTask.find_by_subject(task) - task.should_not be_nil - @task_params = HashWithIndifferentAccess.new(task.attributes) - state = IssueStatus.find_by_name(state) - @task_params[:status_id] = state.id - path = url_for(:controller => :rb_tasks, - :action => :update, - :id => @task_params[:id], - :only_path => true) - @sessiondriver.submit :put, path, @task_params - verify_request_status(200) -end - -# Low level tests on higher_item and lower_item, should be rspec tests -When /^I call move_after\("([^"]*)"\) on "([^"]*)"$/ do |arg, obj| - obj = RbStory.find_by_subject(obj) - arg = (arg=="nil") ? nil : RbStory.find_by_subject(arg) - obj.move_after(arg) -end -When /^I call move_before\("([^"]*)"\) on "([^"]*)"$/ do |arg, obj| - obj = RbStory.find_by_subject(obj) - arg = (arg=="nil") ? nil : RbStory.find_by_subject(arg) - obj.move_before(arg) -end - -When /^I request the completed sprints$/ do - page.find(:css, "#show_completed_sprints").click - wait_for_ajax -end diff --git a/features/step_definitions/dragdrop.rb b/features/step_definitions/dragdrop.rb deleted file mode 100644 index a6617214f..000000000 --- a/features/step_definitions/dragdrop.rb +++ /dev/null @@ -1,64 +0,0 @@ - -# sleep is a BAD THING(tm) -# -#check on the ajax request count of jQuery -#raise Capybara::TimeoutError after some time (default 5s, here 15s, set in support/setup.rb). -def wait_for_ajax - wait_until { - #wait until all animations are finished AND all ajax requests are finished. - page.evaluate_script('RB.$(":animated").length') == 0 && page.evaluate_script('RB.$.active') == 0 #jQuery.ajax.active in the next release - } -end - -# on the master backlog page drag a story -# Params: -# story_name: subject of the dragged story -# target_sprint_name: name of the sprint the story should be dragged into or nil for product backlog -# before_story_name: name|nil (optional) of the story in the target sprint where to position the source -def drag_story(story_name, target_sprint_name, before_story_name) - @last_drag_and_drop = {} - story = RbStory.find_by_subject(story_name.strip) - story.should_not be_nil - @last_drag_and_drop[:version_id_before] = story.fixed_version_id - @last_drag_and_drop[:position_before] = story.position - element = page.find(:css, "#story_#{story.id}") - - sprint_id = target_sprint_name.nil? ? 'product-backlog' : sprint_id_from_name(target_sprint_name.strip) - target = page.find(:css, "#stories-for-#{sprint_id}") - target.should_not be_nil - - element.drag_to(target) - if before_story_name - before = RbStory.where(:subject => before_story_name.strip).first - before.should_not be_nil -#jquery DnD is weird. sortable will not work with drag_to. this is known. selenium drag_by might work. - element.drag_to(page.find(:css, "#story_#{before.id}")) - end - - wait_for_ajax - story.reload - return story -end - -def get_taskboard_state_index - taskboard_state_index = {} - index = 1 - page.all(:css, "#taskboard #board_header td").each{|cell| - taskboard_state_index[cell.text] = index - index += 1 - } - taskboard_state_index -end - -def drag_task(task, state, story) - task = RbTask.where(:subject => task).first - story = RbStory.where(:subject => story).first - source = page.find(:css, "#taskboard #issue_#{task.id}") - n = get_taskboard_state_index[state] - target = page.find(:css, "#taskboard #swimlane-#{story.id} td:nth-child(#{n})") - source.drag_to(target) - - wait_for_ajax - task.reload - return task -end diff --git a/features/step_definitions/helpers.rb b/features/step_definitions/helpers.rb deleted file mode 100644 index 404df43b9..000000000 --- a/features/step_definitions/helpers.rb +++ /dev/null @@ -1,349 +0,0 @@ -require 'timecop' -require 'chronic' -require 'cucumber/ast/background' -require 'benchmark' - -class Time - def force_tz(tz=nil) - tz = ActiveSupport::TimeZone['UTC'] if tz.nil? - tz.local(self.year, self.month, self.day, self.hour, self.min, self.sec) - end -end - -#module Cucumber -# module Ast -# class Background #:nodoc: -# alias_method :accept_org, :accept -# -# def accept(visitor) -# #cache_file = self.feature.file + '.background' -# #return backlogs_load(cache_file) if File.exist?(cache_file) && File.mtime(cache_file) > File.mtime(self.feature.file) -# total = Benchmark.measure{ accept_org(visitor) }.total -# puts "Background #{File.basename(self.feature.file, File.extname(self.feature.file))}: #{total}s" -# #backlogs_dump(cache_file) if !File.exist?(cache_file) || File.mtime(cache_file) < File.mtime(self.feature.file) -# end -# -# def backlogs_dump(filename) -# skip_tables = ["schema_info"] -# dump = {} -# (ActiveRecord::Base.connection.tables - skip_tables).each{|table_name| -# dump[table_name] = ActiveRecord::Base.connection.select_all("select * from #{table_name}") -# } -# File.open(filename, 'w'){|file| file.write(dump.to_yaml)} -# end -# -# def backlogs_load(filename) -# dump = YAML::load_file(filename) -# dump.each_pair{|table_name, rows| -# ActiveRecord::Base.connection.execute("delete from #{table_name}") -# next unless rows.size > 0 -# columns = rows[0].keys -# sql = "insert into #{table_name} (#{columns.join(',')}) values (#{columns.collect{|c| '%s'}.join(',')})" -# rows.each{|row| -# ActiveRecord::Base.connection.execute(sql % columns.collect{|c| ActiveRecord::Base::sanitize(row[c])}) -# } -# } -# end -# end -# end -#end - -def get_project(identifier) - Project.find(identifier) -end - -def get_releases(list) - list.split(',').collect{|r| RbRelease.find_by_name(r).id} -end - -def get_tracker(identifier) - Tracker.find_by_name(identifier) -end - - -def current_sprint(name = nil) - if name.is_a?(Symbol) - case name - when :keep - # keep - else - raise "Unexpected command #{name.inspect}" - end - elsif name.is_a?(String) - @sprint = RbSprint.find_by_name(name) - elsif name.nil? - @sprint = @sprint ? RbSprint.find_by_id(@sprint.id) : nil - else - raise "Unexpected #{name.class}" - end - return @sprint -end - -def verify_request_status(status) - if page.driver.respond_to?('response') # javascript drivers has no response - page.driver.response.status.should equal(status),\ - "Request returned #{page.driver.response.status} instead of the expected #{status}: "\ - "#{page.driver.response.status}\n"\ - "#{page.driver.response.body}" - else - true - end -end - -def set_now(time, options={}) - return if time.to_s == '' - raise "options must be a hash" unless options.is_a?(Hash) - - sprint = options.delete(:sprint) - reset = options.delete(:reset) - msg = options.delete(:msg).to_s - - raise "Unexpected options: #{options.keys.inspect}" unless options.size == 0 - - msg = "#{msg}: " unless msg == '' - tz = RbIssueHistory.burndown_timezone - - if (time.is_a?(Integer) || time =~ /^[0-9]+$/) && sprint - day = Integer(time) - - if day < 0 - time = sprint.days[1].to_time.force_tz(tz) + (day * 24*60*60) - else - time = sprint.days[day].to_time.force_tz(tz) - end - time += 60*60 - - # if we're setting the date to today again, don't do anything - return if time.to_date == tz.today #Date.today is not utc. its local. Date.current might be. - else - Chronic.time_class = tz #convince chronic to use time zone - time = Chronic.parse(time) - end - raise "#{msg}Time #{time} is not in timezone #{tz}" unless time.utc_offset == tz.utc_offset - - if reset - # don't test anything, just set the time - else - # Time zone must be set correctly, or ActiveRecord will store local, but retrieve UTC, which screws to Time.to_date. WTF people. - now = tz.now - - timediff = now - time - raise "#{msg}You may not travel back in time (it is now #{now}, and you want it to be #{time}" if timediff > 0 #WHY? i am testing, ain't i? - end - - Timecop.travel(time) -end - -def story_after(rank, project, sprint=nil) - return nil if rank.blank? - - rank = rank.to_i if rank.is_a?(String) && rank =~ /^[0-9]+$/ - - nxt = RbStory.backlog_scope(:project => project, :sprint => sprint).find_by_rank(rank) - return nil if nxt.nil? - - return nxt.id -end - -def time_offset(o) - o = o.to_s.strip - return nil if o == '' - - m = o.match(/^(-?)(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?$/) - raise "Not a valid offset spec '#{o}'" unless m && o != '-' - _, sign, _, d, _, h, _, m = m.to_a - - return ((((d.to_i * 24) + h.to_i) * 60) + m.to_i) * 60 * (sign == '-' ? -1 : 1) -end - -def offset_to_hours(o) - # seconds to hours - return o/60/60 -end - -def initialize_story_params(project_id = nil) - @story = HashWithIndifferentAccess.new(RbStory.new.attributes) - @story['project_id'] = project_id ? Project.find(project_id).id : @project.id - @story['tracker_id'] = RbStory.trackers.include?(Backlogs.setting[:default_story_tracker]) ? Backlogs.setting[:default_story_tracker] : RbStory.trackers.first - @story['author_id'] = @user.id - @story -end - -def initialize_task_params(story_id) - params = HashWithIndifferentAccess.new(RbTask.new.attributes) - params['project_id'] = RbStory.find_by_id(story_id).project_id - params['tracker_id'] = RbTask.tracker - params['author_id'] = @user.id - params['parent_issue_id'] = story_id - params['status_id'] = RbTask.class_default_status.id - params -end - -def sprint_id_from_name(name) - sprint = RbSprint.find_by_name(name) - raise "No sprint by name #{name}" unless sprint - return sprint.id -end - -def initialize_impediment_params(attributes) - #requires project_id in attributes (pa sharing) - params = HashWithIndifferentAccess.new(RbTask.new.attributes).merge(attributes) - params['tracker_id'] = RbTask.tracker - params['author_id'] = @user.id - params['status_id'] = RbTask.class_default_status.id - params -end - -def initialize_sprint_params - params = HashWithIndifferentAccess.new(RbSprint.new.attributes) - params['project_id'] = @project.id - params -end - -def login_as(user, password) - logout - visit url_for(:controller => 'account', :action=>'login', :only_path=>true) - fill_in 'username', :with => user - fill_in 'password', :with => password - page.find(:xpath, '//input[@name="login"]').click - @user = User.find_by(:login => user) - User.current = @user - @sessiondriver = Capybara.current_session.driver -end - -def login_as_product_owner - login_as('jsmith', 'jsmith') - setup_permissions('product owner') -end - -def login_as_scrum_master - login_as('jsmith', 'jsmith') - setup_permissions('scrum master') -end - -def login_as_team_member - login_as('jsmith', 'jsmith') - setup_permissions('team member') -end - -def login_as_admin - login_as('admin', 'admin') -end - -def setup_permissions(typ) - role = Role.find_by(:name =>'Manager') - if typ == 'scrum master' - role.permissions << :view_master_backlog - role.permissions << :view_releases - role.permissions << :view_taskboards - role.permissions << :update_sprints - role.permissions << :update_stories - role.permissions << :create_impediments - role.permissions << :update_impediments - role.permissions << :subscribe_to_calendars - role.permissions << :view_wiki_pages # NOTE: This is a Redmine core permission - role.permissions << :edit_wiki_pages # NOTE: This is a Redmine core permission - role.permissions << :create_sprints - elsif typ == 'team member' - role.permissions << :view_master_backlog - role.permissions << :view_releases - role.permissions << :view_taskboards - role.permissions << :create_tasks - role.permissions << :update_tasks - else #product owner - role.permissions << :view_master_backlog - role.permissions << :create_stories - role.permissions << :update_stories - role.permissions << :view_releases - role.permissions << :modify_releases - role.permissions << :view_scrum_statistics - role.permissions << :configure_backlogs - end - role.save! - - @projects.each{|project| - m = Member.new(:user => @user, :roles => [role]) - project.members << m - } -end - -def task_position(task) - p1 = task.story.tasks.select{|t| t.id == task.id}[0].rank - p2 = task.rank - p1.should == p2 - return p1 -end - -def story_position(story) - p1 = RbStory.backlog(story.project, story.fixed_version_id, nil).select{|s| s.id == story.id}[0].rank - p2 = story.rank - p1.should == p2 - - s2 = RbStory.backlog_scope(:project => @project, :sprint => current_sprint).find_by_rank(p1) - s2.should_not be_nil - s2.id.should == story.id - - return p1 -end - -def logout - path = url_for(:controller => 'account', :action=>'logout', :only_path=>true) - if @sessiondriver - @sessiondriver.submit :post, path, @task_params - elsif page.driver.respond_to?(:post) - page.driver.post(path, {}) - else - post path - end - @user = nil - User.current = nil -end - -def show_table(title, header, data) - sizes = data.transpose.collect{|d| d.collect{|s| s.to_s.length}.max } - sizes = header.zip(sizes).collect{|hs| [hs[0].length, hs[1]].max } - sizes = sizes.zip(header).collect{|sh| sh[1].is_a?(Array) ? sh[1][1] : sh[0] } - - header = header.collect{|h| h.is_a?(Array) ? h[0] : h} - - header = header.zip(sizes).collect{|hs| hs[0].ljust(hs[1]) } - - puts "\n#{title}" - puts "\t| #{header.join(' | ')} |" - - data.each {|row| - row = row.zip(sizes).collect{|rs| rs[0].to_s[0,rs[1]].ljust(rs[1]) } - puts "\t| #{row.join(' | ')} |" - } - - puts "\n\n" -end - -def check_backlog_menu_new_story(links, project) - found = false - if links.length==1 - project_id = @project.id - found = true if project_id.to_i == project.id - else - links.each{|a| - project_id = a[:class][%r[\d+$]] - found = true if project_id.to_i == project.id - } - end - return found -end - -When /^(?:|I )select multiple "([^"]*)" from "([^"]*)"(?: within "([^"]*)")?$/ do |value, field, selector| - options = page.find_field(field).all("option").collect(&:text) - with_scope(selector) do - # clear all options - options.each{|v| - unselect(v, :from => field) - } - # Select the requested options - value.split(",").each{|v| - select(v, :from => field) - } - end -end - diff --git a/features/step_definitions/release_steps.rb b/features/step_definitions/release_steps.rb deleted file mode 100644 index 40b25a14e..000000000 --- a/features/step_definitions/release_steps.rb +++ /dev/null @@ -1,298 +0,0 @@ -Then /^show me the releases$/ do - RbRelease.all.each{|release| - puts "Release: #{release}" - } -end - -Then /^show me release (.+)$/ do |release_name| - release = RbRelease.find_by_name(release_name) - release.should_not be_nil - puts "Release: #{release}" - release.issues.each{|issue| puts " Issue: #{issue}" } -end - -Then /^show me the release backlog of (.+)$/ do |release_name| - release = RbRelease.find_by_name(release_name) - release.should_not be_nil - RbStory.release_backlog(release).each{|issue| - puts " #{issue}" - } -end - -When /^I move story (.+) to the product backlog$/ do |story_name| - story = RbStory.find_by_subject(story_name) - story.init_journal(User.current) - story.release = nil - story.save -end - -When /^I move story (.+) to the release (.+)$/ do |story_name,release_name| - story = RbStory.find_by_subject(story_name) - story.should_not be_nil - release = RbRelease.find_by_name(release_name) - release.should_not be_nil - story.release = release - story.save -end - -Given /^I have set planned velocity to (\d+) points per (month|fortnight|week) for (.+)$/ do |velocity,velocity_timespan, release_name| - release = RbRelease.find_by_name(release_name) - release.planned_velocity = velocity - release.save -end - - -When /^I add story (.+) to release (.+)$/ do |story_name, release_name| - story = RbStory.find_by_subject(story_name) - @story_params = { - :id => story.id, - :release_id => RbRelease.find_by_name(release_name).id - } - page.driver.post( - url_for(:controller => :rb_stories, - :action => :update, - :id => @story_params[:id], - :only_path => true), - @story_params - ) - verify_request_status(200) - story.reload -end - -Then /^story (.+) should belong to release (.+)$/ do |story_name, release_name| - release = RbRelease.find_by_name(release_name) - release.should_not be_nil - story = RbStory.find_by_subject(story_name) - story.should_not be_nil - release.issues.exists?(story.id).should be true -end - -Then /^story (.+) should not belong to any release$/ do |story_name| - story = RbStory.find_by_subject(story_name) - story.should_not be_nil - story.release_id.should be_nil -end - -Then /^I should see the release backlog of (.+)$/ do |release| - release = RbRelease.find_by_name(release) - release.should_not be_nil - page.should have_css("#stories-for-release-#{release.id}") -end - -Then /^I should see (\d+) stories in the release backlog of (.+)$/ do |count, release| - release = RbRelease.find_by_name(release) - release.should_not be_nil - page.all(:css, "#stories-for-release-#{release.id} .story").length.should == count.to_i -end - -Then /^release "([^"]*)" should have (\d+) story points$/ do |release, points| - release = RbRelease.find_by_name(release) - release.should_not be_nil - release.remaining_story_points.should == points.to_f -end - -Then /^The release "([^"]*)" should be closed$/ do |release| - release = RbRelease.find_by_name(release) - release.status.should == 'closed' - release.closed?.should be true -end - -Given /^I have made the following story mutations:$/ do |table| - #Mutations happen at 'day' relative to the story's sprint - table.hashes.each do |mutation| - mutation.delete_if{|k, v| v.to_s.strip == '' } - story = RbStory.find_by_subject(mutation.delete('story')) - story.should_not be_nil - current_sprint(story.fixed_version.name) - set_now(mutation.delete('day'), :msg => story.subject, :sprint => current_sprint) - Time.zone.now.should be >= story.created_on - - story.init_journal(User.current) - - status_name = mutation.delete('status').to_s - if status_name.blank? - status = nil - else - status = IssueStatus.find_by_name(status_name) - raise "No such status '#{status_name}'" unless status - status = status.id - end - - story.status_id = status if status - story.save!.should be true - - mutation.should == {} - end -end - -Given /^I accept story ([^"]*)$/ do |story_name| - story = RbStory.find_by_subject(story_name) - story.should_not be_nil - status = IssueStatus.find_by_name("Accepted") - story.status_id = status.id - story.save!.should be true -end - - -Given /^I duplicate ([^"]*) to release ([^"]*) as ([^"]*)$/ do |story_old, release_name, story_new| - issue = Issue.find_by_subject(story_old) - release = RbRelease.find_by_name(release_name) - issue.should_not be_nil - release.should_not be_nil - issue_copy = issue.copy({:release_id => release.id, - :fixed_version_id => nil, - :subject => story_new}) - issue_copy.save -end - -Given /^I set story ([^"]*) release relationship to (auto|initial|continued|added)$/ do |story_name,relation_type| - issue = Issue.find_by_subject(story_name) - issue.should_not be_nil - issue.release_relationship = relation_type - issue.save -end - -Then /^release "([^"]*)" should have (\d+) sprints$/ do |release, num| - release = RbRelease.find_by_name(release) - release.should_not be_nil - release.sprints.size.should == num.to_i -end - -Then /^show me the burndown data for release "([^"]*)"$/ do |release| - release = RbRelease.find_by_name(release) - burndown = release.burndown - puts "days #{release.days}" - puts "closed #{burndown[:closed_points]}" - puts "added #{burndown[:added_points]}" - puts "bl points #{burndown[:backlog_points]}" - puts "total #{burndown[:total_points]}" - puts "trend add #{burndown[:trend_added]}" - puts "trend cls #{burndown[:trend_closed]}" - puts "planned #{burndown[:planned]}" - -end - -Then /^the release burndown for release "([^"]*)" should be:$/ do |release, table| - release = RbRelease.find_by_name(release) - burndown = release.burndown - table.hashes.each do |metrics| - sprint = metrics.delete('sprint') - sprint = (sprint == 'start' ? 0 : sprint.to_i) - metrics.keys.sort{|a, b| a.to_s <=> b.to_s}.each do |k| - expect = metrics[k] - got = burndown[k.intern][sprint] - got = "%d, %s: %.1f" % [sprint, k, got] - expect = "%d, %s: %.1f" % [sprint, k, expect] - #puts "test: #{expect} == #{got}" - got.should == expect - end - end -end - -Then /^([^"]*) has planned timespan of (\d+) days starting from ([^"]*)$/ do |release_name, days, start| - release = RbRelease.find_by_name(release_name) - burndown = release.burndown - - start_date = Date.parse start - expected_date = start_date + days.to_i - - burndown[:planned][0][0].should === start_date - burndown[:planned][1][0].should === expected_date -end - -Then /^([^"]*) has trend estimate end date at ([^"]*)$/ do |release_name, expected_end_date| - release = RbRelease.find_by_name(release_name) - burndown = release.burndown - expected_end_date = Date.parse expected_end_date - puts "Trend estimated end date: #{burndown.trend_estimate_end_date}" - burndown.trend_estimate_end_date.should === expected_end_date -end - -Then /^(.*?) has trend (scope|closed) based on dates "(.*?)"$/ do |release_name,line_name, list_dates| - release = RbRelease.find_by_name(release_name) - burndown = release.burndown - burndown_line = "lr_#{line_name}".intern - lr = burndown.send(burndown_line) # fetch linear regression object - array_dates = list_dates.split(",").collect{|d| Date.parse d } - puts "days: #{array_dates}" - (((array_dates | lr.days) - (array_dates & lr.days)).empty?).should be true -end - -Then /^(.*?) has trend (scope|closed) with slope of (.*?) points per day intercepting at (.*?) points$/ do |release_name,line_name, slope, intercept| - release = RbRelease.find_by_name(release_name) - burndown = release.burndown - expected_slope = slope.to_f - expected_intercept = intercept.to_f - burndown_line = "lr_#{line_name}".intern - lr = burndown.send(burndown_line) # fetch linear regression object - puts "slope: #{lr.slope}" - puts "intercept: #{lr.intercept}" - ((expected_slope - lr.slope).abs <= 0.01).should be true - ((expected_intercept - lr.intercept).abs <= 0.01).should be true -end - - -Then /^journal for "([^"]*)" should show change to release "([^"]*)"$/ do |story_name,release_name| - release = RbRelease.find_by_name(release_name) - story = RbStory.find_by_subject(story_name) - found_change = false - # Find journal entry containing change to release - story.journals.each{|journal| - journal.details.each{|jd| - next unless jd.property == 'attr' && ['release_id'].include?(jd.prop_key) - found_change = true if jd.value.to_i == release.id - } - } - found_change.should be true - - # Verify Backlogs issue history - h = story.history.filter_release([RbIssueHistory.burndown_timezone.now.to_date]) - h[0][:release].should == release.id -end - -Given /^I view issues tab grouped by releases/ do - visit url_for(:controller => :issues, :action => :index, :project_id=> @project.id, :group_by => 'release', :only_path => false) -end - -Then(/^I should see "(.*?)" group in the issues list$/) do |release_name| - page.should have_css("#query_form") - page.should have_xpath("//tr[contains(@class,'group') and contains(.,'#{release_name}')]") -end - -Given(/^I want to bulk edit "(.*?)" and "(.*?)"$/) do |arg1, arg2| - @bulk_issues = [] - @bulk_issues << RbStory.where(subject: arg1).first - @bulk_issues << RbStory.where(subject: arg2).first - visit url_for(:controller => :issues, - :action => :bulk_edit, - :ids => @bulk_issues.map(&:id) - ) - verify_request_status(200) -end - -Given(/^I want to set the release to "(.*?)"$/) do |release_name| - page.select(release_name, :from => 'issue_release_id') -end - -Given(/^I want to set the release relationship to (Auto|Initial|Continued|Added)$/) do |relationship| - page.select(relationship, :from => 'issue_release_relationship') -end - -When(/^I update the stories$/) do - within "#content" do - click_button('Submit') - end - verify_request_status(200) - @bulk_issues.each{|i| i.reload } -end - -Then(/^story "(.*?)" should have release "(.*?)"$/) do |story_name,release_name| - story = RbStory.find_by_subject(story_name) - release = RbRelease.find_by_name(release_name) - story.release.id.should == release.id -end - -Then(/^story "(.*?)" should have release relationship (Auto|Initial|Continued|Added)$/) do |story_name,relationship| - story = RbStory.find_by_subject(story_name) - story.release_relationship.should == relationship.downcase -end diff --git a/features/step_definitions/routing_steps.rb b/features/step_definitions/routing_steps.rb deleted file mode 100644 index b62416786..000000000 --- a/features/step_definitions/routing_steps.rb +++ /dev/null @@ -1,38 +0,0 @@ -When /^I (post|put|get) the "(.+)" page$/ do |method,url| - @url = url - @request = { method => url } - @method = method -end -When /^I (post|put|get) the "(.+)" page with params:$/ do |method,url,params| - @url = url - @request = { method => url } - @method = method - - @params = params.transpose.hashes[0] -end -When /^I (post|put|get) the "(.+)" page using format "(.+)"$/ do |method,url, format| - @url = url - @request = { method => url } - @method = method - - @format = format -end - -Then /^application should route me to:$/ do |controller| - @routes = Rails.application.routes # workaround for assert_recognizes bug - controller = controller.transpose - # convert headers to symbols - controller.map_headers! { |header| header.to_sym } - controller_with_params = controller.hashes[0] - @request.should route_to controller_with_params - controller_with_params[:format] = @format if @format - controller_with_params.merge!(@params) if @params - url = url_for(controller_with_params) - if @method == 'put' - put url, controller_with_params - elsif @method == 'get' - get url, controller_with_params - else - post url, controller_with_params - end -end diff --git a/features/step_definitions/stacked_data.rb b/features/step_definitions/stacked_data.rb deleted file mode 100644 index de4a0dc0d..000000000 --- a/features/step_definitions/stacked_data.rb +++ /dev/null @@ -1,52 +0,0 @@ -Given(/^I initialize RbStackedData with closed date (.*)$/) do |date| - date = Time.zone.parse(date).to_date - @stacked_data = RbStackedData.new(date) -end - -Given(/^I add the following series "(.*)":$/) do |id,table| - tmp_days = [] - tmp_total_points = [] - tmp_closed_points = [] - table.hashes.each do |entry| - tmp_days << Time.zone.parse(entry[:days]).to_date - tmp_total_points << entry[:total_points].to_i - tmp_closed_points << entry[:closed_points].to_i - end - series = {:days => tmp_days, :total_points => tmp_total_points, :closed_points => tmp_closed_points} - @stacked_data.add(series,id,true) -end - -Given(/^I finish RbStackedData$/) do - @stacked_data.finalize(true) -end - - -Then(/^series (\d+) should be:$/) do |series_number, table| - idx = series_number.to_i - expected_days = [] - expected_total = [] - table.hashes.each do |entry| - expected_days << Time.zone.parse(entry[:days]).to_date - expected_total << entry[:total_points].to_i - end - puts @stacked_data[idx].inspect - @stacked_data[idx][:days].should == expected_days - @stacked_data[idx][:total_points].should == expected_total -end - -Then(/^closed series should be:$/) do |table| - expected_days = [] - expected_closed = [] - table.hashes.each do |entry| - expected_days << Time.zone.parse(entry[:days]).to_date - expected_closed << entry[:closed_points].to_i - end - puts @stacked_data.closed_data.inspect - @stacked_data.closed_data[:days].should == expected_days - @stacked_data.closed_data[:closed_points].should == expected_closed -end - -Then(/^series "(.*)" trend end date should be (.*)$/) do |id,date| - date = Time.zone.parse(date).to_date - @stacked_data.total_estimates[id][:end_date_estimate].should === date -end diff --git a/features/step_definitions/web_steps.rb b/features/step_definitions/web_steps.rb deleted file mode 100644 index 993c2cb1e..000000000 --- a/features/step_definitions/web_steps.rb +++ /dev/null @@ -1,220 +0,0 @@ -# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril. -# It is recommended to regenerate this file in the future when you upgrade to a -# newer version of cucumber-rails. Consider adding your own code to a new file -# instead of editing this one. Cucumber will automatically load all features/**/*.rb -# files. - - -require 'uri' -require 'cgi' -require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths")) - -module WithinHelpers - def with_scope(locator) - locator ? within(locator) { yield } : yield - end -end -World(WithinHelpers) - -Given /^(?:|I )am on (.+)$/ do |page_name| - visit path_to(page_name) -end - -When /^(?:|I )go to (.+)$/ do |page_name| - visit path_to(page_name) -end - -When /^(?:|I )press "([^"]*)"(?: within "([^"]*)")?$/ do |button, selector| - with_scope(selector) do - click_button(button) - end -end - -When /^(?:|I )follow "([^"]*)"(?: within "([^"]*)")?$/ do |link, selector| - with_scope(selector) do - click_link(link) - end -end - -When /^(?:|I )fill in "([^"]*)" with "([^"]*)"(?: within "([^"]*)")?$/ do |field, value, selector| - with_scope(selector) do - fill_in(field, :with => value) - end -end - -When /^(?:|I )fill in "([^"]*)" for "([^"]*)"(?: within "([^"]*)")?$/ do |value, field, selector| - with_scope(selector) do - fill_in(field, :with => value) - end -end - -# Use this to fill in an entire form with data from a table. Example: -# -# When I fill in the following: -# | Account Number | 5002 | -# | Expiry date | 2009-11-01 | -# | Note | Nice guy | -# | Wants Email? | | -# -# TODO: Add support for checkbox, select og option -# based on naming conventions. -# -When /^(?:|I )fill in the following(?: within "([^"]*)")?:$/ do |selector, fields| - with_scope(selector) do - fields.rows_hash.each do |name, value| - fill_in(name, :with => value) - end - end -end - -When /^(?:|I )select "([^"]*)" from "([^"]*)"(?: within "([^"]*)")?$/ do |value, field, selector| - with_scope(selector) do - select(value, :from => field) - end -end - -When /^(?:|I )check "([^"]*)"(?: within "([^"]*)")?$/ do |field, selector| - with_scope(selector) do - check(field) - end -end - -When /^(?:|I )uncheck "([^"]*)"(?: within "([^"]*)")?$/ do |field, selector| - with_scope(selector) do - uncheck(field) - end -end - -When /^(?:|I )choose "([^"]*)"(?: within "([^"]*)")?$/ do |field, selector| - with_scope(selector) do - choose(field) - end -end - -When /^(?:|I )attach the file "([^"]*)" to "([^"]*)"(?: within "([^"]*)")?$/ do |path, field, selector| - with_scope(selector) do - attach_file(field, path) - end -end - -Then /^(?:|I )should see JSON:$/ do |expected_json| - require 'rubygems' - require 'json' - expected = JSON.pretty_generate(JSON.parse(expected_json)) - actual = JSON.pretty_generate(JSON.parse(response.body)) - expected.should == actual -end - -Then /^(?:|I )should see "([^"]*)"(?: within "([^"]*)")?$/ do |text, selector| - with_scope(selector) do - if page.respond_to? :should - page.should have_content(text) - else - assert page.has_content?(text) - end - end -end - -Then /^(?:|I )should see \/([^\/]*)\/(?: within "([^"]*)")?$/ do |regexp, selector| - regexp = Regexp.new(regexp) - with_scope(selector) do - if page.respond_to? :should - page.should have_xpath('//*', :text => regexp) - else - assert page.has_xpath?('//*', :text => regexp) - end - end -end - -Then /^(?:|I )should not see "([^"]*)"(?: within "([^"]*)")?$/ do |text, selector| - with_scope(selector) do - if page.respond_to? :should - page.should have_no_content(text) - else - assert page.has_no_content?(text) - end - end -end - -Then /^(?:|I )should not see \/([^\/]*)\/(?: within "([^"]*)")?$/ do |regexp, selector| - regexp = Regexp.new(regexp) - with_scope(selector) do - if page.respond_to? :should - page.should have_no_xpath('//*', :text => regexp) - else - assert page.has_no_xpath?('//*', :text => regexp) - end - end -end - -Then /^the "([^"]*)" field(?: within "([^"]*)")? should contain "([^"]*)"$/ do |field, selector, value| - with_scope(selector) do - field = find_field(field) - field_value = (field.tag_name == 'textarea') ? field.text : field.value - if field_value.respond_to? :should - field_value.should =~ /#{value}/ - else - assert_match(/#{value}/, field_value) - end - end -end - -Then /^the "([^"]*)" field(?: within "([^"]*)")? should not contain "([^"]*)"$/ do |field, selector, value| - with_scope(selector) do - field = find_field(field) - field_value = (field.tag_name == 'textarea') ? field.text : field.value - if field_value.respond_to? :should_not - field_value.should_not =~ /#{value}/ - else - assert_no_match(/#{value}/, field_value) - end - end -end - -Then /^the "([^"]*)" checkbox(?: within "([^"]*)")? should be checked$/ do |label, selector| - with_scope(selector) do - field_checked = find_field(label)['checked'] - if field_checked.respond_to? :should - field_checked.should be true - else - assert field_checked - end - end -end - -Then /^the "([^"]*)" checkbox(?: within "([^"]*)")? should not be checked$/ do |label, selector| - with_scope(selector) do - field_checked = find_field(label)['checked'] - if field_checked.respond_to? :should - field_checked.should be false - else - assert !field_checked - end - end -end - -Then /^(?:|I )should be on (.+)$/ do |page_name| - current_path = URI.parse(current_url).path - if current_path.respond_to? :should - current_path.should == path_to(page_name) - else - assert_equal path_to(page_name), current_path - end -end - -Then /^(?:|I )should have the following query string:$/ do |expected_pairs| - query = URI.parse(current_url).query - actual_params = query ? CGI.parse(query) : {} - expected_params = {} - expected_pairs.rows_hash.each_pair{|k,v| expected_params[k] = v.split(',')} - - if actual_params.respond_to? :should - actual_params.should == expected_params - else - assert_equal expected_params, actual_params - end -end - -Then /^show me the page$/ do - save_and_open_page -end diff --git a/features/support/env.rb b/features/support/env.rb deleted file mode 100644 index 80433d5d2..000000000 --- a/features/support/env.rb +++ /dev/null @@ -1,92 +0,0 @@ -require File.expand_path(File.dirname(__FILE__) + '/simplecov_env') - -# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril. -# It is recommended to regenerate this file in the future when you upgrade to a -# newer version of cucumber-rails. Consider adding your own code to a new file -# instead of editing this one. Cucumber will automatically load all features/**/*.rb -# files. - -require 'rubygems' -require 'spork' - -Spork.prefork do - begin - require 'cucumber/rails' - rescue LoadError # a hacky way to determine cucumber-rails version - ENV["RAILS_ENV"] ||= "cucumber" - require File.expand_path(File.dirname(__FILE__) + '/../../config/environment') - - require 'cucumber/formatter/unicode' # Remove this line if you don't want Cucumber Unicode support - require 'cucumber/rails/rspec' - require 'cucumber/rails/world' - require 'cucumber/rails/active_record' - require 'cucumber/web/tableish' - - - require 'capybara/rails' - require 'capybara/cucumber' - require 'capybara/session' - require 'cucumber/rails/capybara_javascript_emulation' # Lets you click links with onclick javascript handlers without using @culerity or @javascript - - end - - # Capybara defaults to XPath selectors rather than Webrat's default of CSS3. In - # order to ease the transition to Capybara we set the default here. If you'd - # prefer to use XPath just remove this line and adjust any selectors in your - # steps to use the XPath syntax. - Capybara.default_selector = :css - -end - -Spork.each_run do - # If you set this to false, any error raised from within your app will bubble - # up to your step definition and out to cucumber unless you catch it somewhere - # on the way. You can make Rails rescue errors and render error pages on a - # per-scenario basis by tagging a scenario or feature with the @allow-rescue tag. - # - # If you set this to true, Rails will rescue all errors and render error - # pages, more or less in the same way your application would behave in the - # default production environment. It's not recommended to do this for all - # of your scenarios, as this makes it hard to discover errors in your application. - ActionController::Base.allow_rescue = false - - # If you set this to true, each scenario will run in a database transaction. - # You can still turn off transactions on a per-scenario basis, simply tagging - # a feature or scenario with the @no-txn tag. If you are using Capybara, - # tagging with @culerity or @javascript will also turn transactions off. - # - # If you set this to false, transactions will be off for all scenarios, - # regardless of whether you use @no-txn or not. - # - # Beware that turning transactions off will leave data in your database - # after each scenario, which can lead to hard-to-debug failures in - # subsequent scenarios. If you do this, we recommend you create a Before - # block that will explicitly put your database in a known state. - # Cucumber::Rails::World.use_transactional_fixtures = true - # How to clean your database when transactions are turned off. See - # http://github.com/bmabey/database_cleaner for more info. - if defined?(ActiveRecord::Base) - begin - require 'database_cleaner' - DatabaseCleaner.strategy = :transaction - rescue NameError - raise "You need to add database_cleaner to your Gemfile (in the :test group) if you wish to use it." - end - end -end - -# Profile the code -if ENV["RUBY_PROF"]=="true" - Before do - require 'ruby-prof' - RubyProf.start - end - - After do |s| - result = RubyProf.stop - printer = RubyProf::CallStackPrinter.new(result) - f = File.open("ruby-prof_#{s.name}.html", 'w') - printer.print(f) - f.close - end -end diff --git a/features/support/paths.rb b/features/support/paths.rb deleted file mode 100644 index 62d3d9c6e..000000000 --- a/features/support/paths.rb +++ /dev/null @@ -1,35 +0,0 @@ -module NavigationHelpers - # Maps a name to a path. Used by the - # - # When /^I go to (.+)$/ do |page_name| - # - # step definition in web_steps.rb - # - def path_to(page_name) - case page_name - - when /the home\s?page/ - '/' - - when /project (.*) page/ - url_for(:controller => :projects, :action => :show, :id => Project.find($1).id, :only_path => true) - # Add more mappings here. - # Here is an example that pulls values out of the Regexp: - # - # when /^(.*)'s profile page$/i - # user_profile_path(User.find_by_login($1)) - - else - begin - page_name =~ /the (.*) page/ - path_components = $1.split(/\s+/) - self.send(path_components.push('path').join('_').to_sym) - rescue Object => e - raise "Can't find mapping from \"#{page_name}\" to a path.\n" + - "Now, go and add a mapping in #{__FILE__}" - end - end - end -end - -World(NavigationHelpers) diff --git a/features/support/setup.rb b/features/support/setup.rb deleted file mode 100644 index dfdfff05f..000000000 --- a/features/support/setup.rb +++ /dev/null @@ -1,65 +0,0 @@ -# Sets up the Rails environment for Cucumber -ENV["RAILS_ENV"] = "test" -require File.expand_path(File.dirname(__FILE__) + '/../../config/environment') -require 'cucumber/rails/world' -Cucumber::Rails::World.use_transactional_fixtures = true - -require 'minitest/spec' - -require 'minitest/unit' -require 'minitest/spec' - - -require 'minitest' -module MiniTestAssertions - def self.extended(base) - base.extend(MiniTest::Assertions) - base.assertions = 0 - end - - attr_accessor :assertions -end -World(MiniTestAssertions) - -require 'rspec/rails/matchers' -World(RSpec::Rails::Matchers::RoutingMatchers) - - -#Seed the DB -def seed_the_database - fixtures = ActiveRecord::FixtureSet - seed_the_database_with(fixtures) -end - -def seed_the_database_with(fixtures) - fixtures.reset_cache - fixtures_folder = File.join(Rails.root, 'test', 'fixtures') - fixtures_files = Dir[File.join(fixtures_folder, '*.yml')].map {|f| File.basename(f, '.yml') } - fixtures.create_fixtures(fixtures_folder, fixtures_files) -end - -seed_the_database - -if Cucumber::Rails.const_defined?(:Database) - # only for recent cucumber-rails - # do not clean the database between @javascript scenarios - Cucumber::Rails::Database.javascript_strategy = :transaction -else - DatabaseCleaner.strategy = nil - Before do - seed_the_database - end -end - -# use headless webkit to test javascript ui -require 'capybara/poltergeist' -Capybara.javascript_driver = :poltergeist -Capybara.register_driver :poltergeist do |app| - Capybara::Poltergeist::Driver.new(app, :inspector => true) -end -#give travis some time for ajax requests to complete -Capybara.default_wait_time = 15 - -require 'rake' -require 'rails/tasks' -Rake::Task["tmp:create"].invoke diff --git a/features/support/simplecov_env.rb b/features/support/simplecov_env.rb deleted file mode 100644 index 2df8db994..000000000 --- a/features/support/simplecov_env.rb +++ /dev/null @@ -1,6 +0,0 @@ -if RUBY_VERSION >= "1.9" - require 'simplecov' - SimpleCov.start 'rails' do - add_group('Backlogs', 'redmine_backlogs') - end -end diff --git a/features/team_member.feature b/features/team_member.feature deleted file mode 100644 index 13220f33a..000000000 --- a/features/team_member.feature +++ /dev/null @@ -1,284 +0,0 @@ -Feature: Team Member - As a team member - I want to manage update stories and tasks - So that I can update everyone on the status of the project - - Background: - Given the ecookbook project has the backlogs plugin enabled - And no versions or issues exist - And I add the tracker Bug to the story trackers - And I am a team member of the project - And I have deleted all existing issues - And I have defined the following logins: - | login | - | myuser | - And I have defined the following sprints: - | name | sprint_start_date | effective_date | - | Sprint 001 | 2010-01-01 | 2010-01-31 | - | Sprint 002 | 2010-02-01 | 2010-02-28 | - | Sprint 003 | 2010-03-01 | 2010-03-31 | - | Sprint 004 | 2010-03-01 | 2010-03-31 | - And I have defined the following stories in the following sprints: - | subject | sprint | tracker | - | Story 1 | Sprint 001 | Story | - | Story 2 | Sprint 001 | Story | - | Story 3 | Sprint 001 | Story | - | Story 4 | Sprint 002 | Story | - | Bug 1 | Sprint 001 | Bug | - And I have defined the following tasks: - | subject | story | assigned_to | - | Task 1 | Story 1 | myuser | - | Task 1B | Bug 1 | | - And I have defined the following impediments: - | subject | sprint | blocks | - | Impediment 1 | Sprint 001 | Story 1 | - | Impediment 2 | Sprint 001 | Story 2 | - - @javascript - Scenario: Update a task with full javascript stack to check assigned user is not overwritten during update. - Given I am viewing the taskboard for Sprint 001 - When I change the subject of task "Task 1" to "Whoa there, Sparky" - Then the request should complete successfully - Then the story named Story 1 should have 1 task named Whoa there, Sparky - And the 1st task for Story 1 is assigned to myuser - - Scenario: Create a task for a story - Given I am viewing the taskboard for Sprint 001 - And I want to create a task for Story 1 - And I set the subject of the task to A Whole New Task - And I set the assigned_to of the task to myuser - When I create the task - Then the 2nd task for Story 1 should be A Whole New Task - Then the 2nd task for Story 1 is assigned to myuser - - Scenario: Create a task for a bug - Given I am viewing the taskboard for Sprint 001 - And I want to create a task for Bug 1 - And I set the subject of the task to A Whole New Bug Task - When I create the task - Then the 2nd task for Bug 1 should be A Whole New Bug Task - - Scenario: Update a task for a story - Given I am viewing the taskboard for Sprint 001 - And I want to edit the task named Task 1 - And I set the subject of the task to Whoa there, Sparky - When I update the task - Then the story named Story 1 should have 1 task named Whoa there, Sparky - - Scenario: Update a task for a bug - Given I am viewing the taskboard for Sprint 001 - And I want to edit the task named Task 1B - And I set the subject of the task to Whoa! - Neo - When I update the task - Then the story named Bug 1 should have 1 task named Whoa! - Neo - - Scenario: View a taskboard - Given I am viewing the taskboard for Sprint 001 - Then I should see the taskboard - - Scenario: View the burndown chart - Given I am viewing the burndown for Sprint 002 - Then I should see the burndown chart - - Scenario: View issues tab with custom backlog columns - Given I view issues tab with backlog columns - Then I should see custom backlog columns on the Issues page - - Scenario: View sprint stories in the issues tab - Given I am viewing the master backlog - When I view the stories of Sprint 001 in the issues tab - Then I should see the Issues page - - Scenario: View the project stories in the issues tab - Given I am viewing the master backlog - When I view the stories in the issues tab - Then I should see the Issues page - - Scenario: Fetch the updated tasks - Given I am viewing the taskboard for Sprint 001 - When the browser fetches tasks updated since 1 week ago - Then the server should return 2 updated task - #FIXME tests on sharing - - Scenario: Fetch the updated impediments - Given I am viewing the taskboard for Sprint 001 - When the browser fetches impediments updated since 1 week ago - Then the server should return 2 updated impediments - #FIXME tests on sharing - - Scenario: Fetch zero updated impediments - Given I am viewing the taskboard for Sprint 001 - When the browser fetches impediments updated since 1 week from now - Then the server should return 0 updated impediments - - Scenario: Copy estimate to remaining - Given I am viewing the taskboard for Sprint 001 - And I want to create a task for Story 1 - And I set the subject of the task to A Whole New Task - And I set the estimated_hours of the task to 3 - When I create the task - Then the request should complete successfully - And task A Whole New Task should have remaining_hours set to 3 - - Scenario: Copy remaining to estimate - Given I am viewing the taskboard for Sprint 001 - And I want to create a task for Story 1 - And I set the subject of the task to A Whole New Task - And I set the estimated_hours of the task to 3 - When I create the task - Then task A Whole New Task should have estimated_hours set to 3 - - Scenario: Set both estimate and remaining - Given I am viewing the taskboard for Sprint 001 - And I want to create a task for Story 1 - And I set the subject of the task to A Whole New Task - And I set the estimated_hours of the task to 8 - When I create the task - And I want to create a task for Story 1 - And I set the subject of the task to A Second New Task - And I set the estimated_hours of the task to 2 - When I create the task - Then task A Whole New Task should have estimated_hours set to 8 - And story Story 1 should have estimated_hours set to 10 - And story Story 1 should have estimated_hours set to 10 - -#mikotos original implementation: Story autocloses (Setting default off) - Scenario: Story closes when all Tasks are closed - Given I have the following issue statuses available: - | name | is_closed | is_default | default_done_ratio | - | New | 0 | 1 | 0 | - | Assigned | 0 | 0 | 10 | - | In Progress | 0 | 0 | 20 | - | Resolved | 0 | 0 | 90 | - | Feedback | 0 | 0 | 50 | - | Closed | 1 | 0 | 100 | - | Accepted | 1 | 0 | 100 | - | Rejected | 1 | 0 | 100 | - And I have defined the following tasks: - | subject | story | estimate | status | - | A.1 | Story 2 | 10 | New | - | A.2 | Story 2 | 10 | New | - | B.1 | Story 3 | 10 | New | - And I am viewing the taskboard for Sprint 001 - #negative test - Then story Story 3 should have the status New - When I update the status of task B.1 to In Progress - Then story Story 3 should have the status New - When I update the status of task B.1 to Closed - Then story Story 3 should have the status New - #positive test - Given Story closes when all Tasks are closed - Then story Story 2 should have the status New - When I update the status of task A.1 to In Progress - Then story Story 2 should have the status New - When I update the status of task A.2 to In Progress - Then story Story 2 should have the status New - When I update the status of task A.1 to Closed - Then story Story 2 should have the status New - When I update the status of task A.2 to Closed - Then story Story 2 should have the status Closed - -# now the loosely part - -# Prerequisite ** Set default_done_ratio for all statuses involved (user action) -# Beware: to get the right behavior, one has to fiddle with story workflow and good ratios. -# In this case, not all states below are allowed for stories (e.g. not In Progress) - Scenario: Story loosely follows Task states while done_ratio is determined by story_state default ratio - Given I have the following issue statuses available: - | name | is_closed | is_default | default_done_ratio | - | New | 0 | 1 | 0 | - | Assigned | 0 | 0 | 10 | - | In Progress | 0 | 0 | 20 | - | Resolved | 0 | 0 | 90 | - | Feedback | 0 | 0 | 50 | - | Closed | 1 | 0 | 100 | - | Accepted | 1 | 0 | 100 | - | Rejected | 1 | 0 | 100 | - And I have defined the following tasks: - | subject | story | estimate | status | - | A.1 | Story 2 | 10 | New | - | A.2 | Story 2 | 10 | New | - | B.1 | Story 3 | 10 | New | - And Story states loosely follow Task states - And I am viewing the taskboard for Sprint 001 - Then story Story 2 should have the status New - When I update the status of task A.1 to Assigned - Then story Story 2 should have the status New - When I update the status of task A.2 to Assigned - Then story Story 2 should have the status Assigned - - When I update the status of task A.1 to Resolved - When I update the status of task A.2 to Resolved - Then story Story 2 should have the status Feedback - - When I update the status of task A.1 to Closed - Then story Story 2 should have the status Feedback - When I update the status of task A.2 to Closed - Then story Story 2 should have the status Feedback - -# Beware: to get the right behavior, one has to fiddle with story workflow and good ratios. -# In this case, not all states below are allowed for stories (e.g. not In Progress) - Scenario: Story loosely follows Task states when issue done_ratio is maintained by issue_field - Given I have the following issue statuses available: - | name | is_closed | is_default | default_done_ratio | - | New | 0 | 1 | 0 | - | Assigned | 0 | 0 | 10 | - | In Progress | 0 | 0 | 20 | - | Resolved | 0 | 0 | 90 | - | Feedback | 0 | 0 | 50 | - | Closed | 1 | 0 | 100 | - | Accepted | 1 | 0 | 100 | - | Rejected | 1 | 0 | 100 | - And I have defined the following tasks: - | subject | story | estimate | status | - | A.1 | Story 2 | 10 | New | - | A.2 | Story 2 | 10 | New | - | B.1 | Story 3 | 10 | New | - And Story states loosely follow Task states - And Issue done_ratio is determined by the issue field - And I am viewing the taskboard for Sprint 001 - Then story Story 2 should have the status New - When I update the status of task A.1 to Assigned - Then story Story 2 should have the status New - And the done ratio for story Story 2 should be 0 - - When I update the status of task A.2 to Assigned - Then story Story 2 should have the status Assigned - And the done ratio for story Story 2 should be 0 - - When I update the status of task A.1 to Resolved - When I update the status of task A.2 to Resolved - Then story Story 2 should have the status Feedback - And the done ratio for story Story 2 should be 0 - - When I update the status of task A.1 to Closed - Then story Story 2 should have the status Feedback - When I update the status of task A.2 to Closed - Then story Story 2 should have the status Feedback - And the done ratio for story Story 2 should be 100 - - Scenario: Story loosely follows Task states while done_ratio is determined by story_state default ratio - Given I have the following issue statuses available: - | name | is_closed | is_default | default_done_ratio | - | New | 0 | 1 | 0 | - | Assigned | 0 | 0 | | - | In Progress | 0 | 0 | 20 | - | Resolved | 0 | 0 | 90 | - | Feedback | 0 | 0 | 50 | - | Closed | 1 | 0 | 100 | - | Accepted | 1 | 0 | 100 | - | Rejected | 1 | 0 | 100 | - And I have defined the following tasks: - | subject | story | estimate | status | - | A.1 | Story 2 | 10 | New | - | A.2 | Story 2 | 10 | New | - | B.1 | Story 3 | 10 | New | - And Story states loosely follow Task states - And I am viewing the taskboard for Sprint 001 - Then story Story 2 should have the status New - When I update the status of task A.1 to Assigned - When I update the status of task A.2 to Assigned - Then story Story 2 should have the status Assigned - When I update the status of task A.1 to Closed - When I update the status of task A.2 to Closed - Then story Story 2 should have the status Feedback diff --git a/features/ui.feature b/features/ui.feature deleted file mode 100644 index d3fd3c888..000000000 --- a/features/ui.feature +++ /dev/null @@ -1,23 +0,0 @@ -Feature: User interface - As a user - I want to use Backlogs via AJAX interface - So that I can use it without reloading a page - - Background: - Given the ecookbook project has the backlogs plugin enabled - And I am logged out - #And I am a team member of the project - And I am a scrum master of the project - And I have deleted all existing issues - And I have defined the following sprints: - | name | sprint_start_date | effective_date | - | Sprint 001 | 2010-01-01 | 2010-01-31 | - - @javascript - Scenario: Backlogs page - Given I am viewing the master backlog - - @javascript - Scenario: Taskboard page - Given I am viewing the taskboard for Sprint 001 - diff --git a/features/updater.feature b/features/updater.feature deleted file mode 100644 index 661bcf496..000000000 --- a/features/updater.feature +++ /dev/null @@ -1,124 +0,0 @@ -Feature: Team Member live board updater - As a team member - I want to have realtime updates on my boards - So that I can collaborate with others during planning - - Background: - Given the ecookbook project has the backlogs plugin enabled - And sharing is enabled - And I have defined the following projects: - | name | - | p1 | - | p1s1 | - | p1s2 | - - And the p1 project has the backlogs plugin enabled - And the p1s1 project has the backlogs plugin enabled - And the p1s1 project is subproject of the p1 project - And the p1s2 project has the backlogs plugin enabled - And the p1s2 project is subproject of the p1 project - And no versions or issues exist - And I am a team member of the project - - And I have defined the following sprints: - | name | sprint_start_date | effective_date | sharing | project_id | - | Sprint0 | 2010-01-01 | 2010-01-31 | hierarchy | p1 | - | Sprint1 | 2010-01-01 | 2010-01-31 | hierarchy | p1s1 | - | Sprint2 | 2010-01-01 | 2010-01-31 | hierarchy | p1s2 | - | Sprint3 | 2010-01-01 | 2010-01-31 | none | p1s2 | - - And the current time is 2012-11-20 08:00:00 - - And I have defined the following stories in the product backlog: - | subject | project_id | - | Sb1 | p1 | - | Sb2 | p1s1 | - | Sb3 | p1s2 | - And I have defined the following stories in the following sprints: - | subject | sprint | project_id | - | Sp1s1 | Sprint0 | p1 | - | Sp1s2 | Sprint0 | p1 | - | Sp1s3 | Sprint1 | p1 | - | Sp2s1 | Sprint1 | p1s1 | - | Sp2s2 | Sprint2 | p1s2 | - | Sp2s3 | Sprint3 | p1s2 | - - Scenario: Fetch the updated stories from several projects without sharing - Given sharing is not enabled - Given I have selected the p1 project - When the browser fetches stories updated since 1 week ago - Then Story "Sb1" should be updated - Then Story "Sp1s1" should be updated - Then Story "Sp1s2" should be updated - Then Story "Sp1s3" should not be updated - Then Story "Sb2" should not be updated - Then the server should return 3 updated stories - Given I have selected the p1s1 project - When the browser fetches stories updated since 1 week ago - Then the server should return 2 updated stories - Then Story "Sb2" should be updated - Then Story "Sb1" should not be updated - Then Story "Sp2s1" should be updated - Given I have selected the p1s2 project - When the browser fetches stories updated since 1 week ago - Then the server should return 3 updated stories - Then Story "Sb3" should be updated - Then Story "Sp2s2" should be updated - Then Story "Sp2s3" should be updated - Then Story "Sb1" should not be updated - - Scenario: Fetch the updated stories from several projects with sharing - Given sharing is enabled - Given I have selected the p1 project - When the browser fetches stories updated since 1 week ago - Then Story "Sb1" should be updated - Then Story "Sb2" should be updated - Then Story "Sb3" should be updated - Then Story "Sp1s1" should be updated - Then Story "Sp1s2" should be updated - Then Story "Sp1s3" should be updated - Then Story "Sp2s1" should be updated - Then Story "Sp2s2" should be updated - Then Story "Sp2s3" should not be updated - Then the server should return 8 updated stories - Given I have selected the p1s1 project - When the browser fetches stories updated since 1 week ago - Then Story "Sb2" should be updated - Then Story "Sp1s1" should be updated - Then Story "Sp1s2" should be updated - Then Story "Sp1s3" should be updated - Then Story "Sp2s1" should be updated - Then Story "Sp2s2" should not be updated - Then Story "Sp2s3" should not be updated - Then the server should return 5 updated stories - Given I have selected the p1s2 project - When the browser fetches stories updated since 1 week ago - Then Story "Sb3" should be updated - Then Story "Sp1s1" should be updated - Then Story "Sp1s2" should be updated - Then Story "Sp2s2" should be updated - Then Story "Sp2s3" should be updated - Then Story "Sp1s3" should not be updated - Then Story "Sb2" should not be updated - Then Story "Sb1" should not be updated - Then the server should return 5 updated stories - - Scenario: Get the last updated stories date when viewing master backlog - Given sharing is enabled - And the current time is 2012-11-20 10:00:00 - And I have defined the following stories in the product backlog: - | subject | project_id | - | Sb1 | p1 | - And I have selected the p1 project - And I am viewing the master backlog - Then The last_update information should be near November 20, 2012 10:00 - - Given the current time is 2012-11-20 12:00:00 - And I have defined the following stories in the following sprints: - | subject | sprint | project_id | - | lorem | Sprint2 | p1s2 | - And I have selected the p1 project - And I am viewing the master backlog - Then The last_update information should be near November 20, 2012 12:00 - -#FIXME taskboard checks diff --git a/lib/backlogs_acts_as_cached_journaled.rb b/lib/backlogs_acts_as_cached_journaled.rb index 8fc2e12ba..e4f535f48 100644 --- a/lib/backlogs_acts_as_cached_journaled.rb +++ b/lib/backlogs_acts_as_cached_journaled.rb @@ -8,11 +8,11 @@ def self.included(base) module ClassMethods def acts_as_rb_cached_journaled(add_entry, dependants) after_save do |o| - deps = dependants.nil? [] : self.send(dependants) + deps = dependants.nil? ? [] : self.send(dependants) ([self] + deps).each{|o| o.send(add_entry) } end end end end -ActiveRecord::Base.send(:include, ActiveRecord::Acts::ActsAsRbCachedJournaled +ActiveRecord::Base.send(:include, ActiveRecord::Acts::ActsAsRbCachedJournaled) diff --git a/screenshots/backlogs.png b/screenshots/backlogs.png deleted file mode 100644 index 77cb42b88..000000000 Binary files a/screenshots/backlogs.png and /dev/null differ diff --git a/screenshots/release.png b/screenshots/release.png deleted file mode 100644 index a39d7b737..000000000 Binary files a/screenshots/release.png and /dev/null differ diff --git a/test.rb b/test.rb deleted file mode 100755 index c09026d22..000000000 --- a/test.rb +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/hnse/.rvm/gems/ruby-1.9.3-p194@redmine/bin/rails runner -require 'pp' - -s = RbSprint.find(:first, :conditions => 'not (sprint_start_date is null and effective_date is null)') -t = RbTask.find(:first, :conditions => ['tracker_id = ? and fixed_version_id = ?', RbTask.tracker, s.id]) -b = t.burndown - -pp b