summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorJonatan Kronqvist <jonatan@vaadin.com>2014-05-08 13:18:03 +0300
committerVaadin Code Review <review@vaadin.com>2014-05-08 12:57:21 +0000
commitb136dd595e212f4d970ccb69fa70bc8bb31e9548 (patch)
treeeab83e26fdf0eedf9d1ff10cc63e24977234844d /uitest
parent50ea89e04158eca0afa7abbe9d4c7426509af131 (diff)
downloadvaadin-framework-b136dd595e212f4d970ccb69fa70bc8bb31e9548.tar.gz
vaadin-framework-b136dd595e212f4d970ccb69fa70bc8bb31e9548.zip
Convert the AccordionClipsContent test to TB4 to avoid false failures.
Change-Id: Iced9219e8cd3172c53af286c4b644b04f00041c2
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/tests/components/accordion/AccordionClipsContent.html57
-rw-r--r--uitest/src/com/vaadin/tests/components/accordion/AccordionClipsContentTest.java57
2 files changed, 57 insertions, 57 deletions
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 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head profile="http://selenium-ide.openqa.org/profiles/test-case">
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<link rel="selenium.base" href="http://arturwin.office.itmill.com:8888/" />
-<title>New Test</title>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
-<thead>
-<tr><td rowspan="1" colspan="3">New Test</td></tr>
-</thead><tbody>
-<tr>
- <td>open</td>
- <td>/run/AccordionTest?restartApplication</td>
- <td></td>
-</tr>
-<tr>
- <td>mouseClick</td>
- <td>vaadin=runAccordionTest::PID_Smenu#item0</td>
- <td>45,2</td>
-</tr>
-<tr>
- <td>mouseClick</td>
- <td>vaadin=runAccordionTest::Root/VOverlay[0]/VMenuBar[0]#item3</td>
- <td>136,8</td>
-</tr>
-<tr>
- <td>mouseClick</td>
- <td>vaadin=runAccordionTest::Root/VOverlay[1]/VMenuBar[0]#item0</td>
- <td>65,4</td>
-</tr>
-<tr>
- <td>mouseClick</td>
- <td>vaadin=runAccordionTest::Root/VOverlay[2]/VMenuBar[0]#item1</td>
- <td>86,2</td>
-</tr>
-<tr>
- <td>mouseClick</td>
- <td>vaadin=runAccordionTest::Root/VOverlay[3]/VMenuBar[0]#item0</td>
- <td>48,0</td>
-</tr>
-<tr>
- <td>mouseClick</td>
- <td>vaadin=runAccordionTest::PID_StestComponent/VAccordion$StackItem[0]/VNativeButton[0]</td>
- <td>63,11</td>
-</tr>
-<tr>
- <td>screenCapture</td>
- <td></td>
- <td>button-clicked</td>
-</tr>
-
-</tbody></table>
-</body>
-</html>
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);
+ }
+}