Browse Source

Stabilize TB4 tests with IE 11

Change-Id: I2570af5f7767f8275fb2e1c19c862974bf9e2eb2
tags/7.6.0.alpha3^2
Teemu Suo-Anttila 8 years ago
parent
commit
dc4946d3c6

+ 7
- 3
uitest/src/com/vaadin/tests/application/VaadinSessionAttribute.java View File

@@ -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());
}
}));
}

+ 11
- 1
uitest/src/com/vaadin/tests/components/popupview/PopupViewShortcutActionHandlerTest.java View File

@@ -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();

+ 8
- 2
uitest/src/com/vaadin/tests/fieldgroup/BasicPersonFormTest.java View File

@@ -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");
}

}

+ 2
- 2
uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java View File

@@ -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

Loading…
Cancel
Save