mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
feat(ionInfiniteScroll): allow configuration of icon
This commit is contained in:
@@ -32,7 +32,7 @@ describe('ionicInfiniteScroll directive', function() {
|
||||
});
|
||||
return element;
|
||||
}
|
||||
|
||||
|
||||
it('should error if no ionicScroll parent', function() {
|
||||
expect(function() {
|
||||
inject(function($compile, $rootScope) {
|
||||
@@ -47,6 +47,28 @@ describe('ionicInfiniteScroll directive', function() {
|
||||
expect(ctrl.isLoading).toBe(false);
|
||||
});
|
||||
|
||||
describe('icon', function() {
|
||||
it('should have default icon ion-loading-d', function() {
|
||||
var el = setup();
|
||||
var icon = angular.element(el[0].querySelector('.icon'));
|
||||
expect(icon.hasClass('ion-loading-d')).toBe(true);
|
||||
});
|
||||
|
||||
it('should allow icon attr blank', function() {
|
||||
var el = setup('icon=""');
|
||||
var icon = angular.element(el[0].querySelector('.icon'));
|
||||
expect(icon.hasClass('ion-loading-d')).toBe(false);
|
||||
});
|
||||
|
||||
it('should allow interpolated icon attr', function() {
|
||||
var el = setup('icon="{{someIcon}}"');
|
||||
var icon = angular.element(el[0].querySelector('.icon'));
|
||||
expect(icon.hasClass('ion-loading-d')).toBe(false);
|
||||
el.scope().$apply('someIcon = "super-icon"');
|
||||
expect(icon.hasClass('super-icon')).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('getMaxScroll', function() {
|
||||
it('getMaxScroll should default to 1%', function() {
|
||||
var el = setup();
|
||||
|
||||
Reference in New Issue
Block a user