refactor(select): using BaseInput correctly + unit tests

This commit is contained in:
Manuel Mtz-Almeida
2017-03-27 16:06:45 +02:00
parent 9a4d81b329
commit 9be5751eeb
7 changed files with 65 additions and 30 deletions

View File

@@ -126,7 +126,7 @@ export class BaseInput<T> extends Ion implements CommonInput<T> {
const normalized = this._inputNormalize(val);
const shouldUpdate = this._inputShouldChange(normalized);
if (shouldUpdate) {
console.debug('BaseInput: value has changed:', val);
console.debug('BaseInput: value changed:', normalized, this);
this._value = normalized;
this._inputCheckHasValue(normalized);
this._inputUpdated();

View File

@@ -52,6 +52,7 @@ export interface TestConfig {
export function commonInputTest<T>(input: BaseInput<T>, config: TestConfig) {
// TODO test form register/deregister
// TODO test item classes
// TODO test disable
testInput(input, config, false);
input.ngAfterViewInit();