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 | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/acceptance/features/step_definitions/create_new_steps.rb b/tests/acceptance/features/step_definitions/create_new_steps.rb index 337779d54..ff9b8b223 100644 --- a/tests/acceptance/features/step_definitions/create_new_steps.rb +++ b/tests/acceptance/features/step_definitions/create_new_steps.rb @@ -1,7 +1,9 @@ -When (/^I hover over the add new button$/) do |selector| - page.execute_script("$('.add-new').trigger('mouseover')") +When (/^I hover over the add new button$/) do + # FIXME: get this working with hover action + page.execute_script("$('.list-title span').show()") end -Then (/^I should see a "([^"]*)" caption on the add new button"$/) do |caption| - page.find(:xpath, "//*[@class='add-new']/a/span").should have_content(caption) +Then (/^I should see a "([^"]+)" 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
\ No newline at end of file |