angular-material-npfixed
Version:
The Angular Material project is an implementation of Material Design in Angular.js. This project provides a set of reusable, well-tested, and accessible Material Design UI components. Angular Material is supported internally at Google by the Angular.js, M
41 lines (31 loc) • 1.11 kB
JavaScript
describe('MdTabInkRipple', function() {
beforeEach(module('material.core'));
var $element, $rootScope, $mdTabInkRipple, $mdInkRipple;
beforeEach(inject(function(_$rootScope_, _$mdTabInkRipple_, _$mdInkRipple_) {
$rootScope = _$rootScope_;
$mdTabInkRipple = _$mdTabInkRipple_;
$mdInkRipple = _$mdInkRipple_;
$element = jasmine.createSpy('element');
spyOn($mdInkRipple, 'attach');
}));
it('applies the correct ripple configuration', function() {
$mdTabInkRipple.attach($rootScope, $element);
var expected = {
center: false,
dimBackground: true,
outline: false,
rippleSize: 'full'
};
expect($mdInkRipple.attach).toHaveBeenCalledWith($rootScope, $element, expected);
});
it('allows ripple configuration to be overridden', function() {
$mdTabInkRipple.attach($rootScope, $element, { center: true, outline: true });
var expected = {
center: true,
dimBackground: true,
outline: true,
rippleSize: 'full'
};
expect($mdInkRipple.attach).toHaveBeenCalledWith($rootScope, $element, expected);
});
});