summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2015-07-14 13:33:38 +0300
committerTeemu Suo-Anttila <teemusa@vaadin.com>2015-07-14 14:02:22 +0300
commitdc4946d3c65ff37926b12ed3cd2fe370b99aa445 (patch)
treef5c165fc19f8d2233557f95c56435e19a4b70851 /uitest/src/com/vaadin
parent3ddace2ca21d5e495a6fcab9b361baf772212801 (diff)
downloadvaadin-framework-dc4946d3c65ff37926b12ed3cd2fe370b99aa445.tar.gz
vaadin-framework-dc4946d3c65ff37926b12ed3cd2fe370b99aa445.zip
Stabilize TB4 tests with IE 11
Change-Id: I2570af5f7767f8275fb2e1c19c862974bf9e2eb2
Diffstat (limited to 'uitest/src/com/vaadin')
-rw-r--r--uitest/src/com/vaadin/tests/application/VaadinSessionAttribute.java10
-rw-r--r--uitest/src/com/vaadin/tests/components/popupview/PopupViewShortcutActionHandlerTest.java12
-rw-r--r--uitest/src/com/vaadin/tests/fieldgroup/BasicPersonFormTest.java10
-rw-r--r--uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java4
4 files changed, 28 insertions, 8 deletions
diff --git a/uitest/src/com/vaadin/tests/application/VaadinSessionAttribute.java b/uitest/src/com/vaadin/tests/application/VaadinSessionAttribute.java
index ddef40b2d0..c8fc96f596 100644
--- a/uitest/src/com/vaadin/tests/application/VaadinSessionAttribute.java
+++ b/uitest/src/com/vaadin/tests/application/VaadinSessionAttribute.java
@@ -35,9 +35,13 @@ public class VaadinSessionAttribute extends AbstractTestUI {
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
- Notification.show(getSession().getAttribute(ATTR_NAME)
- + " & "
- + getSession().getAttribute(Integer.class));
+ Notification notification = new Notification(
+ getSession().getAttribute(ATTR_NAME)
+ + " & "
+ + getSession().getAttribute(
+ Integer.class));
+ notification.setDelayMsec(Notification.DELAY_FOREVER);
+ notification.show(getPage());
}
}));
}
diff --git a/uitest/src/com/vaadin/tests/components/popupview/PopupViewShortcutActionHandlerTest.java b/uitest/src/com/vaadin/tests/components/popupview/PopupViewShortcutActionHandlerTest.java
index 3005365c47..6155820990 100644
--- a/uitest/src/com/vaadin/tests/components/popupview/PopupViewShortcutActionHandlerTest.java
+++ b/uitest/src/com/vaadin/tests/components/popupview/PopupViewShortcutActionHandlerTest.java
@@ -15,13 +15,15 @@
*/
package com.vaadin.tests.components.popupview;
-import com.vaadin.tests.tb3.MultiBrowserTest;
import org.junit.Assert;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebElement;
+import com.vaadin.testbench.parallel.BrowserUtil;
+import com.vaadin.tests.tb3.MultiBrowserTest;
+
/**
* Check availability of shortcut action listener in the popup view.
*
@@ -29,6 +31,14 @@ import org.openqa.selenium.WebElement;
*/
public class PopupViewShortcutActionHandlerTest extends MultiBrowserTest {
+ @Override
+ protected boolean requireWindowFocusForIE() {
+ if (BrowserUtil.isIE8(getDesiredCapabilities())) {
+ return false;
+ }
+ return true;
+ }
+
@Test
public void testShortcutHandling() {
openTestURL();
diff --git a/uitest/src/com/vaadin/tests/fieldgroup/BasicPersonFormTest.java b/uitest/src/com/vaadin/tests/fieldgroup/BasicPersonFormTest.java
index f611325719..f5d78029c9 100644
--- a/uitest/src/com/vaadin/tests/fieldgroup/BasicPersonFormTest.java
+++ b/uitest/src/com/vaadin/tests/fieldgroup/BasicPersonFormTest.java
@@ -31,7 +31,14 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
public abstract class BasicPersonFormTest extends MultiBrowserTest {
private static final String BEAN_VALUES = "Person [firstName=John, lastName=Doe, email=john@doe.com, age=64, sex=Male, address=Address [streetAddress=John street, postalCode=11223, city=John's town, country=USA], deceased=false, salary=null, salaryDouble=null, rent=null]";
- private int logCounter = 0;
+ private int logCounter;
+
+ @Override
+ public void setup() throws Exception {
+ super.setup();
+
+ logCounter = 0;
+ }
@Override
protected Class<?> getUIClass() {
@@ -169,5 +176,4 @@ public abstract class BasicPersonFormTest extends MultiBrowserTest {
assertSelectedSex(Sex.MALE);
assertDeceasedValue("NAAAAAH");
}
-
}
diff --git a/uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java b/uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java
index a678009d85..c53209d1dc 100644
--- a/uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java
+++ b/uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java
@@ -89,6 +89,8 @@ public abstract class MultiBrowserTest extends PrivateTB3Configuration {
@Override
public void setDesiredCapabilities(DesiredCapabilities desiredCapabilities) {
+ super.setDesiredCapabilities(desiredCapabilities);
+
if (BrowserUtil.isIE(desiredCapabilities)) {
if (requireWindowFocusForIE()) {
desiredCapabilities.setCapability(
@@ -108,8 +110,6 @@ public abstract class MultiBrowserTest extends PrivateTB3Configuration {
"name",
String.format("%s.%s", getClass().getCanonicalName(),
testName.getMethodName()));
-
- super.setDesiredCapabilities(desiredCapabilities);
}
@Override