From b136dd595e212f4d970ccb69fa70bc8bb31e9548 Mon Sep 17 00:00:00 2001 From: Jonatan Kronqvist Date: Thu, 8 May 2014 13:18:03 +0300 Subject: [PATCH] Convert the AccordionClipsContent test to TB4 to avoid false failures. Change-Id: Iced9219e8cd3172c53af286c4b644b04f00041c2 --- .../accordion/AccordionClipsContent.html | 57 ------------------- .../accordion/AccordionClipsContentTest.java | 57 +++++++++++++++++++ 2 files changed, 57 insertions(+), 57 deletions(-) delete mode 100644 uitest/src/com/vaadin/tests/components/accordion/AccordionClipsContent.html create mode 100644 uitest/src/com/vaadin/tests/components/accordion/AccordionClipsContentTest.java diff --git a/uitest/src/com/vaadin/tests/components/accordion/AccordionClipsContent.html b/uitest/src/com/vaadin/tests/components/accordion/AccordionClipsContent.html deleted file mode 100644 index 30414094c8..0000000000 --- a/uitest/src/com/vaadin/tests/components/accordion/AccordionClipsContent.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - -New Test - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
New Test
open/run/AccordionTest?restartApplication
mouseClickvaadin=runAccordionTest::PID_Smenu#item045,2
mouseClickvaadin=runAccordionTest::Root/VOverlay[0]/VMenuBar[0]#item3136,8
mouseClickvaadin=runAccordionTest::Root/VOverlay[1]/VMenuBar[0]#item065,4
mouseClickvaadin=runAccordionTest::Root/VOverlay[2]/VMenuBar[0]#item186,2
mouseClickvaadin=runAccordionTest::Root/VOverlay[3]/VMenuBar[0]#item048,0
mouseClickvaadin=runAccordionTest::PID_StestComponent/VAccordion$StackItem[0]/VNativeButton[0]63,11
screenCapturebutton-clicked
- - diff --git a/uitest/src/com/vaadin/tests/components/accordion/AccordionClipsContentTest.java b/uitest/src/com/vaadin/tests/components/accordion/AccordionClipsContentTest.java new file mode 100644 index 0000000000..b4f830d106 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/accordion/AccordionClipsContentTest.java @@ -0,0 +1,57 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.tests.components.accordion; + +import org.junit.Test; + +import com.vaadin.testbench.elements.NativeButtonElement; +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class AccordionClipsContentTest extends MultiBrowserTest { + @Override + protected Class getUIClass() { + return AccordionTest.class; + } + + @Test + public void testAccordionClipsContent() throws Exception { + openTestURL(); + + /* + * MenuBarElement doesn't have any API, so this part is ugly until + * #13364 is fixed + */ + + // Component + vaadinElement("PID_Smenu#item0").click(); + // Component container features + clickAt("Root/VOverlay[0]/VMenuBar[0]#item3", 136, 8); + // Add component + clickAt("Root/VOverlay[1]/VMenuBar[0]#item0", 65, 4); + // NativeButton + clickAt("Root/VOverlay[2]/VMenuBar[0]#item1", 86, 2); + // autoxauto + vaadinElement("Root/VOverlay[3]/VMenuBar[0]#item0").click(); + + $(NativeButtonElement.class).first().click(); + + compareScreen("button-clicked"); + } + + private void clickAt(String vaadinLocator, int x, int y) { + testBenchElement(vaadinElement(vaadinLocator)).click(x, y); + } +} -- 2.39.5