diff options
author | Pekka Hyvönen <pekka@vaadin.com> | 2012-11-05 14:00:21 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2012-11-05 14:32:28 +0000 |
commit | 1746dff124c644f4348ccf3ecf55d250a8869d75 (patch) | |
tree | 8b1a34d61bc3e137019fefefafe706152c63f9ef /uitest | |
parent | 282fbd32a1deb70565be0ed4718c3ee29d26651d (diff) | |
download | vaadin-framework-1746dff124c644f4348ccf3ecf55d250a8869d75.tar.gz vaadin-framework-1746dff124c644f4348ccf3ecf55d250a8869d75.zip |
10030 Button.DisableOnClick not working properly
Change-Id: I0514bc4da186360a84d9cdb48140245108847115
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/button/ButtonDisableEnableOnClick.html | 128 | ||||
-rw-r--r-- | uitest/src/com/vaadin/tests/components/button/Buttons3.java | 16 |
2 files changed, 144 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/button/ButtonDisableEnableOnClick.html b/uitest/src/com/vaadin/tests/components/button/ButtonDisableEnableOnClick.html new file mode 100644 index 0000000000..a3cdb64aec --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/button/ButtonDisableEnableOnClick.html @@ -0,0 +1,128 @@ +<?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>ButtonDisableEnableOnClick</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">ButtonDisableEnableOnClick</td></tr> +</thead><tbody> +<tr> + <td>open</td> + <td>/run/com.vaadin.tests.components.button.Buttons3?restartApplication</td> + <td></td> +</tr> +<!--setDisableOnClick(true)--> +<tr> + <td>mouseClick</td> + <td>vaadin=runcomvaadintestscomponentsbuttonButtons3::PID_Smenu#item0</td> + <td>17,12</td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runcomvaadintestscomponentsbuttonButtons3::Root/VOverlay[0]/VMenuBar[0]#item4</td> + <td>19,10</td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runcomvaadintestscomponentsbuttonButtons3::Root/VOverlay[1]/VMenuBar[0]#item0</td> + <td>24,8</td> +</tr> +<!--addClickListener where onClick() { button.setEnabled(true) }--> +<tr> + <td>mouseClick</td> + <td>vaadin=runcomvaadintestscomponentsbuttonButtons3::PID_Smenu#item0</td> + <td>38,8</td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runcomvaadintestscomponentsbuttonButtons3::Root/VOverlay[0]/VMenuBar[0]#item3</td> + <td>18,10</td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runcomvaadintestscomponentsbuttonButtons3::Root/VOverlay[1]/VMenuBar[0]#item2</td> + <td>37,11</td> +</tr> +<!--click should not disable button--> +<tr> + <td>click</td> + <td>vaadin=runcomvaadintestscomponentsbuttonButtons3::PID_StestComponent/domChild[0]/domChild[0]</td> + <td></td> +</tr> +<tr> + <td>assertText</td> + <td>id=Log_row_0</td> + <td>2. ClickEvent</td> +</tr> +<tr> + <td>assertNotCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsbuttonButtons3::PID_StestComponent</td> + <td>v-disabled</td> +</tr> +<!--another click should not disable button--> +<tr> + <td>click</td> + <td>vaadin=runcomvaadintestscomponentsbuttonButtons3::PID_StestComponent/domChild[0]/domChild[0]</td> + <td></td> +</tr> +<tr> + <td>assertText</td> + <td>id=Log_row_0</td> + <td>3. ClickEvent</td> +</tr> +<tr> + <td>assertNotCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsbuttonButtons3::PID_StestComponent</td> + <td>v-disabled</td> +</tr> +<!--another click should not disable button--> +<tr> + <td>click</td> + <td>vaadin=runcomvaadintestscomponentsbuttonButtons3::PID_StestComponent/domChild[0]/domChild[0]</td> + <td></td> +</tr> +<tr> + <td>assertText</td> + <td>id=Log_row_0</td> + <td>4. ClickEvent</td> +</tr> +<tr> + <td>assertNotCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsbuttonButtons3::PID_StestComponent</td> + <td>v-disabled</td> +</tr> +<!--remove clickListener--> +<tr> + <td>mouseClick</td> + <td>vaadin=runcomvaadintestscomponentsbuttonButtons3::PID_Smenu#item0</td> + <td>29,7</td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runcomvaadintestscomponentsbuttonButtons3::Root/VOverlay[0]/VMenuBar[0]#item3</td> + <td>20,8</td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runcomvaadintestscomponentsbuttonButtons3::Root/VOverlay[1]/VMenuBar[0]#item2</td> + <td>26,6</td> +</tr> +<!--click should now disable the button--> +<tr> + <td>click</td> + <td>vaadin=runcomvaadintestscomponentsbuttonButtons3::PID_StestComponent/domChild[0]/domChild[0]</td> + <td></td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsbuttonButtons3::PID_StestComponent</td> + <td>v-disabled</td> +</tr> +</tbody></table> +</body> +</html> diff --git a/uitest/src/com/vaadin/tests/components/button/Buttons3.java b/uitest/src/com/vaadin/tests/components/button/Buttons3.java new file mode 100644 index 0000000000..b20effad97 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/button/Buttons3.java @@ -0,0 +1,16 @@ +package com.vaadin.tests.components.button; + +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.Button.ClickListener; + +public class Buttons3<T extends Button> extends Buttons2<T> implements + ClickListener { + + @Override + public void buttonClick(ClickEvent event) { + event.getButton().setEnabled(true); + super.buttonClick(event); + } + +} |