diff options
author | Sauli Tähkäpää <sauli@vaadin.com> | 2014-10-02 22:19:05 +0300 |
---|---|---|
committer | Sauli Tähkäpää <sauli@vaadin.com> | 2014-10-16 16:00:02 +0300 |
commit | 8ecf9ecc332f396e5356b2d98dcfbd9b93cac3fd (patch) | |
tree | 7fcb074c3362d4c9c46014ca45fc5aaaff74c782 /uitest | |
parent | 45d329410979d5bbc2e2a8dd768756d10944a46f (diff) | |
download | vaadin-framework-8ecf9ecc332f396e5356b2d98dcfbd9b93cac3fd.tar.gz vaadin-framework-8ecf9ecc332f396e5356b2d98dcfbd9b93cac3fd.zip |
Implement HasEnabled in VPopupView. (#14797)
Change-Id: I7384fb6312a921330d8b57193e53c235213dcf00
Diffstat (limited to 'uitest')
-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 |