Skip to content
Extraits de code Groupes Projets
Valider 4105f90a rédigé par zhitomirskiyi's avatar zhitomirskiyi
Parcourir les fichiers

forgot to add

parent 5eb487ed
Branches
Étiquettes
Aucune requête de fusion associée trouvée
@javascript
Feature: disconnecting users
In order to deal with life
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"
And a user with email "bob@bob.bob" is connected with "alice@alice.alice"
When I sign in as "bob@bob.bob"
And I am on the aspects manage page
Then I should see 1 contact in "Besties"
Scenario: remove contact from the contact show page
When I am on "alice@alice.alice"'s page
And I follow "edit aspect membership"
And I preemptively confirm the alert
And I follow "remove contact" in the modal window
And I wait for the ajax to finish
And I am on the aspects manage page
Then I should see no contacts in "Besties"
Scenario: cancel removing contact from the contact show page
When I am on "alice@alice.alice"'s page
And I follow "edit aspect membership"
And I preemptively reject the alert
And I follow "remove contact" in the modal window
And I wait for the ajax to finish
And I am on the aspects manage page
Then I should see 1 contact in "Besties"
Scenario: remove contact from the aspect edit page
When I go to the home page
And I follow "Besties" within "#aspect_listings"
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
And I am on the aspects manage page
Then I should see no contacts in "Besties"
Scenario: cancel removing contact from the contact show page
When I go to the home page
And I follow "Besties" within "#aspect_listings"
And I wait for the ajax to finish
And I preemptively reject the alert
And I press the first ".added" within "#facebox .contact_list ul > li:first-child"
And I wait for the ajax to finish
And I am on the aspects manage page
Then I should see 1 contact in "Besties"
/* Copyright (c) 2010, Diaspora Inc. This file is
* licensed under the Affero General Public License version 3 or later. See
* the COPYRIGHT file.
*/
describe("Contact List", function() {
describe("disconnectUser", function() {
it("does an ajax call to person delete with the passed in id", function(){
var id = '3';
spyOn($,'ajax').andCallThrough();
List.disconnectUser(id);
expect($.ajax).toHaveBeenCalledWith(
url: "/people/" + id,
type: "DELETE",
success: function(){
$('.contact_list li[data-guid='+id+']').fadeOut(200);
}
);
});
});
});
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter