summaryrefslogtreecommitdiffstats
path: root/tests/testbench/com
diff options
context:
space:
mode:
authorJohannes Dahlström <johannes.dahlstrom@vaadin.com>2012-07-26 09:57:12 +0000
committerJohannes Dahlström <johannes.dahlstrom@vaadin.com>2012-07-26 09:57:12 +0000
commitca9fab0922d9db510c51f2d363b46577f7f6c0c4 (patch)
treee170796830327b56bc236076211b99c820c626a5 /tests/testbench/com
parent07ec6a6db41fb5059b1c2ad556de8b7b59f08b10 (diff)
downloadvaadin-framework-ca9fab0922d9db510c51f2d363b46577f7f6c0c4.tar.gz
vaadin-framework-ca9fab0922d9db510c51f2d363b46577f7f6c0c4.zip
A better patch and test for #7036
svn changeset:24027/svn branch:6.8
Diffstat (limited to 'tests/testbench/com')
-rw-r--r--tests/testbench/com/vaadin/tests/components/richtextarea/RichTextAreaScrolling.html27
-rw-r--r--tests/testbench/com/vaadin/tests/components/richtextarea/RichTextAreaScrolling.java57
2 files changed, 84 insertions, 0 deletions
diff --git a/tests/testbench/com/vaadin/tests/components/richtextarea/RichTextAreaScrolling.html b/tests/testbench/com/vaadin/tests/components/richtextarea/RichTextAreaScrolling.html
new file mode 100644
index 0000000000..be1c5a2cde
--- /dev/null
+++ b/tests/testbench/com/vaadin/tests/components/richtextarea/RichTextAreaScrolling.html
@@ -0,0 +1,27 @@
+<?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>RichTextAreaScrolling</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">RichTextAreaScrolling</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/run/com.vaadin.tests.components.richtextarea.RichTextAreaScrolling?restartApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/tests/testbench/com/vaadin/tests/components/richtextarea/RichTextAreaScrolling.java b/tests/testbench/com/vaadin/tests/components/richtextarea/RichTextAreaScrolling.java
new file mode 100644
index 0000000000..f88ed0c67c
--- /dev/null
+++ b/tests/testbench/com/vaadin/tests/components/richtextarea/RichTextAreaScrolling.java
@@ -0,0 +1,57 @@
+package com.vaadin.tests.components.richtextarea;
+
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.HorizontalLayout;
+import com.vaadin.ui.RichTextArea;
+import com.vaadin.ui.VerticalLayout;
+
+public class RichTextAreaScrolling extends TestBase {
+
+ @Override
+ protected String getDescription() {
+ return "A read-only RichTextArea should be (touch) scrollable";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 7036;
+ }
+
+ @Override
+ protected void setup() {
+ StringBuilder sb = new StringBuilder();
+ for (int i = 0; i < 50; ++i) {
+ sb.append("A long string with several lines<br/>");
+ }
+
+ HorizontalLayout main = new HorizontalLayout();
+ main.setSpacing(true);
+ addComponent(main);
+
+ RichTextArea first = new RichTextArea("Defined height");
+ RichTextArea second = new RichTextArea("Full height");
+ RichTextArea third = new RichTextArea("Undefined height");
+
+ first.setValue(sb);
+ second.setValue(sb);
+ third.setValue(sb);
+
+ first.setReadOnly(true);
+ second.setReadOnly(true);
+ third.setReadOnly(true);
+
+ first.setWidth("200px");
+ first.setHeight("400px");
+ second.setSizeFull();
+ third.setSizeUndefined();
+
+ VerticalLayout secondLayout = new VerticalLayout();
+ secondLayout.setWidth("200px");
+ secondLayout.setHeight("200px");
+ secondLayout.addComponent(second);
+
+ main.addComponent(first);
+ main.addComponent(secondLayout);
+ main.addComponent(third);
+ }
+}