summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorJohn Ahlroos <john@vaadin.com>2012-10-10 17:46:57 +0300
committerJohn Ahlroos <john@vaadin.com>2012-10-10 17:46:57 +0300
commitf5043ac109b73c1a01e1caa8dc7906d864ad8833 (patch)
tree951ef281bb76d4e1e71e8b1105279aeb28f67a21 /uitest
parent282df27379d251aea4c9ec5e15e179070a8e7633 (diff)
downloadvaadin-framework-f5043ac109b73c1a01e1caa8dc7906d864ad8833.tar.gz
vaadin-framework-f5043ac109b73c1a01e1caa8dc7906d864ad8833.zip
Fixed primary stylename handling in Accordion #9900
Change-Id: Iab4e8c8d0a0c98b770b7970fd1c099698e6a6531
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/tests/components/accordion/AccordionPrimaryStylenames.html107
-rw-r--r--uitest/src/com/vaadin/tests/components/accordion/AccordionPrimaryStylenames.java38
2 files changed, 145 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/accordion/AccordionPrimaryStylenames.html b/uitest/src/com/vaadin/tests/components/accordion/AccordionPrimaryStylenames.html
new file mode 100644
index 0000000000..6f888f7467
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/accordion/AccordionPrimaryStylenames.html
@@ -0,0 +1,107 @@
+<?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.accordion.AccordionPrimaryStylenames?restartApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertNotCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentsaccordionAccordionPrimaryStylenames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VAccordion[0]</td>
+ <td>v-accordion</td>
+</tr>
+<tr>
+ <td>assertCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentsaccordionAccordionPrimaryStylenames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VAccordion[0]</td>
+ <td>my-accordion</td>
+</tr>
+<tr>
+ <td>assertCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentsaccordionAccordionPrimaryStylenames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VAccordion[0]/domChild[0]</td>
+ <td>my-accordion-item</td>
+</tr>
+<tr>
+ <td>assertCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentsaccordionAccordionPrimaryStylenames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VAccordion[0]/domChild[0]</td>
+ <td>my-accordion-item-first</td>
+</tr>
+<tr>
+ <td>assertCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentsaccordionAccordionPrimaryStylenames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VAccordion[0]/domChild[0]</td>
+ <td>my-accordion-item-open</td>
+</tr>
+<tr>
+ <td>assertCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentsaccordionAccordionPrimaryStylenames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VAccordion[0]/domChild[0]/domChild[0]</td>
+ <td>my-accordion-item-caption</td>
+</tr>
+<tr>
+ <td>assertCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentsaccordionAccordionPrimaryStylenames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VAccordion[0]/domChild[0]/domChild[1]</td>
+ <td>my-accordion-item-content</td>
+</tr>
+<tr>
+ <td>assertCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentsaccordionAccordionPrimaryStylenames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VAccordion[0]/domChild[1]</td>
+ <td>my-accordion-item</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runcomvaadintestscomponentsaccordionAccordionPrimaryStylenames::/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=runcomvaadintestscomponentsaccordionAccordionPrimaryStylenames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VAccordion[0]</td>
+ <td>my-accordion</td>
+</tr>
+<tr>
+ <td>assertCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentsaccordionAccordionPrimaryStylenames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VAccordion[0]</td>
+ <td>my-second-accordion</td>
+</tr>
+<tr>
+ <td>assertCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentsaccordionAccordionPrimaryStylenames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VAccordion[0]/domChild[0]</td>
+ <td>my-second-accordion-item</td>
+</tr>
+<tr>
+ <td>assertCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentsaccordionAccordionPrimaryStylenames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VAccordion[0]/domChild[0]</td>
+ <td>my-second-accordion-item-first</td>
+</tr>
+<tr>
+ <td>assertCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentsaccordionAccordionPrimaryStylenames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VAccordion[0]/domChild[0]</td>
+ <td>my-second-accordion-item-open</td>
+</tr>
+<tr>
+ <td>assertCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentsaccordionAccordionPrimaryStylenames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VAccordion[0]/domChild[0]/domChild[0]</td>
+ <td>my-second-accordion-item-caption</td>
+</tr>
+<tr>
+ <td>assertCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentsaccordionAccordionPrimaryStylenames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VAccordion[0]/domChild[0]/domChild[1]</td>
+ <td>my-second-accordion-item-content</td>
+</tr>
+<tr>
+ <td>assertCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentsaccordionAccordionPrimaryStylenames::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VAccordion[0]/domChild[1]</td>
+ <td>my-second-accordion-item</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/uitest/src/com/vaadin/tests/components/accordion/AccordionPrimaryStylenames.java b/uitest/src/com/vaadin/tests/components/accordion/AccordionPrimaryStylenames.java
new file mode 100644
index 0000000000..bd7f047fc7
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/accordion/AccordionPrimaryStylenames.java
@@ -0,0 +1,38 @@
+package com.vaadin.tests.components.accordion;
+
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.Accordion;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.NativeButton;
+
+public class AccordionPrimaryStylenames extends TestBase {
+
+ @Override
+ protected void setup() {
+ final Accordion acc = new Accordion();
+ acc.addComponent(new NativeButton("First tab"));
+ acc.addComponent(new NativeButton("Second tab"));
+ acc.setPrimaryStyleName("my-accordion");
+ addComponent(acc);
+
+ addComponent(new Button("Set primary stylename",
+ new Button.ClickListener() {
+ @Override
+ public void buttonClick(ClickEvent event) {
+ acc.setPrimaryStyleName("my-second-accordion");
+ }
+ }));
+ }
+
+ @Override
+ protected String getDescription() {
+ return "Accordion should work with primary stylenames both initially and dynamically";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 9900;
+ }
+
+}