From 4bda2ef6a6fa84f05a032ac837f2037bd3d502bf Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Fri, 26 Oct 2012 11:32:34 +0300 Subject: Fixed problem with style names in test Change-Id: I14f602b0a90c4770ce12d5831298ee05aaf8179d --- .../components/orderedlayout/OrderedLayoutCases.java | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java b/uitest/src/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java index 9d7d88cce7..da6946f432 100644 --- a/uitest/src/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java +++ b/uitest/src/com/vaadin/tests/components/orderedlayout/OrderedLayoutCases.java @@ -28,8 +28,9 @@ public class OrderedLayoutCases extends AbstractTestUI { "800px", "100%", "50%" }; private static class SampleChild extends VerticalLayout { - public SampleChild() { - setStyleName("sampleChild"); + public SampleChild(int i) { + addStyleName("sampleChild"); + addStyleName("sampleChild" + i); addComponent(createSimpleSelector("Child width", new ValueChangeListener() { @Override @@ -118,17 +119,15 @@ public class OrderedLayoutCases extends AbstractTestUI { @Override protected void setup(VaadinRequest request) { - TestUtils - .injectCSS( - getUI(), - ".sampleChild, .theLayout {border: 1px solid black;}" - + ".theLayout > div:first-child {background: aqua;}" - + ".theLayout > div:first-child + div {background: yellow;}" - + ".theLayout > div:first-child + div + div {background: lightgrey;}"); + TestUtils.injectCSS(getUI(), + ".sampleChild, .theLayout {border: 1px solid black;}" + + ".sampleChild1 {background: aqua;}" + + ".sampleChild2 {background: yellow;}" + + ".sampleChild3 {background: lightgrey;}"); currentLayout = new HorizontalLayout(); for (int i = 0; i < 3; i++) { - currentLayout.addComponent(new SampleChild()); + currentLayout.addComponent(new SampleChild(i + 1)); } sizeBar = new HorizontalLayout(); -- cgit v1.2.3