Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
test(docs): ignore some of the specs on IE
Browse files Browse the repository at this point in the history
This target was never un on our Jenkins CI. Some of the specs are using animation stuff, that IE does not support, so I'm disabling them.
  • Loading branch information
vojtajina committed Aug 23, 2013
1 parent b89a4e4 commit 040aa11
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/component-spec/annotationsSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -57,14 +61,17 @@ describe('Docs Annotations', function() {
$scope.$apply();
element.triggerHandler('click');
expect(popoverElement.title()).toBe('#title_text');
expect(popoverElement.content()).toBe('<h1>heading</h1>\n');
expect(normalizeHtml(popoverElement.content())).toMatch('<h1>heading</h1>');
}));

});


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) {
Expand Down
3 changes: 3 additions & 0 deletions docs/component-spec/mocks.js
Original file line number Diff line number Diff line change
@@ -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 = [];
Expand Down
3 changes: 3 additions & 0 deletions docs/component-spec/versionJumpSpec.js
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down
1 change: 1 addition & 0 deletions karma-docs.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
],

Expand Down

0 comments on commit 040aa11

Please sign in to comment.