summaryrefslogtreecommitdiffstats
path: root/uitest/src/com
diff options
context:
space:
mode:
authorJohn Ahlroos <john@vaadin.com>2012-10-10 16:29:37 +0300
committerJohn Ahlroos <john@vaadin.com>2012-10-11 15:55:57 +0300
commitce11d139f6ef2a71c689897c922a6d9987ee4416 (patch)
tree1d281a5ff2cf1632bb2429769615b33a6c7be31f /uitest/src/com
parent0e5fe9d46fbb3c32aa2ceae22f29253c5bf45342 (diff)
downloadvaadin-framework-ce11d139f6ef2a71c689897c922a6d9987ee4416.tar.gz
vaadin-framework-ce11d139f6ef2a71c689897c922a6d9987ee4416.zip
Fixed primary stylename handling in AbsoluteLayout as well as moved layout specific functionality into the layout from the connector #9899
Change-Id: I7254371bdbda15c1e7187e0d00c910441ab3f742
Diffstat (limited to 'uitest/src/com')
-rw-r--r--uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutPrimaryStylename.html67
-rw-r--r--uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutPrimaryStylename.java45
2 files changed, 112 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutPrimaryStylename.html b/uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutPrimaryStylename.html
new file mode 100644
index 0000000000..fccbb29b8b
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutPrimaryStylename.html
@@ -0,0 +1,67 @@
+<?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.absolutelayout.AbsoluteLayoutPrimaryStylename?restartApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertNotCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentsabsolutelayoutAbsoluteLayoutPrimaryStylename::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VAbsoluteLayout[0]/</td>
+ <td>v-absolute-layout</td>
+</tr>
+<tr>
+ <td>assertCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentsabsolutelayoutAbsoluteLayoutPrimaryStylename::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VAbsoluteLayout[0]/</td>
+ <td>my-absolute-layout</td>
+</tr>
+<tr>
+ <td>assertCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentsabsolutelayoutAbsoluteLayoutPrimaryStylename::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VAbsoluteLayout[0]/domChild[0]/domChild[0]</td>
+ <td>my-absolute-layout-margin</td>
+</tr>
+<tr>
+ <td>assertCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentsabsolutelayoutAbsoluteLayoutPrimaryStylename::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VAbsoluteLayout[0]/VAbsoluteLayout$AbsoluteWrapper[0]/</td>
+ <td>my-absolute-layout-wrapper</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runcomvaadintestscomponentsabsolutelayoutAbsoluteLayoutPrimaryStylename::/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=runcomvaadintestscomponentsabsolutelayoutAbsoluteLayoutPrimaryStylename::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VAbsoluteLayout[0]/</td>
+ <td>my-absolute-layout</td>
+</tr>
+<tr>
+ <td>assertCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentsabsolutelayoutAbsoluteLayoutPrimaryStylename::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VAbsoluteLayout[0]/</td>
+ <td>my-second-absolute-layout</td>
+</tr>
+<tr>
+ <td>assertCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentsabsolutelayoutAbsoluteLayoutPrimaryStylename::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VAbsoluteLayout[0]/domChild[0]/domChild[0]</td>
+ <td>my-second-absolute-layout-margin</td>
+</tr>
+<tr>
+ <td>assertCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentsabsolutelayoutAbsoluteLayoutPrimaryStylename::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VAbsoluteLayout[0]/VAbsoluteLayout$AbsoluteWrapper[0]/</td>
+ <td>my-second-absolute-layout-wrapper</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutPrimaryStylename.java b/uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutPrimaryStylename.java
new file mode 100644
index 0000000000..b75d5931b5
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/absolutelayout/AbsoluteLayoutPrimaryStylename.java
@@ -0,0 +1,45 @@
+package com.vaadin.tests.components.absolutelayout;
+
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.AbsoluteLayout;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.Component;
+import com.vaadin.ui.NativeButton;
+
+public class AbsoluteLayoutPrimaryStylename extends TestBase {
+
+ @Override
+ protected void setup() {
+ final AbsoluteLayout layout = new AbsoluteLayout();
+ layout.setWidth("100px");
+ layout.setWidth("200px");
+ layout.setPrimaryStyleName("my-absolute-layout");
+
+ Component comp1 = new NativeButton("Child 1");
+ comp1.setWidth("100%");
+ comp1.setHeight("50px");
+ layout.addComponent(comp1);
+
+ addComponent(layout);
+
+ addComponent(new Button("Change primary stylename",
+ new Button.ClickListener() {
+ @Override
+ public void buttonClick(ClickEvent event) {
+ layout.setPrimaryStyleName("my-second-absolute-layout");
+ }
+ }));
+ }
+
+ @Override
+ protected String getDescription() {
+ return "Absolutelayout should handle setting primary stylename both initially and dynamically";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 9899;
+ }
+
+}