Fix product_owner.feature

pull/6827/head
Mark Maglana 14 years ago
parent 4053cfe692
commit e1875f884c
  1. 7
      features/product_owner.feature
  2. 5
      features/step_definitions/_given_steps.rb
  3. 15
      features/step_definitions/_when_steps.rb
  4. 724
      lib/labels.yaml

@ -37,14 +37,17 @@ Feature: Product Owner
And I want to update 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 Bug
When I update the story
When I update the story
Then the story should have a subject of Relaxdiego was here
And the story should have a tracker of Bug
And the story should have a position of 3
Scenario: Close a story
Given I am viewing the master backlog
When I close Story 2
And I want to update the story with subject Story 4
And I set the status of the story to Closed
When I update the story
Then show me the page
Then the status of the story should be set as closed
Scenario: Move a story to the top

@ -1,6 +1,8 @@
Given /^I am a product owner of the project$/ do
role = Role.find(:first, :conditions => "name='Manager'")
role.permissions << :view_master_backlog
role.permissions << :create_stories
role.permissions << :update_stories
role.save!
login_as_product_owner
end
@ -41,6 +43,9 @@ Given /^I set the (.+) of the story to (.+)$/ do |attribute, value|
if attribute=="tracker"
attribute="tracker_id"
value = Tracker.find(:first, :conditions => "name='#{value}'").id
elsif attribute=="status"
attribute="status_id"
value = IssueStatus.find(:first, :conditions => "name='#{value}'").id
end
@story_params[attribute] = value
end

@ -1,12 +1,6 @@
When /^I close (.+)$/ do |subject|
@story = Story.find(:first, :conditions => "subject='#{subject}'")
@story.should_not be_nil
@story.update_attributes :status_id => IssueStatus.find(:first, :conditions => "name='Closed'").id
end
When /^I create the story$/ do
page.driver.process :post,
url_for(:controller => 'stories', :action => 'create'),
url_for(:controller => :rb_stories, :action => :create),
@story_params
end
@ -52,8 +46,8 @@ When /^I move the (\d+)(?:st|nd|rd|th) story to the (\d+|last)(?:st|nd|rd|th)? p
end
page.driver.process :post,
url_for(:controller => 'stories', :action => 'update'),
{:id => story.text, :prev => (prev.nil? ? '' : prev.text), :project_id => @project.id}
url_for(:controller => :rb_stories, :action => :update, :id => story.text),
{:prev => (prev.nil? ? '' : prev.text), :project_id => @project.id, "_method" => "put"}
@story = Story.find(story.text.to_i)
end
@ -70,8 +64,9 @@ end
When /^I update the story$/ do
page.driver.process :post,
url_for(:controller => 'stories', :action => 'update'),
url_for(:controller => :rb_stories, :action => :update, :id => @story_params[:id]),
@story_params
page.driver.response.status.should == 200
end
When /^I download the calendar feed$/ do

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save