Skip to content
Extraits de code Groupes Projets
Valider bddd7c71 rédigé par Andrej Kacian's avatar Andrej Kacian
Parcourir les fichiers

Write jasmine test for the tag unfollow icon visibility

parent 2a970145
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -70,6 +70,13 @@ describe AspectsController do
save_fixture(html_for("body"), "aspects_index_with_posts")
end
it 'generates a jasmine fixture with a followed tag' do
@tag = ActsAsTaggableOn::Tag.create!(:name => "partytimeexcellent")
TagFollowing.create!(:tag => @tag, :user => alice )
get :index
save_fixture(html_for("body"), "aspects_index_with_one_followed_tag")
end
context 'with getting_started = true' do
before do
alice.getting_started = true
......
......@@ -43,6 +43,7 @@ src_files:
- public/javascripts/rails.js
- public/javascripts/aspect-filters.js
- public/javascripts/content-updater.js
- public/javascripts/tag-followings.js
# stylesheets
#
# Return an array of stylesheet filepaths relative to src_dir to include before jasmine specs.
......
/* Copyright (c) 2011, Diaspora Inc. This file is
* licensed under the Affero General Public License version 3 or later. See
* the COPYRIGHT file.
*/
describe("TagFollowings", function() {
describe("unfollow", function(){
it("tests unfollow icon visibility on mouseover event", function(){
spec.loadFixture('aspects_index_with_one_followed_tag');
TagFollowings.initialize();
var tag_li = $('li.unfollow#partytimeexcellent');
var icon_div = $('.unfollow_icon');
expect(icon_div.hasClass('hidden')).toBeTruthy();
tag_li.mouseover();
expect(icon_div.hasClass('hidden')).toBeFalsy();
tag_li.mouseout();
expect(icon_div.hasClass('hidden')).toBeTruthy();
});
});
});
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter