diff options
Diffstat (limited to 'tests/acceptance/features/step_definitions/create_new_steps.rb')
-rw-r--r-- | tests/acceptance/features/step_definitions/create_new_steps.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/acceptance/features/step_definitions/create_new_steps.rb b/tests/acceptance/features/step_definitions/create_new_steps.rb index ff9b8b223..40540b4b8 100644 --- a/tests/acceptance/features/step_definitions/create_new_steps.rb +++ b/tests/acceptance/features/step_definitions/create_new_steps.rb @@ -3,7 +3,16 @@ When (/^I hover over the add new button$/) do page.execute_script("$('.list-title span').show()") end -Then (/^I should see a "([^"]+)" caption on the add new button$/) do |caption| +When (/^I hover out of the add new button$/) do + # FIXME: get this working with hover action + page.execute_script("$('.list-title span').hide()") +end + +Then (/^I should see an "([^"]+)" caption on the add new button$/) do |caption| button = page.find(:xpath, "//li[contains(@class,\"add-new\")]/a/span[1]") button.should have_content(caption) +end + +Then (/^I should not see an "([^"]+)" caption on the add new button$/) do |caption| + page.should have_no_selector(:xpath, "//li[contains(@class,\"add-new\")]/a/span[1]") end
\ No newline at end of file |