summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests
diff options
context:
space:
mode:
authorJohn Ahlroos <john@vaadin.com>2012-10-10 11:01:12 +0300
committerJohn Ahlroos <john@vaadin.com>2012-10-12 09:47:45 +0300
commit78c0a1bb3e77c8e9f86fc403a6568900d4ea06a5 (patch)
tree2768af9cffa95324cf9c15f413396424a84b5652 /uitest/src/com/vaadin/tests
parent282df27379d251aea4c9ec5e15e179070a8e7633 (diff)
downloadvaadin-framework-78c0a1bb3e77c8e9f86fc403a6568900d4ea06a5.tar.gz
vaadin-framework-78c0a1bb3e77c8e9f86fc403a6568900d4ea06a5.zip
Fixed primary stylenames with Slider #9898
Change-Id: Id49802efac15d9472383b13d9611fed08d6776fe
Diffstat (limited to 'uitest/src/com/vaadin/tests')
-rw-r--r--uitest/src/com/vaadin/tests/components/slider/SliderPrimaryStyleName.html87
-rw-r--r--uitest/src/com/vaadin/tests/components/slider/SliderPrimaryStyleName.java36
2 files changed, 123 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/slider/SliderPrimaryStyleName.html b/uitest/src/com/vaadin/tests/components/slider/SliderPrimaryStyleName.html
new file mode 100644
index 0000000000..b61ec80920
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/slider/SliderPrimaryStyleName.html
@@ -0,0 +1,87 @@
+<?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.slider.SliderPrimaryStyleName?restartApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertNotCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentssliderSliderPrimaryStyleName::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/domChild[0]/domChild[0]</td>
+ <td>v-slider</td>
+</tr>
+<tr>
+ <td>assertCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentssliderSliderPrimaryStyleName::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/domChild[0]/domChild[0]</td>
+ <td>my-slider</td>
+</tr>
+<tr>
+ <td>assertCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentssliderSliderPrimaryStyleName::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/domChild[0]/domChild[0]/domChild[0]</td>
+ <td>my-slider-bigger</td>
+</tr>
+<tr>
+ <td>assertCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentssliderSliderPrimaryStyleName::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/domChild[0]/domChild[0]/domChild[1]</td>
+ <td>my-slider-smaller</td>
+</tr>
+<tr>
+ <td>assertCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentssliderSliderPrimaryStyleName::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/domChild[0]/domChild[0]/domChild[2]</td>
+ <td>my-slider-base</td>
+</tr>
+<tr>
+ <td>assertCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentssliderSliderPrimaryStyleName::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/domChild[0]/domChild[0]/domChild[2]/domChild[0]</td>
+ <td>my-slider-handle</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runcomvaadintestscomponentssliderSliderPrimaryStyleName::/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=runcomvaadintestscomponentssliderSliderPrimaryStyleName::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/domChild[0]/domChild[0]</td>
+ <td>my-slider</td>
+</tr>
+<tr>
+ <td>assertCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentssliderSliderPrimaryStyleName::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/domChild[0]/domChild[0]</td>
+ <td>my-second-slider</td>
+</tr>
+<tr>
+ <td>assertCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentssliderSliderPrimaryStyleName::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/domChild[0]/domChild[0]/domChild[0]</td>
+ <td>my-second-slider-bigger</td>
+</tr>
+<tr>
+ <td>assertCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentssliderSliderPrimaryStyleName::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/domChild[0]/domChild[0]/domChild[1]</td>
+ <td>my-second-slider-smaller</td>
+</tr>
+<tr>
+ <td>assertCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentssliderSliderPrimaryStyleName::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/domChild[0]/domChild[0]/domChild[2]</td>
+ <td>my-second-slider-base</td>
+</tr>
+<tr>
+ <td>assertCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentssliderSliderPrimaryStyleName::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/domChild[0]/domChild[0]/domChild[2]/domChild[0]</td>
+ <td>my-second-slider-handle</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/uitest/src/com/vaadin/tests/components/slider/SliderPrimaryStyleName.java b/uitest/src/com/vaadin/tests/components/slider/SliderPrimaryStyleName.java
new file mode 100644
index 0000000000..00e1713222
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/slider/SliderPrimaryStyleName.java
@@ -0,0 +1,36 @@
+package com.vaadin.tests.components.slider;
+
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.Slider;
+
+public class SliderPrimaryStyleName extends TestBase {
+
+ @Override
+ protected void setup() {
+ final Slider slider = new Slider(0, 100);
+ slider.setWidth("100px");
+ slider.setPrimaryStyleName("my-slider");
+ addComponent(slider);
+
+ addComponent(new Button("Change primary style",
+ new Button.ClickListener() {
+ @Override
+ public void buttonClick(ClickEvent event) {
+ slider.setPrimaryStyleName("my-second-slider");
+ }
+ }));
+ }
+
+ @Override
+ protected String getDescription() {
+ return "Setting the primary stylename should work both initially and dynamically";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 9898;
+ }
+
+}