diff options
author | Sauli Tähkäpää <sauli@vaadin.com> | 2014-10-02 22:19:05 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-10-07 13:10:03 +0000 |
commit | 3baeb1e4e76ee1a06743d9553ea082c0933b3a00 (patch) | |
tree | 78bec5093e3787915c059e74be5a122d001c0f93 /uitest/src/com/vaadin/tests/components/popupview | |
parent | 0b9f00b4f04b73a2631ef4dccb03bb8607d7aca2 (diff) | |
download | vaadin-framework-3baeb1e4e76ee1a06743d9553ea082c0933b3a00.tar.gz vaadin-framework-3baeb1e4e76ee1a06743d9553ea082c0933b3a00.zip |
Implement HasEnabled in VPopupView. (#14797)
Change-Id: I7384fb6312a921330d8b57193e53c235213dcf00
Diffstat (limited to 'uitest/src/com/vaadin/tests/components/popupview')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/popupview/DisabledPopupView.java | 23 | ||||
-rw-r--r-- | uitest/src/com/vaadin/tests/components/popupview/DisabledPopupViewTest.java | 20 |
2 files changed, 43 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/popupview/DisabledPopupView.java b/uitest/src/com/vaadin/tests/components/popupview/DisabledPopupView.java new file mode 100644 index 0000000000..ecce1781a5 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/popupview/DisabledPopupView.java @@ -0,0 +1,23 @@ +package com.vaadin.tests.components.popupview; + +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.ui.Button; +import com.vaadin.ui.PopupView; + +public class DisabledPopupView extends AbstractTestUI { + + @Override + protected void setup(VaadinRequest request) { + PopupView popupView = new PopupView("Disabled Popup", new Button("Hi!")); + + popupView.setEnabled(false); + + addComponent(popupView); + } + + @Override + protected Integer getTicketNumber() { + return 14797; + } +} diff --git a/uitest/src/com/vaadin/tests/components/popupview/DisabledPopupViewTest.java b/uitest/src/com/vaadin/tests/components/popupview/DisabledPopupViewTest.java new file mode 100644 index 0000000000..be9345d588 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/popupview/DisabledPopupViewTest.java @@ -0,0 +1,20 @@ +package com.vaadin.tests.components.popupview; + +import com.vaadin.testbench.elements.ButtonElement; +import com.vaadin.testbench.elements.PopupViewElement; +import com.vaadin.tests.tb3.MultiBrowserTest; +import org.junit.Test; + +import static org.junit.Assert.assertFalse; + +public class DisabledPopupViewTest extends MultiBrowserTest { + + @Test + public void disabledPopupDoesNotOpen() { + openTestURL(); + + $(PopupViewElement.class).first().click(); + + assertFalse($(ButtonElement.class).exists()); + } +}
\ No newline at end of file |