corregido test de datePicker
This commit is contained in:
parent
b8f50b64da
commit
afa4f6532f
|
@ -18,14 +18,13 @@ export const formatEquivalence = {
|
||||||
};
|
};
|
||||||
|
|
||||||
class DatePicker extends Component {
|
class DatePicker extends Component {
|
||||||
constructor($element, $translate, $filter, $timeout, $attrs, $scope) {
|
constructor($element, $translate, $filter, $timeout, $attrs) {
|
||||||
super($element);
|
super($element);
|
||||||
this.input = $element[0].querySelector('input');
|
this.input = $element[0].querySelector('input');
|
||||||
this.$translate = $translate;
|
this.$translate = $translate;
|
||||||
this.$filter = $filter;
|
this.$filter = $filter;
|
||||||
this.$timeout = $timeout;
|
this.$timeout = $timeout;
|
||||||
this.$attrs = $attrs;
|
this.$attrs = $attrs;
|
||||||
this.$scope = $scope;
|
|
||||||
|
|
||||||
this.enabled = true;
|
this.enabled = true;
|
||||||
this._modelView = null;
|
this._modelView = null;
|
||||||
|
@ -202,7 +201,7 @@ class DatePicker extends Component {
|
||||||
this.destroyPicker();
|
this.destroyPicker();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DatePicker.$inject = ['$element', '$translate', '$filter', '$timeout', '$attrs', '$scope'];
|
DatePicker.$inject = ['$element', '$translate', '$filter', '$timeout', '$attrs'];
|
||||||
|
|
||||||
module.component('vnDatePicker', {
|
module.component('vnDatePicker', {
|
||||||
template: require('./datePicker.html'),
|
template: require('./datePicker.html'),
|
||||||
|
|
|
@ -5,6 +5,7 @@ describe('Component vnDatePicker', () => {
|
||||||
let $scope;
|
let $scope;
|
||||||
let $timeout;
|
let $timeout;
|
||||||
let $element;
|
let $element;
|
||||||
|
let $attrs;
|
||||||
let $translate;
|
let $translate;
|
||||||
let controller;
|
let controller;
|
||||||
|
|
||||||
|
@ -18,7 +19,8 @@ describe('Component vnDatePicker', () => {
|
||||||
$timeout = _$timeout_;
|
$timeout = _$timeout_;
|
||||||
$element = angular.element(`<div><input></div>`);
|
$element = angular.element(`<div><input></div>`);
|
||||||
$translate = _$translate_;
|
$translate = _$translate_;
|
||||||
controller = $componentController('vnDatePicker', {$scope, $element, $translate, $timeout});
|
$attrs = {};
|
||||||
|
controller = $componentController('vnDatePicker', {$scope, $element, $translate, $timeout, $attrs});
|
||||||
}));
|
}));
|
||||||
|
|
||||||
describe('_formatFlat2Angular()', () => {
|
describe('_formatFlat2Angular()', () => {
|
||||||
|
|
Loading…
Reference in New Issue