Skip to content

Commit fad8a54

Browse files
committed
more debugging ios8
1 parent 453bd52 commit fad8a54

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

src/components/input/input.spec.ts

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -224,24 +224,26 @@ describe('MdInput', function () {
224224
expect(el.nativeElement.textContent).toMatch(/hello\s+\*/g);
225225
});
226226

227-
it('supports number types and conserved its value type from Angular', async(() => {
227+
it('supports number types and conserved its value type from Angular', () => {
228228
let fixture = TestBed.createComponent(MdInputNumberTypeConservedTestComponent);
229229
fixture.detectChanges();
230230

231-
const inputEl = fixture.debugElement.query(By.css('input')).nativeElement;
232-
inputEl.value = '3';
231+
const input: MdInput = fixture.debugElement.query(By.directive(MdInput)).componentInstance;
232+
const inputElement = fixture.debugElement.query(By.css('input')).nativeElement;
233+
234+
inputElement.value = '3';
235+
input._handleChange(<any> {target: inputElement});
233236

234237
// Manually trigger an onchange event.
235-
var evt = document.createEvent('HTMLEvents');
236-
evt.initEvent('change', true, true);
237-
inputEl.dispatchEvent(evt);
238+
// var evt = document.createEvent('HTMLEvents');
239+
// evt.initEvent('change', true, true);
240+
// inputEl.dispatchEvent(evt);
241+
238242

239243
fixture.detectChanges();
240-
fixture.whenStable().then(() => {
241-
expect(fixture.componentInstance.value).toBe(3);
242-
expect(typeof fixture.componentInstance.value).toBe('number');
243-
});
244-
}));
244+
expect(fixture.componentInstance.value).toBe(3);
245+
expect(typeof fixture.componentInstance.value).toBe('number');
246+
});
245247

246248
it('supports blur and focus events', () => {
247249
let fixture = TestBed.createComponent(MdInputWithBlurAndFocusEvents);

0 commit comments

Comments
 (0)