diff options
author | Artur Signell <artur@vaadin.com> | 2013-03-06 14:55:15 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2013-03-12 12:16:33 +0000 |
commit | 36a201f22f66989bf7a78ce8afce1ee64aaa0a22 (patch) | |
tree | 2e0957f0d65734e5bfe2e9242a196b387a44d21c /uitest | |
parent | 6922bc5b49c5551b289a5025ccd5901e2ac3aafc (diff) | |
download | vaadin-framework-36a201f22f66989bf7a78ce8afce1ee64aaa0a22.tar.gz vaadin-framework-36a201f22f66989bf7a78ce8afce1ee64aaa0a22.zip |
Fixed focus and tab index handling for UI (#11129)
Change-Id: I80377792ade11946337e2900a7ea84209ae1d060
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/ui/UITabIndex.html | 57 | ||||
-rw-r--r-- | uitest/src/com/vaadin/tests/components/ui/UITabIndex.java | 51 |
2 files changed, 108 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/ui/UITabIndex.html b/uitest/src/com/vaadin/tests/components/ui/UITabIndex.html new file mode 100644 index 0000000000..fa083f1489 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/ui/UITabIndex.html @@ -0,0 +1,57 @@ +<?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="http://localhost:8888/" /> +<title>New Test</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">New Test</td></tr> +</thead><tbody> +<tr> + <td>open</td> + <td>/run/com.vaadin.tests.components.ui.UITabIndex?restartApplication</td> + <td></td> +</tr> +<tr> + <td>assertAttribute</td> + <td>vaadin=runcomvaadintestscomponentsuiUITabIndex::@tabIndex</td> + <td>1</td> +</tr> +<tr> + <td>click</td> + <td>vaadin=runcomvaadintestscomponentsuiUITabIndex::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VButton[0]/domChild[0]/domChild[0]</td> + <td></td> +</tr> +<tr> + <td>assertAttribute</td> + <td>vaadin=runcomvaadintestscomponentsuiUITabIndex::@tabIndex</td> + <td>-1</td> +</tr> +<tr> + <td>click</td> + <td>vaadin=runcomvaadintestscomponentsuiUITabIndex::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[1]/VButton[0]/domChild[0]/domChild[0]</td> + <td></td> +</tr> +<tr> + <td>assertAttribute</td> + <td>vaadin=runcomvaadintestscomponentsuiUITabIndex::@tabIndex</td> + <td>0</td> +</tr> +<tr> + <td>click</td> + <td>vaadin=runcomvaadintestscomponentsuiUITabIndex::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[2]/VButton[0]/domChild[0]/domChild[0]</td> + <td></td> +</tr> +<tr> + <td>assertAttribute</td> + <td>vaadin=runcomvaadintestscomponentsuiUITabIndex::@tabIndex</td> + <td>1</td> +</tr> + +</tbody></table> +</body> +</html> diff --git a/uitest/src/com/vaadin/tests/components/ui/UITabIndex.java b/uitest/src/com/vaadin/tests/components/ui/UITabIndex.java new file mode 100644 index 0000000000..083eaf3f7d --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/ui/UITabIndex.java @@ -0,0 +1,51 @@ +package com.vaadin.tests.components.ui; + +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.Button.ClickListener; + +public class UITabIndex extends AbstractTestUI { + + @Override + protected void setup(VaadinRequest request) { + Button b; + + b = new Button("Set tabIndex to -1"); + b.addClickListener(new ClickListener() { + @Override + public void buttonClick(ClickEvent event) { + setTabIndex(-1); + } + }); + addComponent(b); + b = new Button("Set tabIndex to 0"); + b.addClickListener(new ClickListener() { + @Override + public void buttonClick(ClickEvent event) { + setTabIndex(0); + } + }); + addComponent(b); + b = new Button("Set tabIndex to 1"); + b.addClickListener(new ClickListener() { + @Override + public void buttonClick(ClickEvent event) { + setTabIndex(1); + } + }); + addComponent(b); + } + + @Override + protected String getTestDescription() { + return "Tests tab index handling for UI"; + } + + @Override + protected Integer getTicketNumber() { + return 11129; + } + +} |