mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-23 19:40:56 +08:00
test(ngRepeat): move an existing test into the right describe block
This commit is contained in:
@@ -1332,6 +1332,27 @@ describe('ngRepeat and transcludes', function() {
|
||||
dealoc(element);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
it('should work with svg elements when the svg container is transcluded', function() {
|
||||
module(function($compileProvider) {
|
||||
$compileProvider.directive('svgContainer', function() {
|
||||
return {
|
||||
template: '<svg ng-transclude></svg>',
|
||||
replace: true,
|
||||
transclude: true
|
||||
};
|
||||
});
|
||||
});
|
||||
inject(function($compile, $rootScope) {
|
||||
element = $compile('<svg-container><circle ng-repeat="r in rows"></circle></svg-container>')($rootScope);
|
||||
$rootScope.rows = [1];
|
||||
$rootScope.$apply();
|
||||
|
||||
var circle = element.find('circle');
|
||||
expect(circle[0].toString()).toMatch(/SVG/);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('ngRepeat animations', function() {
|
||||
@@ -1464,25 +1485,4 @@ describe('ngRepeat animations', function() {
|
||||
expect(item.element.text()).toBe('3');
|
||||
})
|
||||
);
|
||||
|
||||
it('should work with svg elements when the svg container is transcluded', function() {
|
||||
module(function($compileProvider) {
|
||||
$compileProvider.directive('svgContainer', function() {
|
||||
return {
|
||||
template: '<svg ng-transclude></svg>',
|
||||
replace: true,
|
||||
transclude: true
|
||||
};
|
||||
});
|
||||
});
|
||||
inject(function($compile, $rootScope) {
|
||||
element = $compile('<svg-container><circle ng-repeat="r in rows"></circle></svg-container>')($rootScope);
|
||||
$rootScope.rows = [1];
|
||||
$rootScope.$apply();
|
||||
|
||||
var circle = element.find('circle');
|
||||
expect(circle[0].toString()).toMatch(/SVG/);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user