mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-01 06:48:49 +01:00
Test for #1041
This commit is contained in:
parent
e764a75986
commit
f10a98d8ac
2 changed files with 18 additions and 0 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue