From 7aefe37de84ee8b3d259b74ed8278b4315d00bda Mon Sep 17 00:00:00 2001 From: Raphael Sofaer Date: Mon, 4 Jul 2011 15:38:15 -0700 Subject: [PATCH] Reenable notifications feature, don't use javascript in step definitions if you can avoid it? --- features/notifications.feature | 8 ++++---- features/step_definitions/custom_web_steps.rb | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/features/notifications.feature b/features/notifications.feature index 0d8743961..ad63a9754 100644 --- a/features/notifications.feature +++ b/features/notifications.feature @@ -23,7 +23,7 @@ Background: Then I should see "started sharing with you" Scenario: notification popup - #When I sign in as "alice@alice.alice" - #And I click the notification badge - #And I wait for the ajax to finish - #Then the notification dropdown should be visible + When I sign in as "alice@alice.alice" + And I click the notification badge + And I wait for the ajax to finish + Then the notification dropdown should be visible diff --git a/features/step_definitions/custom_web_steps.rb b/features/step_definitions/custom_web_steps.rb index 55f3ea3bb..135776487 100644 --- a/features/step_definitions/custom_web_steps.rb +++ b/features/step_definitions/custom_web_steps.rb @@ -188,9 +188,9 @@ When /^I wait for (\d+) seconds$/ do |seconds| end When /^I click the notification badge$/ do - evaluate_script("$('#notification_badge a').click();"); + find(:css, "#notification_badge a").click end Then /^the notification dropdown should be visible$/ do - evaluate_script("$('#notification_dropdown').css('display') === 'block'") + find(:css, "#notification_dropdown").should be_visible end