Reenable notifications feature, don't use javascript in step definitions if you can avoid it?

This commit is contained in:
Raphael Sofaer 2011-07-04 15:38:15 -07:00
parent e34809c8ed
commit 7aefe37de8
2 changed files with 6 additions and 6 deletions

View file

@ -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

View file

@ -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