fix #1242 by fixing all the routing from the review button

This commit is contained in:
Reinier Balt 2012-03-29 16:05:17 +02:00
parent 923919e802
commit af10e74017
4 changed files with 49 additions and 3 deletions

View file

@ -34,3 +34,27 @@ Feature: Reviewing projects
Given I have an outdated project "dated_project" with 1 todos
When I go to the review page
And the badge should show 5 ## note that stalled and blocked projects are also up-to-date listed
@javascript
Scenario: I can mark a project as reviewed from the projects list page
Given I have a project called "review me"
When I go to the projects page
Then I should see "review me"
When I edit project "review me" and mark the project as reviewed
Then I should be on the projects page
And I should see "review me"
@javascript
Scenario: I can mark a project as reviewed from the project page
Given I have a project called "review me"
When I go to the "review me" project
When I edit project settings and mark the project as reviewed
Then I should be on the "review me" project
@javascript
Scenario: I can mark a project as reviewed from the review page
Given I have an outdated project "review me" with 1 todos
When I go to the review page
Then I should see "review me"
When I edit project "review me" and mark the project as reviewed
Then I should be on the review page

View file

@ -164,7 +164,6 @@ When /^I edit the project settings$/ do
page.should have_xpath("//div[@id='edit_project_#{@project.id}']/form//button[@id='submit_project_#{@project.id}']")
end
When /^I close the project settings$/ do
@project.should_not be_nil
click_link "Cancel"
@ -181,6 +180,19 @@ When /^I edit the project state of "([^"]*)" to "([^"]*)"$/ do |project_name, st
end
end
When /^I edit project "([^"]*)" and mark the project as reviewed$/ do |project_name|
project = @current_user.projects.find_by_name(project_name)
project.should_not be_nil
open_project_edit_form(project)
click_link "reviewed_project_#{project.id}"
end
When /^I edit project settings and mark the project as reviewed$/ do
open_project_edit_form(@project)
click_link "reviewed_project_#{@project.id}"
end
When /^I add a note "([^"]*)" to the project$/ do |note_body|
click_link "Add a note"
fill_in "note[body]", :with => note_body