diff options
Diffstat (limited to 'uitest/src/test/java/com/vaadin/tests/elements/TestBenchElementRightClickTest.java')
-rw-r--r-- | uitest/src/test/java/com/vaadin/tests/elements/TestBenchElementRightClickTest.java | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/uitest/src/test/java/com/vaadin/tests/elements/TestBenchElementRightClickTest.java b/uitest/src/test/java/com/vaadin/tests/elements/TestBenchElementRightClickTest.java new file mode 100644 index 0000000000..866776c70b --- /dev/null +++ b/uitest/src/test/java/com/vaadin/tests/elements/TestBenchElementRightClickTest.java @@ -0,0 +1,41 @@ +package com.vaadin.tests.elements; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +import com.vaadin.testbench.TestBenchElement; +import com.vaadin.testbench.elements.LabelElement; +import com.vaadin.testbench.elements.TableElement; +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class TestBenchElementRightClickTest extends MultiBrowserTest { + TestBenchElement cell; + LabelElement label; + + @Before + public void init() { + openTestURL(); + cell = $(TableElement.class).id("id1").getCell(1, 1); + label = $(LabelElement.class).id("label1"); + } + + @Test + public void testTableRightClick() { + cell.contextClick(); + String actual = label.getText(); + String expected = "RightClick"; + Assert.assertEquals("TestBenchElement right click fails", expected, + actual); + + } + + @Test + public void testTableDoubleClick() { + cell.doubleClick(); + String actual = label.getText(); + String expected = "DoubleClick"; + Assert.assertEquals("TestBenchElement double click fails", expected, + actual); + } +} |