fix: re-enable focus/blur/change form tests
@@ -123,21 +123,23 @@ describe('SyndesisFormComponent test suite', () => {
expect(testElement instanceof DebugElement).toBe(true);
});
- /*
- TODO - figure out how to re-enable these two tests
- it('should listen to native focus and blur events', () => {
+ it('should listen to native focus events', () => {
spyOn(component, 'onFocus');
- testElement.triggerEventHandler('focus', null);
- testElement.triggerEventHandler('blur', null);
- expect(component.onFocus).toHaveBeenCalledTimes(2);
+ testElement.triggerEventHandler('dfFocus', null);
+ expect(component.onFocus).toHaveBeenCalled();
+ });
+
+ it('should listen to native blur events', () => {
+ spyOn(component, 'onBlur');
+ testElement.triggerEventHandler('dfBlur', null);
+ expect(component.onBlur).toHaveBeenCalled();
});
it('should listen to native change event', () => {
spyOn(component, 'onValueChange');
- testElement.triggerEventHandler('change', null);
+ testElement.triggerEventHandler('dfChange', null);
expect(component.onValueChange).toHaveBeenCalled();
});
- */
it('should update model value when control value changes', () => {
spyOn(component, 'onControlValueChanges');
