Search in sources :

Example 1 with ButtonElement

use of com.google.gwt.dom.client.ButtonElement in project gwt-test-utils by gwt-test-utils.

the class ButtonTest method wrap.

@Test
public void wrap() {
    // Given
    ButtonElement element = Document.get().createPushButtonElement();
    element.setTabIndex(3);
    Document.get().getBody().appendChild(element);
    // When
    Button b = Button.wrap(element);
    // Then 1
    assertThat(b.getTabIndex()).isEqualTo(3);
    // When 2
    b.setTabIndex(1);
    // Then 2
    assertThat(element.getTabIndex()).isEqualTo(1);
}
Also used : ButtonElement(com.google.gwt.dom.client.ButtonElement) Button(com.google.gwt.user.client.ui.Button) Test(org.junit.Test)

Aggregations

ButtonElement (com.google.gwt.dom.client.ButtonElement)1 Button (com.google.gwt.user.client.ui.Button)1 Test (org.junit.Test)1