use of elemental2.dom.HTMLInputElement in project kie-wb-common by kiegroup.
the class NotificationsEditorWidgetTest method testOneNotification.
@Test
public void testOneNotification() {
values.setValues(new ArrayList<>());
values.addValue(new NotificationValue());
Assert.assertEquals(1, values.getValues().size());
Assert.assertFalse(values.isEmpty());
notificationsEditorWidget.setValue(values);
Assert.assertEquals(1, values.getValues().size());
Assert.assertEquals(1, notificationsEditorWidget.getValue().getValues().size());
HTMLInputElement input = getFieldValue(NotificationsEditorWidget.class, notificationsEditorWidget, "notificationTextBox");
Assert.assertEquals("1 notifications", input.value);
}
use of elemental2.dom.HTMLInputElement in project kie-wb-common by kiegroup.
the class NotificationsEditorWidgetTest method testZeroNotifications.
@Test
public void testZeroNotifications() {
values.setValues(new ArrayList<>());
notificationsEditorWidget.setValue(values);
Assert.assertEquals(0, values.getValues().size());
Assert.assertTrue(values.isEmpty());
Assert.assertEquals(0, notificationsEditorWidget.getValue().getValues().size());
HTMLInputElement input = getFieldValue(NotificationsEditorWidget.class, notificationsEditorWidget, "notificationTextBox");
Assert.assertEquals("0 notifications", input.value);
}
use of elemental2.dom.HTMLInputElement in project gwt-react-examples by GWTReact.
the class StatefulExample method doChange.
private void doChange(FormEvent event) {
HTMLInputElement e = (HTMLInputElement) event.target;
String val = e.value;
setState(State.make(val));
}
use of elemental2.dom.HTMLInputElement in project kie-wb-common by kiegroup.
the class DataTypeShortcutsTest method testIsSearchBarTargetWhenItReturnsTrue.
@Test
public void testIsSearchBarTargetWhenItReturnsTrue() {
final HTMLInputElement element = mock(HTMLInputElement.class);
event.target = element;
when(element.getAttribute("data-field")).thenReturn("search-bar");
assertTrue(shortcuts.isTargetElementAnInput(event));
}
use of elemental2.dom.HTMLInputElement in project kie-wb-common by kiegroup.
the class DataTypeListItemViewTest method testGetNameInput.
@Test
public void testGetNameInput() {
final HTMLInputElement element = mock(HTMLInputElement.class);
doReturn(element).when(view).querySelector(NAME_DATA_FIELD);
assertEquals(element, view.getNameInput());
}
Aggregations