Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
beforeEach(() => {
simulate.focus(ampm);
simulate.keyDown(ampm, {keyCode: keycode('space')});
});
it('onChange should be callen with "16:55"', () => {
it('should appear when the Enter key is pressed and the openOnFocus property is set to false', async () => {
const {waitForDom} = clientRenderer.render();
simulate.focus(bodySelect(datePickerInputId));
await waitForDom(() => expect(bodySelect(datePickerDropdownId)).to.be.absent());
simulate.keyDown(bodySelect(datePickerInputId), {keyCode: keycode('enter')});
await waitForDom(() => expect(bodySelect(datePickerDropdownId)).to.be.present());
});
beforeEach(() => {
simulate.focus(mm);
simulate.click(mm);
simulate.keyDown(mm, {keyCode: keycode('backspace')});
simulate.keyDown(mm, {keyCode: keycode('backspace')});
});
it('hh input should have "13" value', () => {
public pressEnter() {
simulate.keyDown(this.nativeInput, {keyCode: KeyCodes.enter});
}
public keyDown(key: string, opts?: object) {
simulate.keyDown(this.handle, {
keyCode: keycode(key),
...opts
});
}
public keyDown(eventData: object): void {
simulate.keyDown(this.root, eventData);
}
public pressEsc() {
simulate.keyDown(this.nativeInput, {keyCode: KeyCodes.esc});
}
public pressUpKey(opts?: Modifiers) {
simulate.keyDown(this.nativeInput, {keyCode: KeyCodes.up, ...opts});
}
public pressDownKey(opts?: Modifiers) {
simulate.keyDown(this.nativeInput, {keyCode: KeyCodes.down, ...opts});
}
public keyPress(keyCode: number): void {
simulate.keyDown(this.input, {keyCode});
}