summaryrefslogtreecommitdiffstats
path: root/tests/acceptance/features/step_definitions/create_new_steps.rb
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-05-07 21:16:10 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-05-07 21:16:10 +0200
commit112285d42370028e28dec4eec75e7a2a68f87056 (patch)
tree27c16be73ce505e6df1785a6c8729d3d4e63560f /tests/acceptance/features/step_definitions/create_new_steps.rb
parent7b33f0b82c7aa6217892ae21e680491eb64876bc (diff)
fix visibility test
Diffstat (limited to 'tests/acceptance/features/step_definitions/create_new_steps.rb')
-rw-r--r--tests/acceptance/features/step_definitions/create_new_steps.rb11
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