diff --git a/features/notifications.feature b/features/notifications.feature index d31c96221..ec1d96f93 100644 --- a/features/notifications.feature +++ b/features/notifications.feature @@ -7,10 +7,9 @@ Feature: Notifications Background: Given a user with email "bob@bob.bob" And a user with email "alice@alice.alice" - And "alice@alice.alice" has a public post with text "check this out!" - When I sign in as "bob@bob.bob" Scenario: someone shares with me + When I sign in as "bob@bob.bob" And I am on "alice@alice.alice"'s page And I add the person to my "Besties" aspect And I go to the destroy user session page @@ -24,15 +23,15 @@ Feature: Notifications And I should have 1 email delivery Scenario: someone re-shares my post - And a user with email "bob@bob.bob" is connected with "alice@alice.alice" + Given a user with email "bob@bob.bob" is connected with "alice@alice.alice" + And "alice@alice.alice" has a public post with text "check this out!" + When I sign in as "bob@bob.bob" And I am on "alice@alice.alice"'s page And I preemptively confirm the alert And I follow "Reshare" And I wait for the ajax to finish - And I go to the destroy user session page When I sign in as "alice@alice.alice" - And I follow "notification" in the header And I wait for the ajax to finish Then the notification dropdown should be visible @@ -43,15 +42,15 @@ Feature: Notifications And I should have 1 email delivery Scenario: someone likes my post - And a user with email "bob@bob.bob" is connected with "alice@alice.alice" + Given a user with email "bob@bob.bob" is connected with "alice@alice.alice" + And "alice@alice.alice" has a public post with text "check this out!" + When I sign in as "bob@bob.bob" And I am on "alice@alice.alice"'s page And I preemptively confirm the alert And I follow "Like" And I wait for the ajax to finish - And I go to the destroy user session page When I sign in as "alice@alice.alice" - And I follow "notification" in the header And I wait for the ajax to finish Then the notification dropdown should be visible @@ -60,3 +59,36 @@ Feature: Notifications When I follow "View all" Then I should see "just liked your post" And I should have 1 email delivery + + Scenario: someone comments on my post + Given a user with email "bob@bob.bob" is connected with "alice@alice.alice" + And "alice@alice.alice" has a public post with text "check this out!" + When I sign in as "bob@bob.bob" + And I am on "alice@alice.alice"'s page + And I focus the comment field + And I fill in "Comment" with "great post!" + And I press "Comment" + And I wait for the ajax to finish + And I go to the destroy user session page + When I sign in as "alice@alice.alice" + And I follow "notification" in the header + And I wait for the ajax to finish + Then the notification dropdown should be visible + And I wait for the ajax to finish + Then I should see "commented on your post" + When I follow "View all" + Then I should see "commented on your post" + And I should have 1 email delivery + + Scenario: someone mentioned you on his post + Given a user with email "bob@bob.bob" is connected with "alice@alice.alice" + And Alice has a post mentioning Bob + When I sign in as "bob@bob.bob" + And I follow "notification" in the header + And I wait for the ajax to finish + Then the notification dropdown should be visible + And I wait for the ajax to finish + Then I should see "mentioned you in a post" + When I follow "View all" + Then I should see "mentioned you in a post" + And I should have 1 email delivery