diff options
author | Marc Englund <marc@vaadin.com> | 2012-10-17 08:37:14 +0000 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2012-10-17 08:37:14 +0000 |
commit | 9291fede586995132bc7153d00ec756f13ddc05b (patch) | |
tree | a748b52097698a23e23a4caae4f0c6ec8d08bcad /uitest/src/com/vaadin | |
parent | ebd86a653a5d646e7d41da4ac7a42a0add1e2fcb (diff) | |
parent | 7bacf1abbd74b0b4ef47cc6033671198fd8f5e4b (diff) | |
download | vaadin-framework-9291fede586995132bc7153d00ec756f13ddc05b.tar.gz vaadin-framework-9291fede586995132bc7153d00ec756f13ddc05b.zip |
Merge "Fixed primary stylename handling for ListSelect #9907"
Diffstat (limited to 'uitest/src/com/vaadin')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/listselect/ListSelectPrimaryStylename.html | 57 | ||||
-rw-r--r-- | uitest/src/com/vaadin/tests/components/listselect/ListSelectPrimaryStylename.java | 40 |
2 files changed, 97 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/listselect/ListSelectPrimaryStylename.html b/uitest/src/com/vaadin/tests/components/listselect/ListSelectPrimaryStylename.html new file mode 100644 index 0000000000..7dbb99d0e6 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/listselect/ListSelectPrimaryStylename.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.listselect.ListSelectPrimaryStylename?restartApplication</td> + <td></td> +</tr> +<tr> + <td>assertNotCSSClass</td> + <td>vaadin=runcomvaadintestscomponentslistselectListSelectPrimaryStylename::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VListSelect[0]</td> + <td>v-select</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentslistselectListSelectPrimaryStylename::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VListSelect[0]</td> + <td>my-list</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentslistselectListSelectPrimaryStylename::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VListSelect[0]/domChild[0]</td> + <td>my-list-select</td> +</tr> +<tr> + <td>click</td> + <td>vaadin=runcomvaadintestscomponentslistselectListSelectPrimaryStylename::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VButton[0]/domChild[0]/domChild[0]</td> + <td></td> +</tr> +<tr> + <td>assertNotCSSClass</td> + <td>vaadin=runcomvaadintestscomponentslistselectListSelectPrimaryStylename::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VListSelect[0]</td> + <td>my-list</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentslistselectListSelectPrimaryStylename::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VListSelect[0]</td> + <td>my-second-list</td> +</tr> +<tr> + <td>assertCSSClass</td> + <td>vaadin=runcomvaadintestscomponentslistselectListSelectPrimaryStylename::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VListSelect[0]/domChild[0]</td> + <td>my-second-list-select</td> +</tr> + +</tbody></table> +</body> +</html> diff --git a/uitest/src/com/vaadin/tests/components/listselect/ListSelectPrimaryStylename.java b/uitest/src/com/vaadin/tests/components/listselect/ListSelectPrimaryStylename.java new file mode 100644 index 0000000000..06dec920ea --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/listselect/ListSelectPrimaryStylename.java @@ -0,0 +1,40 @@ +package com.vaadin.tests.components.listselect; + +import java.util.Arrays; + +import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.ListSelect; + +public class ListSelectPrimaryStylename extends TestBase { + + @Override + protected void setup() { + final ListSelect list = new ListSelect("Caption", Arrays.asList( + "Option 1", + "Option 2", "Option 3")); + list.setPrimaryStyleName("my-list"); + addComponent(list); + + addComponent(new Button("Change primary stylename", + new Button.ClickListener() { + @Override + public void buttonClick(ClickEvent event) { + list.setPrimaryStyleName("my-second-list"); + } + })); + + } + + @Override + protected String getDescription() { + return "List select should should support primary stylenames both initially and dynamically"; + } + + @Override + protected Integer getTicketNumber() { + return 9907; + } + +} |