How to disable animations in protractor for angular js application

You can check out the angular’s protractor configuration:
https://github.com/angular/angular.js/blob/master/protractor-shared-conf.js

You should add it under onPrepare block:

onPrepare: function() {
/* global angular: false, browser: false, jasmine: false */

// Disable animations so e2e tests run more quickly
var disableNgAnimate = function() {
  angular.module('disableNgAnimate', []).run(['$animate', function($animate) {
    $animate.enabled(false);
  }]);
};

browser.addMockModule('disableNgAnimate', disableNgAnimate);

Leave a Comment