use of com.google.gwt.event.dom.client.KeyDownEvent in project drools-wb by kiegroup.
the class BaseKeyDownHandlerTest method enterKeyWithShiftMovesUp.
@Test
public void enterKeyWithShiftMovesUp() {
when(context.getRowIndex()).thenReturn(1);
when(context.getColumnIndex()).thenReturn(0);
final KeyDownEvent e = mockKeyDownEvent(Optional.of(KeyCodes.KEY_ENTER), Optional.of(true), Optional.of(false));
handler.onKeyDown(e);
verify(gridWidget).adjustSelection(eq(SelectionExtension.UP), eq(false));
}
use of com.google.gwt.event.dom.client.KeyDownEvent in project drools-wb by kiegroup.
the class BaseKeyDownHandlerTest method tabKeyWithShiftMovesLeft.
@Test
public void tabKeyWithShiftMovesLeft() {
when(context.getRowIndex()).thenReturn(0);
when(context.getColumnIndex()).thenReturn(1);
final KeyDownEvent e = mockKeyDownEvent(Optional.of(KeyCodes.KEY_TAB), Optional.of(true), Optional.of(false));
handler.onKeyDown(e);
verify(gridWidget).adjustSelection(eq(SelectionExtension.LEFT), eq(false));
}
use of com.google.gwt.event.dom.client.KeyDownEvent in project drools-wb by kiegroup.
the class BaseKeyDownHandlerTest method enterKeyWithoutShiftMovesDown.
@Test
public void enterKeyWithoutShiftMovesDown() {
when(context.getRowIndex()).thenReturn(1);
when(context.getColumnIndex()).thenReturn(0);
final KeyDownEvent e = mockKeyDownEvent(Optional.of(KeyCodes.KEY_ENTER), Optional.of(false), Optional.of(false));
handler.onKeyDown(e);
verify(gridWidget).adjustSelection(eq(SelectionExtension.DOWN), eq(false));
}
use of com.google.gwt.event.dom.client.KeyDownEvent in project drools-wb by kiegroup.
the class KeyDownHandlerDatePickerTest method tabKeyCanvasActions.
@Test
public void tabKeyCanvasActions() {
final KeyDownEvent e = mockKeyDownEvent(Optional.of(KeyCodes.KEY_TAB), Optional.of(false), Optional.of(false));
handler.onKeyDown(e);
verify(gridCell, never()).flush();
verify(gridCell).destroyResources();
verifyCommonActions();
}
use of com.google.gwt.event.dom.client.KeyDownEvent in project drools-wb by kiegroup.
the class KeyDownHandlerDatePickerTest method escapeKeyCanvasActions.
@Test
public void escapeKeyCanvasActions() {
final KeyDownEvent e = mockKeyDownEvent(Optional.of(KeyCodes.KEY_ESCAPE), Optional.of(false), Optional.of(false));
handler.onKeyDown(e);
verify(gridCell, never()).flush();
verify(gridCell).destroyResources();
verifyCommonActions();
}
Aggregations