diff options
author | Dan Hansen <pair+ohaibbq@joindiaspora.com> | 2011-07-02 09:45:22 +0400 |
---|---|---|
committer | Dan Hansen <pair+ohaibbq@joindiaspora.com> | 2011-07-02 09:46:54 +0400 |
commit | 05688c2f430cf44ce0ab4714c5f922ea9998fdb6 (patch) | |
tree | 043c1f1589d28a949587782120db009fbacc7d03 /features | |
parent | 922ccd8423db145c3576a382c34b6cf0d6d742f8 (diff) |
notifications wip
Diffstat (limited to 'features')
-rw-r--r-- | features/notifications.feature | 12 | ||||
-rw-r--r-- | features/step_definitions/custom_web_steps.rb | 8 |
2 files changed, 17 insertions, 3 deletions
diff --git a/features/notifications.feature b/features/notifications.feature index 7c94cb1ea..a5ad1fda3 100644 --- a/features/notifications.feature +++ b/features/notifications.feature @@ -14,8 +14,14 @@ Background: And I go to the destroy user session page -Scenario: someone shares with me - When I sign in as "alice@alice.alice" - And I follow "notifications" in the header + Scenario: someone shares with me + When I sign in as "alice@alice.alice" + And I follow "notifications" in the header 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 diff --git a/features/step_definitions/custom_web_steps.rb b/features/step_definitions/custom_web_steps.rb index d239eda9c..9856a7d26 100644 --- a/features/step_definitions/custom_web_steps.rb +++ b/features/step_definitions/custom_web_steps.rb @@ -194,3 +194,11 @@ end When /^I wait for (\d+) seconds$/ do |seconds| sleep seconds.to_i end + +When /^I click the notification badge$/ do + evaluate_script("$('#notification_badge a').click();"); +end + +Then /^the notification dropdown should be visible$/ do + evaluate_script("$('#notification_dropdown').css('display') === 'block'") +end |