mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-22 23:24:07 +01:00
fix cucumber story for markup in project description
This commit is contained in:
parent
8dbf790810
commit
025cfa2686
2 changed files with 23 additions and 3 deletions
|
|
@ -15,5 +15,5 @@ Feature: Manage a project
|
||||||
Scenario: I can describe the project using markup
|
Scenario: I can describe the project using markup
|
||||||
When I visit the "manage me" project
|
When I visit the "manage me" project
|
||||||
And I edit the project description to "_successfull outcome_: project is *done*"
|
And I edit the project description to "_successfull outcome_: project is *done*"
|
||||||
Then I should see "<i>successfull outcome<i>"
|
Then I should see the italic text "successfull outcome" in the project description
|
||||||
And I should see " <b>done</b>"
|
And I should see the bold text "done" in the project description
|
||||||
|
|
@ -23,6 +23,26 @@ end
|
||||||
|
|
||||||
When /^I edit the project description to "([^\"]*)"$/ do |new_description|
|
When /^I edit the project description to "([^\"]*)"$/ do |new_description|
|
||||||
click_link "link_edit_project_#{@project.id}"
|
click_link "link_edit_project_#{@project.id}"
|
||||||
fill_in "project[description]", new_description
|
fill_in "project[description]", :with => new_description
|
||||||
click_button "submit_project_#{@project.id}"
|
click_button "submit_project_#{@project.id}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Then /^I should see the bold text "([^\"]*)" in the project description$/ do |bold|
|
||||||
|
xpath="//div[@class='project_description']/p/strong"
|
||||||
|
|
||||||
|
response.should have_xpath(xpath)
|
||||||
|
bold_text = response.selenium.get_text("xpath=#{xpath}")
|
||||||
|
|
||||||
|
puts "bt=#{bold_text}"
|
||||||
|
bold_text.should =~ /#{bold}/
|
||||||
|
end
|
||||||
|
|
||||||
|
Then /^I should see the italic text "([^\"]*)" in the project description$/ do |italic|
|
||||||
|
xpath="//div[@class='project_description']/p/em"
|
||||||
|
|
||||||
|
response.should have_xpath(xpath)
|
||||||
|
italic_text = response.selenium.get_text("xpath=#{xpath}")
|
||||||
|
|
||||||
|
puts "it=#{italic_text}"
|
||||||
|
italic_text.should =~ /#{italic}/
|
||||||
|
end
|
||||||
Loading…
Add table
Add a link
Reference in a new issue