Search in sources :

Example 26 with PopupPanel

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

the class PopupPanelTest method center.

@Test
public void center() {
    // Given
    PopupPanel popup = new PopupPanel();
    popup.setAnimationEnabled(true);
    // When
    popup.center();
    // Then
    assertThat(popup.getOffsetHeight()).isEqualTo(0);
    assertThat(popup.getOffsetWidth()).isEqualTo(0);
}
Also used : PopupPanel(com.google.gwt.user.client.ui.PopupPanel) Test(org.junit.Test)

Example 27 with PopupPanel

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

the class PopupPanelTest method showGlass.

@Test
public void showGlass() {
    // Given
    PopupPanel popup = new PopupPanel();
    popup.setGlassEnabled(true);
    // Preconditions
    assertThat(popup.isShowing()).isFalse();
    // When
    popup.show();
    // Then
    assertThat(popup.isShowing()).isTrue();
}
Also used : PopupPanel(com.google.gwt.user.client.ui.PopupPanel) Test(org.junit.Test)

Example 28 with PopupPanel

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

the class PopupPanelTest method visible.

@Test
public void visible() {
    // Given
    PopupPanel popup = new PopupPanel();
    // Preconditions
    assertThat(popup.isVisible()).isTrue();
    // When
    popup.setVisible(false);
    // Then
    assertThat(popup.isVisible()).isFalse();
    assertThat(popup.getElement().getStyle().getProperty("visibility")).isEqualTo("hidden");
}
Also used : PopupPanel(com.google.gwt.user.client.ui.PopupPanel) Test(org.junit.Test)

Aggregations

PopupPanel (com.google.gwt.user.client.ui.PopupPanel)28 Test (org.junit.Test)5 ChangeInfo (com.google.gerrit.client.info.ChangeInfo)4 GerritCallback (com.google.gerrit.client.rpc.GerritCallback)4 PositionCallback (com.google.gwt.user.client.ui.PopupPanel.PositionCallback)4 ClickEvent (com.google.gwt.event.dom.client.ClickEvent)2 ClickHandler (com.google.gwt.event.dom.client.ClickHandler)2 Button (com.google.gwt.user.client.ui.Button)2 CherryPickDialog (com.google.gerrit.client.ui.CherryPickDialog)1 CreateChangeDialog (com.google.gerrit.client.ui.CreateChangeDialog)1 RebaseDialog (com.google.gerrit.client.ui.RebaseDialog)1 TextAreaActionDialog (com.google.gerrit.client.ui.TextAreaActionDialog)1 JsArray (com.google.gwt.core.client.JsArray)1 ScheduledCommand (com.google.gwt.core.client.Scheduler.ScheduledCommand)1 Style (com.google.gwt.dom.client.Style)1 FocusEvent (com.google.gwt.event.dom.client.FocusEvent)1 ResizeEvent (com.google.gwt.event.logical.shared.ResizeEvent)1 ResizeHandler (com.google.gwt.event.logical.shared.ResizeHandler)1 HandlerRegistration (com.google.gwt.event.shared.HandlerRegistration)1 Request (com.google.gwt.http.client.Request)1