diff options
author | Henri Sara <hesara@vaadin.com> | 2015-07-11 09:53:10 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-07-13 07:37:33 +0000 |
commit | 6c89525423f4d7e8e1200c4e22b82f3940e412eb (patch) | |
tree | d4736fde125a2a0ee7b56e2bed23bc8e86df897a /uitest | |
parent | 8755b91e50da26a214eaf144e230a7cb15637127 (diff) | |
download | vaadin-framework-6c89525423f4d7e8e1200c4e22b82f3940e412eb.tar.gz vaadin-framework-6c89525423f4d7e8e1200c4e22b82f3940e412eb.zip |
Convert UndefinedHeightSubWindowAndContent test to TB4
The shadow artifacts seen with TB2 seem to be a TB2
timing issue and are not reproducible manually or with TB4,
so simply checking window size.
Change-Id: Iaf2a546868c3bc7fc9942355cc99a7452039e1f4
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/window/UndefinedHeightSubWindowAndContentTest.java | 34 | ||||
-rw-r--r-- | uitest/tb2/com/vaadin/tests/components/window/UndefinedHeightSubWindowAndContent.html | 57 |
2 files changed, 34 insertions, 57 deletions
diff --git a/uitest/src/com/vaadin/tests/components/window/UndefinedHeightSubWindowAndContentTest.java b/uitest/src/com/vaadin/tests/components/window/UndefinedHeightSubWindowAndContentTest.java new file mode 100644 index 0000000000..057a43f495 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/window/UndefinedHeightSubWindowAndContentTest.java @@ -0,0 +1,34 @@ +package com.vaadin.tests.components.window; + +import org.junit.Assert; +import org.junit.Test; +import org.openqa.selenium.Keys; + +import com.vaadin.testbench.elements.TextFieldElement; +import com.vaadin.tests.tb3.MultiBrowserTest; +import com.vaadin.tests.tb3.newelements.WindowElement; + +public class UndefinedHeightSubWindowAndContentTest extends MultiBrowserTest { + + @Test + public void testUndefinedHeight() { + openTestURL(); + + TextFieldElement textField = $(TextFieldElement.class).first(); + + textField.click(); + textField.sendKeys("invalid", Keys.ENTER); + + WindowElement window = $(WindowElement.class).first(); + int height = window.getSize().getHeight(); + Assert.assertTrue("Window height with validation failure", + 161 <= height && height <= 164); + + textField.setValue("valid"); + textField.sendKeys(Keys.ENTER); + height = window.getSize().getHeight(); + Assert.assertTrue("Window height with validation success", + 136 <= height && height <= 139); + } + +} diff --git a/uitest/tb2/com/vaadin/tests/components/window/UndefinedHeightSubWindowAndContent.html b/uitest/tb2/com/vaadin/tests/components/window/UndefinedHeightSubWindowAndContent.html deleted file mode 100644 index a3b56cd12a..0000000000 --- a/uitest/tb2/com/vaadin/tests/components/window/UndefinedHeightSubWindowAndContent.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>UndefinedHeightSubWindowAndContent</title> -</head> -<body> -<table cellpadding="1" cellspacing="1" border="1"> -<thead> -<tr><td rowspan="1" colspan="3">UndefinedHeightSubWindowAndContent</td></tr> -</thead><tbody> -<tr> - <td>open</td> - <td>/run/com.vaadin.tests.components.window.UndefinedHeightSubWindowAndContent?restartApplication</td> - <td></td> -</tr> -<tr> - <td>mouseClick</td> - <td>vaadin=runcomvaadintestscomponentswindowUndefinedHeightSubWindowAndContent::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VForm[0]/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VTextField[0]</td> - <td>52,11</td> -</tr> -<tr> - <td>enterCharacter</td> - <td>vaadin=runcomvaadintestscomponentswindowUndefinedHeightSubWindowAndContent::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VForm[0]/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VTextField[0]</td> - <td>invalid</td> -</tr> -<tr> - <td>pressSpecialKey</td> - <td>vaadin=runcomvaadintestscomponentswindowUndefinedHeightSubWindowAndContent::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VForm[0]/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VTextField[0]</td> - <td>enter</td> -</tr> -<tr> - <td>screenCapture</td> - <td></td> - <td>form_full_width_1_error</td> -</tr> -<tr> - <td>enterCharacter</td> - <td>vaadin=runcomvaadintestscomponentswindowUndefinedHeightSubWindowAndContent::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VForm[0]/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VTextField[0]</td> - <td>valid</td> -</tr> -<tr> - <td>pressSpecialKey</td> - <td>vaadin=runcomvaadintestscomponentswindowUndefinedHeightSubWindowAndContent::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VForm[0]/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VTextField[0]</td> - <td>enter</td> -</tr> -<tr> - <td>screenCapture</td> - <td></td> - <td>form_full_width_2_valid</td> -</tr> - -</tbody></table> -</body> -</html> |