More tests pass

pull/6827/head
friflaj 14 years ago
parent b849185cc2
commit b36845f513
  1. 2
      app/controllers/rb_application_controller.rb
  2. 3
      app/controllers/rb_stories_controller.rb
  3. 2
      app/views/rb_master_backlogs/_backlog.html.erb
  4. 2
      app/views/rb_master_backlogs/show.html.erb
  5. 4
      app/views/rb_taskboards/show.html.erb
  6. 2
      app/views/shared/_header.html.erb
  7. 4
      app/views/shared/_view_issues_sidebar.html.erb
  8. 6
      features/step_definitions/_given_steps.rb
  9. 16
      features/step_definitions/_when_steps.rb

@ -29,6 +29,6 @@ class RbApplicationController < ApplicationController
end
def load_sprint
@sprint = Sprint.find(params[:id])
@sprint = Sprint.find(params[:sprint_id])
end
end

@ -8,8 +8,7 @@ class RbStoriesController < RbApplicationController
cards = TaskboardCards.new(current_language)
if params[:sprint_id]
sprint = Sprint.first(:conditions => { :project_id => @project.id, :id => params[:sprint_id]})
sprint.stories.each { |story| cards.add(story) }
@sprint.stories.each { |story| cards.add(story) }
else
Story.product_backlog(@project).each { |story| cards.add(story, false) }
end

@ -16,7 +16,7 @@
:item => menu_link(l(:label_task_board), {
:controller => 'rb_taskboards',
:action => 'show',
:id => backlog }),
:sprint_id => backlog }),
:for => :sprint
},
{

@ -1,6 +1,6 @@
<%- content_for :header_tags do %>
<%= stylesheet_link_tag 'index', 'story', :plugin => 'redmine_backlogs' %>
<script type="text/javascript" src="<%= url_for(:controller => 'rb_server_variables', :action => 'show', :id => @project.id, :format => :js) %>"></script>
<script type="text/javascript" src="<%= url_for(:controller => 'rb_server_variables', :action => 'show', :project_id => @project.id, :format => :js) %>"></script>
<%= javascript_include_tag 'board_updater', 'master_backlogs_updater', 'index_main', 'backlog', 'story', :plugin => 'redmine_backlogs' %>
<%- end %>

@ -1,11 +1,11 @@
<% content_for :header_tags do %>
<%= javascript_include_tag 'show_main', 'board_updater', 'taskboard_updater', 'taskboard', 'issue', 'task', 'impediment', :plugin => 'redmine_backlogs' %>
<%= stylesheet_link_tag 'show', 'taskboard', :plugin => 'redmine_backlogs', :media => 'screen, print' %>
<script type="text/javascript" src="<%= url_for(:controller => 'rb_server_variables', :action => 'show', :id => @project.id, :sprint_id => @sprint.id) %>"></script>
<script type="text/javascript" src="<%= url_for(:controller => 'rb_server_variables', :action => 'show', :project_id => @project.id, :sprint_id => @sprint.id) %>"></script>
<% end %>
<% content_for :breadcrumbs do %>
<%= link_to @project.name, :controller => "rb_master_backlogs", :action => "show", :id => @project %> : <%= @sprint.name %>
<%= link_to @project.name, :controller => "rb_master_backlogs", :action => "show", :project_id => @project %> : <%= @sprint.name %>
<% end %>
<%- content_for :page_specific_links do %>

@ -4,6 +4,6 @@
</div>
<div class="links">
<%= yield :page_specific_links -%>
<%= link_to l(:label_back_to_project), :controller => :projects, :action => 'show', :id => @project %>
<%= link_to l(:label_back_to_project), :controller => :projects, :action => 'show', :project_id => @project %>
</div>
</div>

@ -31,7 +31,7 @@
:protocol => webcal,
:controller => :rb_calendars,
:action => :show,
:id => project,
:project_id => project,
:format => 'xml',
:key => key }) %>"><%= l(:label_webcal) %></a><br>
<% end %>
@ -41,7 +41,7 @@
<%= link_to(l(:label_task_board), {
:controller => 'backlogs',
:action => 'show',
:id => sprint.id
:sprint_id => sprint.id
})
%><br/>

