aboutsummaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/tests/components/table/TableRowHeight2.html57
-rw-r--r--uitest/src/com/vaadin/tests/components/table/TableRowHeight2.java13
-rw-r--r--uitest/src/com/vaadin/tests/components/table/TableRowHeight2Test.java52
3 files changed, 60 insertions, 62 deletions
diff --git a/uitest/src/com/vaadin/tests/components/table/TableRowHeight2.html b/uitest/src/com/vaadin/tests/components/table/TableRowHeight2.html
deleted file mode 100644
index a440ff84fb..0000000000
--- a/uitest/src/com/vaadin/tests/components/table/TableRowHeight2.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="" />
-<title>TableRowHeight2</title>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
-<thead>
-<tr><td rowspan="1" colspan="3">TableRowHeight2</td></tr>
-</thead><tbody>
-<tr>
- <td>open</td>
- <td>/run/com.vaadin.tests.components.table.TableRowHeight2</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForVaadin</td>
- <td></td>
- <td></td>
-</tr>
-<tr>
- <td>screenCapture</td>
- <td></td>
- <td>1</td>
-</tr>
-<tr>
- <td>click</td>
- <td>vaadin=runcomvaadintestscomponentstableTableRowHeight2::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/FocusableScrollPanel[0]/VScrollTable$VScrollTableBody[0]/VScrollTable$VScrollTableBody$VScrollTableRow[0]/VButton[1]/domChild[0]/domChild[0]</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForVaadin</td>
- <td></td>
- <td></td>
-</tr>
-<tr>
- <td>click</td>
- <td>vaadin=runcomvaadintestscomponentstableTableRowHeight2::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/FocusableScrollPanel[0]/VScrollTable$VScrollTableBody[0]/VScrollTable$VScrollTableBody$VScrollTableRow[1]/VButton[1]/domChild[0]/domChild[0]</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForVaadin</td>
- <td></td>
- <td></td>
-</tr>
-<tr>
- <td>screenCapture</td>
- <td></td>
- <td>1</td>
-</tr>
-
-</tbody></table>
-</body>
-</html>
diff --git a/uitest/src/com/vaadin/tests/components/table/TableRowHeight2.java b/uitest/src/com/vaadin/tests/components/table/TableRowHeight2.java
index 0011fdca18..5c733b9e24 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableRowHeight2.java
+++ b/uitest/src/com/vaadin/tests/components/table/TableRowHeight2.java
@@ -1,16 +1,19 @@
package com.vaadin.tests.components.table;
+import com.vaadin.annotations.Theme;
import com.vaadin.data.Item;
-import com.vaadin.tests.components.TestBase;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.Button;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Table;
import com.vaadin.ui.themes.BaseTheme;
-public class TableRowHeight2 extends TestBase {
+@Theme("tests-tickets")
+public class TableRowHeight2 extends AbstractTestUI {
@Override
- protected String getDescription() {
+ protected String getTestDescription() {
return "The table contains 2 rows, which both should be shown completely as the table height is undefined.";
}
@@ -19,9 +22,9 @@ public class TableRowHeight2 extends TestBase {
return 2747;
}
+ @SuppressWarnings("unchecked")
@Override
- protected void setup() {
- setTheme("tests-tickets");
+ protected void setup(VaadinRequest request) {
HorizontalLayout vl = new HorizontalLayout();
vl.setSizeFull();
diff --git a/uitest/src/com/vaadin/tests/components/table/TableRowHeight2Test.java b/uitest/src/com/vaadin/tests/components/table/TableRowHeight2Test.java
new file mode 100644
index 0000000000..7074225311
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/table/TableRowHeight2Test.java
@@ -0,0 +1,52 @@
+/*
+ * 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.table;
+
+import java.io.IOException;
+import java.util.List;
+
+import org.junit.Test;
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebElement;
+
+import com.vaadin.testbench.elements.TableElement;
+import com.vaadin.tests.tb3.MultiBrowserTest;
+
+/**
+ * Tests that rows are completely visible and clicking buttons doesn't change
+ * anything.
+ *
+ * @author Vaadin Ltd
+ */
+public class TableRowHeight2Test extends MultiBrowserTest {
+
+ @Test
+ public void testRowHeights() throws IOException {
+ openTestURL();
+
+ compareScreen("initial");
+
+ TableElement table = $(TableElement.class).first();
+ List<WebElement> rows = table.findElement(By.className("v-table-body"))
+ .findElements(By.tagName("tr"));
+
+ rows.get(0).findElements(By.className("v-button")).get(1).click();
+ rows.get(1).findElements(By.className("v-button")).get(1).click();
+
+ compareScreen("after");
+ }
+
+}