diff --git a/docs/component-spec/annotationsSpec.js b/docs/component-spec/annotationsSpec.js index 6dcde906e690..d84bd5bdf57d 100644 --- a/docs/component-spec/annotationsSpec.js +++ b/docs/component-spec/annotationsSpec.js @@ -8,6 +8,10 @@ describe('Docs Annotations', function() { body.html(''); }); + var normalizeHtml = function(html) { + return html.toLowerCase().replace(/\s*$/, ''); + }; + describe('popover directive', function() { var $scope, element; @@ -57,7 +61,7 @@ describe('Docs Annotations', function() { $scope.$apply(); element.triggerHandler('click'); expect(popoverElement.title()).toBe('#title_text'); - expect(popoverElement.content()).toBe('

heading

\n'); + expect(normalizeHtml(popoverElement.content())).toMatch('

heading

'); })); }); @@ -65,6 +69,9 @@ describe('Docs Annotations', function() { describe('foldout directive', function() { + // Do not run this suite on Internet Explorer. + if (msie < 10) return; + var $scope, parent, element, url; beforeEach(function() { module(function($provide, $animateProvider) { diff --git a/docs/component-spec/mocks.js b/docs/component-spec/mocks.js index 143a1f393311..f916c0edee7a 100644 --- a/docs/component-spec/mocks.js +++ b/docs/component-spec/mocks.js @@ -1,3 +1,6 @@ +// Copy/pasted from src/Angular.js, so that we can disable specific tests on IE. +var msie = parseInt((/msie (\d+)/.exec(navigator.userAgent.toLowerCase()) || [])[1], 10); + var createMockWindow = function() { var mockWindow = {}; var setTimeoutQueue = []; diff --git a/docs/component-spec/versionJumpSpec.js b/docs/component-spec/versionJumpSpec.js index 4db2d29d6e0a..bb43231a3a88 100644 --- a/docs/component-spec/versionJumpSpec.js +++ b/docs/component-spec/versionJumpSpec.js @@ -1,5 +1,8 @@ describe('DocsApp', function() { + // Do not run this suite on Internet Explorer. + if (msie < 10) return; + beforeEach(module('docsApp')); describe('DocsVersionsCtrl', function() { diff --git a/karma-docs.conf.js b/karma-docs.conf.js index e1790214e778..c3faf673bc44 100644 --- a/karma-docs.conf.js +++ b/karma-docs.conf.js @@ -26,6 +26,7 @@ module.exports = function(config) { 'build/docs/js/docs.js', 'build/docs/docs-data.js', + 'docs/component-spec/mocks.js', 'docs/component-spec/*.js' ],