Change-Id: I2570af5f7767f8275fb2e1c19c862974bf9e2eb2tags/7.6.0.alpha3^2
new Button.ClickListener() { | new Button.ClickListener() { | ||||
@Override | @Override | ||||
public void buttonClick(ClickEvent event) { | 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()); | |||||
} | } | ||||
})); | })); | ||||
} | } |
*/ | */ | ||||
package com.vaadin.tests.components.popupview; | package com.vaadin.tests.components.popupview; | ||||
import com.vaadin.tests.tb3.MultiBrowserTest; | |||||
import org.junit.Assert; | import org.junit.Assert; | ||||
import org.junit.Test; | import org.junit.Test; | ||||
import org.openqa.selenium.By; | import org.openqa.selenium.By; | ||||
import org.openqa.selenium.Keys; | import org.openqa.selenium.Keys; | ||||
import org.openqa.selenium.WebElement; | 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. | * Check availability of shortcut action listener in the popup view. | ||||
* | * | ||||
*/ | */ | ||||
public class PopupViewShortcutActionHandlerTest extends MultiBrowserTest { | public class PopupViewShortcutActionHandlerTest extends MultiBrowserTest { | ||||
@Override | |||||
protected boolean requireWindowFocusForIE() { | |||||
if (BrowserUtil.isIE8(getDesiredCapabilities())) { | |||||
return false; | |||||
} | |||||
return true; | |||||
} | |||||
@Test | @Test | ||||
public void testShortcutHandling() { | public void testShortcutHandling() { | ||||
openTestURL(); | openTestURL(); |
public abstract class BasicPersonFormTest extends 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 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 | @Override | ||||
protected Class<?> getUIClass() { | protected Class<?> getUIClass() { | ||||
assertSelectedSex(Sex.MALE); | assertSelectedSex(Sex.MALE); | ||||
assertDeceasedValue("NAAAAAH"); | assertDeceasedValue("NAAAAAH"); | ||||
} | } | ||||
} | } |
@Override | @Override | ||||
public void setDesiredCapabilities(DesiredCapabilities desiredCapabilities) { | public void setDesiredCapabilities(DesiredCapabilities desiredCapabilities) { | ||||
super.setDesiredCapabilities(desiredCapabilities); | |||||
if (BrowserUtil.isIE(desiredCapabilities)) { | if (BrowserUtil.isIE(desiredCapabilities)) { | ||||
if (requireWindowFocusForIE()) { | if (requireWindowFocusForIE()) { | ||||
desiredCapabilities.setCapability( | desiredCapabilities.setCapability( | ||||
"name", | "name", | ||||
String.format("%s.%s", getClass().getCanonicalName(), | String.format("%s.%s", getClass().getCanonicalName(), | ||||
testName.getMethodName())); | testName.getMethodName())); | ||||
super.setDesiredCapabilities(desiredCapabilities); | |||||
} | } | ||||
@Override | @Override |