This commit is contained in:
Eric Allen 2010-07-05 08:24:58 -07:00
parent e764a75986
commit f10a98d8ac
2 changed files with 18 additions and 0 deletions

View file

@ -26,3 +26,11 @@ Feature: Manage a project
And I change the project_name field of "Todo 1" to "bar"
Then I should not see the todo "Todo 1"
And I should see the todo "Todo 2"
# Ticket #1041
@selenium
Scenario: I can change the name of the project using the Edit Project Settings form
Given I have a project "bananas" with 1 todos
When I visit the "bananas" project
And I edit the project name to "cherries"
Then the project title should be "cherries"

View file

@ -27,6 +27,12 @@ When /^I edit the project description to "([^\"]*)"$/ do |new_description|
click_button "submit_project_#{@project.id}"
end
When /^I edit the project name to "([^\"]*)"$/ do |new_title|
click_link "link_edit_project_#{@project.id}"
fill_in "project[name]", :with => new_title
click_button "submit_project_#{@project.id}"
end
Then /^I should see the bold text "([^\"]*)" in the project description$/ do |bold|
xpath="//div[@class='project_description']/p/strong"
@ -44,3 +50,7 @@ Then /^I should see the italic text "([^\"]*)" in the project description$/ do |
italic_text.should =~ /#{italic}/
end
Then /^the project title should be "(.*)"$/ do |title|
selenium.get_text("css=h2#project_name").should == title
end