diff --git a/src/components/toolbar/toolbar.spec.js b/src/components/toolbar/toolbar.spec.js index facdd675f7..f87d257e13 100644 --- a/src/components/toolbar/toolbar.spec.js +++ b/src/components/toolbar/toolbar.spec.js @@ -118,7 +118,7 @@ describe('', function() { expect(element.find('md-toolbar').length).toBe(0); })); - it('works with ng-show', inject(function($$rAF) { + it('works with ng-show', inject(function($$rAF, $timeout) { var template = '
' + ' test' + @@ -154,6 +154,7 @@ describe('', function() { // Show the toolbar and ensure it is visible pageScope.$apply('shouldShowToolbar = true'); pageScope.$digest(); + $timeout.flush(); toolbarStyles = getComputedStyle(element.find('md-toolbar')[0]); contentStyles = getComputedStyle(element.find('md-content')[0]); @@ -170,7 +171,7 @@ describe('', function() { document.body.removeChild(element[0]); })); - it('works with ng-hide', inject(function($$rAF) { + it('works with ng-hide', inject(function($$rAF, $timeout) { var template = '
' + ' test' + @@ -206,6 +207,7 @@ describe('', function() { // Show the toolbar and ensure it is hidden pageScope.$apply('shouldNotShowToolbar = true'); pageScope.$digest(); + $timeout.flush(); toolbarStyles = getComputedStyle(element.find('md-toolbar')[0]); contentStyles = getComputedStyle(element.find('md-content')[0]);