diff options
Diffstat (limited to 'uitest/src/com/vaadin/tests/components/menubar/MenuItemStyleRemovedTest.java')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/menubar/MenuItemStyleRemovedTest.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/menubar/MenuItemStyleRemovedTest.java b/uitest/src/com/vaadin/tests/components/menubar/MenuItemStyleRemovedTest.java new file mode 100644 index 0000000000..2ba63587fe --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/menubar/MenuItemStyleRemovedTest.java @@ -0,0 +1,30 @@ +package com.vaadin.tests.components.menubar; + +import com.vaadin.testbench.By; +import com.vaadin.testbench.elements.ButtonElement; +import com.vaadin.testbench.elements.MenuBarElement; +import com.vaadin.tests.tb3.MultiBrowserTest; +import org.junit.Assert; +import org.junit.Test; +import org.openqa.selenium.WebElement; + +import java.util.List; + +public class MenuItemStyleRemovedTest extends MultiBrowserTest { + + @Test + public void testCustomStyleShouldStayAfterMenuSelect() { + openTestURL(); + + $(ButtonElement.class).caption("Add styles").first().click(); + + MenuBarElement menu = $(MenuBarElement.class).first(); + List<WebElement> elements = menu.findElements(By.className("custom-menu-item")); + Assert.assertEquals(2, elements.size()); + + menu.clickItem("first"); + menu.clickItem("second"); + elements = menu.findElements(By.className("custom-menu-item")); + Assert.assertEquals(2, elements.size()); + } +} |