@ -37,19 +37,19 @@ Given /^I am logged out$/ do
end
Given /^I am viewing the master backlog$/ do
visit url_for(:controller => :rb_master_backlogs, :action => :show, :id => @project)
visit url_for(:controller => :rb_master_backlogs, :action => :show, :project_id => @project)
page.driver.response.status.should == 200
end
Given /^I am viewing the burndown for (.+)$/ do |sprint_name|
@sprint = Sprint.find(:first, :conditions => ["name=?", sprint_name])
visit url_for(:controller => :rb_burndown_charts, :action => :show, :id => @sprint.id)
visit url_for(:controller => :rb_burndown_charts, :action => :show, :sprint_id => @sprint.id)
page.driver.response.status.should == 200
end
Given /^I am viewing the taskboard for (.+)$/ do |sprint_name|
@sprint = Sprint.find(:first, :conditions => ["name=?", sprint_name])
visit url_for(:controller => :rb_taskboards, :action => :show, :id => @sprint.id)
visit url_for(:controller => :rb_taskboards, :action => :show, :sprint_id => @sprint.id)
page.driver.response.status.should == 200
end

@ -73,7 +73,7 @@ When /^I move the (\d+)(?:st|nd|rd|th) story to the (\d+|last)(?:st|nd|rd|th)? p
end
When /^I request the server_variables resource$/ do
visit url_for(:controller => :rb_server_variables, :action => :show, :id => @project.id)
visit url_for(:controller => :rb_server_variables, :action => :show, :project_id => @project.id)
end
When /^I update the impediment$/ do
@ -84,7 +84,7 @@ end
When /^I update the sprint$/ do
page.driver.process :post,
url_for(:controller => 'rb_sprints', :action => "update", :id => @sprint_params['id']),
url_for(:controller => 'rb_sprints', :action => "update", :sprint_id => @sprint_params['id']),
@sprint_params.merge({ "_method" => "put" })
end
@ -101,16 +101,16 @@ When /^I update the task$/ do
end
When /^I download the calendar feed$/ do
visit url_for({ :key => @api_key, :controller => 'rb_calendars', :action => 'show', :format => 'xml', :id => @project })
visit url_for({ :key => @api_key, :controller => 'rb_calendars', :action => 'show', :format => 'xml', :project_id => @project })
end
When /^I view the stories of (.+) in the issues tab/ do |sprint_name|
sprint = Sprint.find(:first, :conditions => ["name=?", sprint_name])
visit url_for(:controller => :rb_queries, :action => :show, :id => sprint.project_id, :sprint_id => sprint.id)
visit url_for(:controller => :rb_queries, :action => :show, :project_id => sprint.project_id, :sprint_id => sprint.id)
end
When /^I view the stories in the issues tab/ do
visit url_for(:controller => :rb_queries, :action => :show, :id=> @project.id)
visit url_for(:controller => :rb_queries, :action => :show, :project_id=> @project.id)
end
When /^I download the product backlog cards$/ do
@ -122,14 +122,14 @@ When /^I download the task board cards$/ do
end
When /^I view the sprint notes$/ do
visit url_for(:controller => 'rb_wikis', :action => 'show', :id => @sprint.id)
visit url_for(:controller => 'rb_wikis', :action => 'show', :sprint_id => @sprint.id)
end
When /^I edit the sprint notes$/ do
visit url_for(:controller => 'rb_wikis', :action => 'edit', :id => @sprint.id)
visit url_for(:controller => 'rb_wikis', :action => 'edit', :sprint_id => @sprint.id)
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' }")
visit url_for(:controller => 'rb_updated_items', :action => :show, :id => @project.id, :only => object_type, :since => date.strftime("%Y-%m-%d %H:%M:%S"))
visit url_for(:controller => 'rb_updated_items', :action => :show, :project_id => @project.id, :only => object_type, :since => date.strftime("%Y-%m-%d %H:%M:%S"))
end

Loading…
Cancel
Save