Search in sources :

Example 21 with Image

use of com.google.gwt.user.client.ui.Image in project gwt-test-utils by gwt-test-utils.

the class ImageTest method visible.

@Test
public void visible() {
    // Given
    Image i = new Image();
    // Preconditions
    assertThat(i.isVisible()).isEqualTo(true);
    // When
    i.setVisible(false);
    // Then
    assertThat(i.isVisible()).isEqualTo(false);
}
Also used : Image(com.google.gwt.user.client.ui.Image) Test(org.junit.Test)

Example 22 with Image

use of com.google.gwt.user.client.ui.Image in project gwt-test-utils by gwt-test-utils.

the class ImageTest method title.

@Test
public void title() {
    // Given
    Image i = new Image();
    // When
    i.setTitle("title");
    // Then
    assertThat(i.getTitle()).isEqualTo("title");
}
Also used : Image(com.google.gwt.user.client.ui.Image) Test(org.junit.Test)

Example 23 with Image

use of com.google.gwt.user.client.ui.Image in project gwt-test-utils by gwt-test-utils.

the class ImageTest method url.

@Test
public void url() {
    // Given
    Image i = new Image("http://my-url");
    // Preconditions
    assertThat(i.getUrl()).isEqualTo("http://my-url");
    // When
    i.setUrl("newURL");
    // Then
    assertThat(i.getUrl()).isEqualTo("newURL");
}
Also used : Image(com.google.gwt.user.client.ui.Image) Test(org.junit.Test)

Example 24 with Image

use of com.google.gwt.user.client.ui.Image in project gwt-test-utils by gwt-test-utils.

the class ImageTest method width_Em.

@Test
public void width_Em() {
    Image i = new Image();
    // Preconditions
    assertThat(i.getWidth()).isEqualTo(0);
    // When
    i.setWidth("20em");
    // Then
    assertThat(i.getWidth()).isEqualTo(20);
}
Also used : Image(com.google.gwt.user.client.ui.Image) Test(org.junit.Test)

Example 25 with Image

use of com.google.gwt.user.client.ui.Image in project gwt-test-utils by gwt-test-utils.

the class ImageTest method width.

@Test
public void width() {
    // Given
    Image i = new Image();
    // Preconditions
    assertThat(i.getWidth()).isEqualTo(0);
    // When
    i.setWidth("20");
    // Then
    assertThat(i.getWidth()).isEqualTo(20);
}
Also used : Image(com.google.gwt.user.client.ui.Image) Test(org.junit.Test)

Aggregations

Image (com.google.gwt.user.client.ui.Image)52 Test (org.junit.Test)13 ClickEvent (com.google.gwt.event.dom.client.ClickEvent)9 ClickHandler (com.google.gwt.event.dom.client.ClickHandler)9 Element (com.google.gwt.dom.client.Element)8 Label (com.google.gwt.user.client.ui.Label)8 HorizontalPanel (com.google.gwt.user.client.ui.HorizontalPanel)7 ImageResource2x (org.rstudio.core.client.resources.ImageResource2x)7 ImageResource (com.google.gwt.resources.client.ImageResource)6 FlexTable (com.google.gwt.user.client.ui.FlexTable)5 FlowPanel (com.google.gwt.user.client.ui.FlowPanel)5 HTML (com.google.gwt.user.client.ui.HTML)5 Style (com.google.gwt.dom.client.Style)4 SafeHtml (com.google.gwt.safehtml.shared.SafeHtml)4 Anchor (com.google.gwt.user.client.ui.Anchor)4 VerticalPanel (com.google.gwt.user.client.ui.VerticalPanel)4 FlexCellFormatter (com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter)3 SimplePanel (com.google.gwt.user.client.ui.SimplePanel)3 HighlightingInlineHyperlink (com.google.gerrit.client.ui.HighlightingInlineHyperlink)2 JavaScriptObject (com.google.gwt.core.client.JavaScriptObject)2