Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should only call onChange once', async () => {
const onChange = sinon.spy();
const {select, waitForDom} = clientRenderer.render();
const datePickerInput = select(datePickerInputId);
trigger.change(datePickerInput!, '2017/02/01');
simulate.blur(datePickerInput);
await waitForDom(() => expect(onChange).to.have.been.calledOnce);
});
it('should set focus on hh on first input', () => {
simulate.blur(secondInputMM);
simulate.focus(firstStepperUp);
simulate.click(firstStepperUp);
expect(document.activeElement === firstInputHH).to.be.true;
});
});
await waitForDom(() => {
const input = select('NATIVE_INPUT_NUMBER') as HTMLInputElement;
simulateKeyInput(input, '1');
simulateKeyInput(input, '2');
simulateKeyInput(input, '3');
simulate.blur(input);
assertCommit(input, onChange, 123);
});
});
beforeEach(() => {
simulate.blur(firstInputMM);
simulate.click(secondInputMM);
simulate.focus(secondInputMM);
});
describe.skip('click on stepper in first input', () => {
public blur(): void {
simulate.blur(this.root);
}
public blur() {
simulate.blur(this.nativeInput);
}
}
public changeDate(value: string): void {
trigger.change(this.input, value);
simulate.blur(this.input);
}