diff options
author | Artur Signell <artur@vaadin.com> | 2013-06-13 16:10:03 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2013-06-13 16:19:08 +0000 |
commit | 59103a959544016728f2967a3ce79a06f9bff7fa (patch) | |
tree | 1b428cae4d93168816c30a2a304d9ead60dcdb9e /uitest | |
parent | a08974321a2a98a3031f3211f33e22f0b89f95a3 (diff) | |
download | vaadin-framework-59103a959544016728f2967a3ce79a06f9bff7fa.tar.gz vaadin-framework-59103a959544016728f2967a3ce79a06f9bff7fa.zip |
Always notify parent of enable state changes (#12062)
Change-Id: I30ee9a968050301d79c5073a62d85390652f76a9
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/formlayout/CaptionEnableDisable.html | 94 | ||||
-rw-r--r-- | uitest/src/com/vaadin/tests/components/formlayout/CaptionEnableDisable.java | 61 |
2 files changed, 155 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/formlayout/CaptionEnableDisable.html b/uitest/src/com/vaadin/tests/components/formlayout/CaptionEnableDisable.html new file mode 100644 index 0000000000..87bf0edb49 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/formlayout/CaptionEnableDisable.html @@ -0,0 +1,94 @@ +<?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.formlayout.CaptionEnableDisable?restartApplication</td> + <td></td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsformlayoutCaptionEnableDisable::/VFormLayout[0]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[0]</td> + <td>v-disabled</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsformlayoutCaptionEnableDisable::/VFormLayout[0]/domChild[0]/domChild[1]/domChild[1]/domChild[0]/domChild[0]</td> + <td>v-disabled</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsformlayoutCaptionEnableDisable::/VFormLayout[0]/domChild[0]/domChild[1]/domChild[2]/domChild[0]/domChild[0]</td> + <td>v-disabled</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsformlayoutCaptionEnableDisable::/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VCheckBox[0]</td> + <td>v-disabled</td> +</tr> +<!--Enable--> +<tr> + <td>click</td> + <td>vaadin=runcomvaadintestscomponentsformlayoutCaptionEnableDisable::/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VButton[0]/domChild[0]/domChild[0]</td> + <td></td> +</tr> +<tr> + <td>assertNotCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsformlayoutCaptionEnableDisable::/VFormLayout[0]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[0]</td> + <td>v-disabled</td> +</tr> +<tr> + <td>assertNotCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsformlayoutCaptionEnableDisable::/VFormLayout[0]/domChild[0]/domChild[1]/domChild[1]/domChild[0]/domChild[0]</td> + <td>v-disabled</td> +</tr> +<tr> + <td>assertNotCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsformlayoutCaptionEnableDisable::/VFormLayout[0]/domChild[0]/domChild[1]/domChild[2]/domChild[0]/domChild[0]</td> + <td>v-disabled</td> +</tr> +<tr> + <td>assertNotCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsformlayoutCaptionEnableDisable::/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VCheckBox[0]</td> + <td>v-disabled</td> +</tr> +<!--Disable--> +<tr> + <td>click</td> + <td>vaadin=runcomvaadintestscomponentsformlayoutCaptionEnableDisable::/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VButton[0]/domChild[0]/domChild[0]</td> + <td></td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsformlayoutCaptionEnableDisable::/VFormLayout[0]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[0]</td> + <td>v-disabled</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsformlayoutCaptionEnableDisable::/VFormLayout[0]/domChild[0]/domChild[1]/domChild[1]/domChild[0]/domChild[0]</td> + <td>v-disabled</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsformlayoutCaptionEnableDisable::/VFormLayout[0]/domChild[0]/domChild[1]/domChild[2]/domChild[0]/domChild[0]</td> + <td>v-disabled</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentsformlayoutCaptionEnableDisable::/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VCheckBox[0]</td> + <td>v-disabled</td> +</tr> + +</tbody></table> +</body> +</html> diff --git a/uitest/src/com/vaadin/tests/components/formlayout/CaptionEnableDisable.java b/uitest/src/com/vaadin/tests/components/formlayout/CaptionEnableDisable.java new file mode 100644 index 0000000000..ce9067df29 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/formlayout/CaptionEnableDisable.java @@ -0,0 +1,61 @@ +package com.vaadin.tests.components.formlayout; + +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.ui.Button; +import com.vaadin.ui.CheckBox; +import com.vaadin.ui.ComboBox; +import com.vaadin.ui.FormLayout; +import com.vaadin.ui.NativeSelect; +import com.vaadin.ui.TextField; + +public class CaptionEnableDisable extends AbstractTestUI { + + @Override + protected void setup(VaadinRequest request) { + setContent(createFormLayout()); + + } + + public FormLayout createFormLayout() { + FormLayout layout = new FormLayout(); + final TextField textField = new TextField("TextField"); + textField.setEnabled(false); + layout.addComponent(textField); + + final ComboBox combobox = new ComboBox("Combobox"); + combobox.setEnabled(false); + layout.addComponent(combobox); + + final NativeSelect nativeSelect = new NativeSelect("NativeSelect"); + nativeSelect.setEnabled(false); + layout.addComponent(nativeSelect); + + final CheckBox checkBox = new CheckBox("Checkbox"); + checkBox.setEnabled(false); + layout.addComponent(checkBox); + + layout.addComponent(new Button("Toggle components enabled", + new Button.ClickListener() { + @Override + public void buttonClick(Button.ClickEvent event) { + combobox.setEnabled(!combobox.isEnabled()); + textField.setEnabled(!textField.isEnabled()); + checkBox.setEnabled(!checkBox.isEnabled()); + nativeSelect.setEnabled(!nativeSelect.isEnabled()); + } + })); + return layout; + } + + @Override + protected String getTestDescription() { + return ""; + } + + @Override + protected Integer getTicketNumber() { + return 12062; + } + +}
\ No newline at end of file |