From 96d920c9d63914c693a9f2aeaeace4d1ddcaa533 Mon Sep 17 00:00:00 2001 From: Sarah Mei Date: Mon, 5 Sep 2011 14:00:55 -0700 Subject: [PATCH] Refactor disconnecting feature - rename and remove redundant scenario that wasn't being run anyway --- features/disconnects_users.feature | 61 -------------------------- features/stops_following_users.feature | 45 +++++++++++++++++++ 2 files changed, 45 insertions(+), 61 deletions(-) delete mode 100644 features/disconnects_users.feature create mode 100644 features/stops_following_users.feature diff --git a/features/disconnects_users.feature b/features/disconnects_users.feature deleted file mode 100644 index ebffd1407..000000000 --- a/features/disconnects_users.feature +++ /dev/null @@ -1,61 +0,0 @@ -@javascript -Feature: disconnecting users - In order to help users feel secure on Diaspora - As a User - I want to be able to disconnect from others - - Background: - Given a user with email "bob@bob.bob" - And a user with email "alice@alice.alice" - When I sign in as "bob@bob.bob" - And I am on "alice@alice.alice"'s page - - And I add the person to my 1st aspect - - Scenario: remove non-mutual contact from the contact show page - When I am on "alice@alice.alice"'s page - - And I remove the person from my 1st aspect - And I am on the home page - - Then I should have 0 contacts in "Besties" - - Then I go to the destroy user session page - When I sign in as "alice@alice.alice" - And I am on "bob@bob.bob"'s page - - Then I should not see "is sharing with you." - - Scenario Outline: remove a non-mutual contact from the last aspect on the contact show page - When I am on "alice@alice.alice"'s page - - And I remove the person from my 1st aspect - - When I follow "My Contacts" - Then I should have 0 contacts in "Besties" - - Then I go to the destroy user session page - When I sign in as "alice@alice.alice" - And I am on "bob@bob.bob"'s page - - Then I should not see "is sharing with you." - - Scenario: remove a non-mutual contact from the aspect edit page - When I go to the home page - And I follow "Contacts" - And I follow "Besties" - And I follow "Edit Besties" - - And I wait for the ajax to finish - And I preemptively confirm the alert - And I press the first ".added" within "#facebox .contact_list ul > li:first-child" - - And I wait for the ajax to finish - When I follow "My Contacts" - Then I should have 0 contacts in "Besties" - - Then I go to the destroy user session page - When I sign in as "alice@alice.alice" - And I am on "bob@bob.bob"'s page - - Then I should not see "is sharing with you." diff --git a/features/stops_following_users.feature b/features/stops_following_users.feature new file mode 100644 index 000000000..1390e1cf5 --- /dev/null +++ b/features/stops_following_users.feature @@ -0,0 +1,45 @@ +@javascript +Feature: Unfollowing + In order to stop seeing updates from self-important rockstars + As a user + I want to be able to stop following people + + Background: + Given a user with email "bob@bob.bob" + And a user with email "alice@alice.alice" + When I sign in as "bob@bob.bob" + And I am on "alice@alice.alice"'s page + And I add the person to my 1st aspect + + Scenario: stop following someone while on their profile page + When I am on "alice@alice.alice"'s page + + And I remove the person from my 1st aspect + And I am on the home page + + Then I should have 0 contacts in "Besties" + + Then I go to the destroy user session page + When I sign in as "alice@alice.alice" + And I am on "bob@bob.bob"'s page + + Then I should not see "is sharing with you." + + Scenario: stop following someone while on the aspect edit page + When I go to the home page + And I follow "Contacts" + And I follow "Besties" + And I follow "Edit Besties" + And I wait for the ajax to finish + + And I preemptively confirm the alert + And I press the first ".added" within "#facebox .contact_list ul > li:first-child" + And I wait for the ajax to finish + + When I follow "My Contacts" + Then I should have 0 contacts in "Besties" + + When I go to the destroy user session page + And I sign in as "alice@alice.alice" + And I am on "bob@bob.bob"'s page + Then I should not see "is sharing with you."