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(mm);
mm.value = '7';
simulate.change(mm);
});
it('should set focus state', () => {
beforeEach(() => {
simulate.focus(ampm);
simulate.keyDown(ampm, {keyCode: keycode('space')});
});
it('onChange should be callen with "16:55"', () => {
it('pressing space on focused input should trigger onChange', function() {
const input = renderer.select('TOGGLE_INPUT');
simulate.focus(input);
simulate.change(input);
expect(onChange).to.have.been.calledOnce;
expect(onChange).to.have.been.calledWithExactly({value: true});
});
});
it('should appear when the Spacebar 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('space')});
await waitForDom(() => expect(bodySelect(datePickerDropdownId)).to.be.present());
});
});
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;
});
});
beforeEach(() => {
simulate.focus(hh);
hh.value = '1';
simulate.change(hh);
});
it('should set focus state', () => {
public focus(): void {
simulate.focus(this.input);
}
public focus(index: number = 0): void {
simulate.focus(this.getHandle(index));
}
beforeEach(() => {
simulate.blur(firstInputMM);
simulate.click(secondInputMM);
simulate.focus(secondInputMM);
});
describe.skip('click on stepper in first input', () => {
function simulateKeyPress(keyToPress: string) {
simulate.focus(datePickerInput);
simulate.keyDown(datePickerInput, {keyCode: keycode(keyToPress)});
simulate.keyDown(datePickerInput, {keyCode: keycode('enter')});
}