test(ngRepeat): disable an element directive test on IE8

This commit is contained in:
Igor Minar 2013-07-02 11:11:52 -07:00
parent c46c5924c4
commit 726e0c246b

View file

@ -523,21 +523,25 @@ describe('ngRepeat', function() {
}));
it('should work when placed on a root element of element directive with ASYNC replaced template',
inject(function($templateCache, $compile, $rootScope) {
$compileProvider.directive('replaceMeWithRepeater', function() {
return {
restrict: 'E',
replace: true,
templateUrl: 'replace-me-with-repeater.html'
};
});
$templateCache.put('replace-me-with-repeater.html', '<div ng-repeat="i in [1,2,3]">{{i}}</div>');
element = $compile('<div><replace-me-with-repeater></replace-me-with-repeater></div>')($rootScope);
expect(element.text()).toBe('');
$rootScope.$apply();
expect(element.text()).toBe('123');
}));
if (!msie || msie > 8) {
// only IE>8 supports element directives
it('should work when placed on a root element of element directive with ASYNC replaced template',
inject(function($templateCache, $compile, $rootScope) {
$compileProvider.directive('replaceMeWithRepeater', function() {
return {
restrict: 'E',
replace: true,
templateUrl: 'replace-me-with-repeater.html'
};
});
$templateCache.put('replace-me-with-repeater.html', '<div ng-repeat="i in [1,2,3]">{{i}}</div>');
element = $compile('<div><replace-me-with-repeater></replace-me-with-repeater></div>')($rootScope);
expect(element.text()).toBe('');
$rootScope.$apply();
expect(element.text()).toBe('123');
}));
}
});