From 6c89525423f4d7e8e1200c4e22b82f3940e412eb Mon Sep 17 00:00:00 2001 From: Henri Sara Date: Sat, 11 Jul 2015 09:53:10 +0300 Subject: 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 --- .../UndefinedHeightSubWindowAndContentTest.java | 34 +++++++++++++ .../window/UndefinedHeightSubWindowAndContent.html | 57 ---------------------- 2 files changed, 34 insertions(+), 57 deletions(-) create mode 100644 uitest/src/com/vaadin/tests/components/window/UndefinedHeightSubWindowAndContentTest.java delete mode 100644 uitest/tb2/com/vaadin/tests/components/window/UndefinedHeightSubWindowAndContent.html (limited to 'uitest') 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 @@ - - - - - - -UndefinedHeightSubWindowAndContent - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
UndefinedHeightSubWindowAndContent
open/run/com.vaadin.tests.components.window.UndefinedHeightSubWindowAndContent?restartApplication
mouseClickvaadin=runcomvaadintestscomponentswindowUndefinedHeightSubWindowAndContent::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VForm[0]/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VTextField[0]52,11
enterCharactervaadin=runcomvaadintestscomponentswindowUndefinedHeightSubWindowAndContent::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VForm[0]/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VTextField[0]invalid
pressSpecialKeyvaadin=runcomvaadintestscomponentswindowUndefinedHeightSubWindowAndContent::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VForm[0]/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VTextField[0]enter
screenCaptureform_full_width_1_error
enterCharactervaadin=runcomvaadintestscomponentswindowUndefinedHeightSubWindowAndContent::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VForm[0]/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VTextField[0]valid
pressSpecialKeyvaadin=runcomvaadintestscomponentswindowUndefinedHeightSubWindowAndContent::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VForm[0]/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VTextField[0]enter
screenCaptureform_full_width_2_valid
- - -- cgit v1.2.3