mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
More list view tests
This commit is contained in:
2
dist/js/ionic-angular.js
vendored
2
dist/js/ionic-angular.js
vendored
@@ -24889,6 +24889,8 @@ angular.module('ionic.ui.list', ['ngAnimate'])
|
||||
}
|
||||
});
|
||||
|
||||
$scope.listView = lv;
|
||||
|
||||
if($attr.refreshComplete) {
|
||||
$scope.refreshComplete = function() {
|
||||
lv.doneRefreshing();
|
||||
|
||||
2
js/ext/angular/src/directive/ionicList.js
vendored
2
js/ext/angular/src/directive/ionicList.js
vendored
@@ -201,6 +201,8 @@ angular.module('ionic.ui.list', ['ngAnimate'])
|
||||
}
|
||||
});
|
||||
|
||||
$scope.listView = lv;
|
||||
|
||||
if($attr.refreshComplete) {
|
||||
$scope.refreshComplete = function() {
|
||||
lv.doneRefreshing();
|
||||
|
||||
@@ -1,11 +1,19 @@
|
||||
describe('Ionic List', function() {
|
||||
var modal, q;
|
||||
var compile, scope;
|
||||
|
||||
beforeEach(module('ionic.ui.list'));
|
||||
|
||||
beforeEach(function() {
|
||||
});
|
||||
beforeEach(inject(function($compile, $rootScope, $controller) {
|
||||
compile = $compile;
|
||||
scope = $rootScope;
|
||||
}));
|
||||
|
||||
it('Should init', function() {
|
||||
element = compile('<list>' +
|
||||
'<list-item></list-item>' +
|
||||
'<list-item></list-item>' +
|
||||
'</list>')(scope);
|
||||
|
||||
expect(element.children().length).toBe(2);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user