Created
July 21, 2010 00:43
-
-
Save patcoll/483862 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Then /^I should be able to change the "(name|teaser_text|full_text)" of the ad with an inline editor$/ do |field| | |
require 'time' | |
selector = ".inline-edit em.text .#{field}" | |
old_value = find(selector).text | |
value = "New Value #{Time.now.to_i}" | |
find(selector).click | |
wait_until { find_field(field) } | |
fill_in(field, :with => value) | |
click_button("Save") | |
wait_until { find(selector).text == value } | |
find(selector).click | |
wait_until { find_field(field) } | |
fill_in(field, :with => old_value) | |
click_button("Save") | |
wait_until { find(selector).text == old_value } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment