PERFORMANCE: disables jquery animations during testing

This commit is contained in:
Joffrey JAFFEUX 2018-04-24 18:29:26 +02:00 committed by GitHub
parent 18c27883e9
commit 59d4123316
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 10 deletions

View File

@ -416,7 +416,6 @@ export default createWidget('post-menu', {
const $heart = $(`[data-post-id=${attrs.id}] .toggle-like .d-icon`);
$heart.closest('button').addClass('has-like');
if (!Ember.testing) {
const scale = [1.0, 1.5];
return new Ember.RSVP.Promise(resolve => {
animateHeart($heart, scale[0], scale[1], () => {
@ -425,9 +424,6 @@ export default createWidget('post-menu', {
});
});
});
} else {
this.sendWidgetAction('toggleLike');
}
},
refreshLikes() {

View File

@ -169,4 +169,7 @@ Object.keys(requirejs.entries).forEach(function(entry) {
}
});
// forces 0 as duration for all jquery animations
jQuery.fx.off = true;
resetSite();