summaryrefslogtreecommitdiffstats
path: root/theme-compiler/tests
diff options
context:
space:
mode:
authorMarc Englund <marc@vaadin.com>2012-11-27 09:37:19 +0000
committerVaadin Code Review <review@vaadin.com>2012-11-27 09:37:19 +0000
commit4436e3f3a565474723f8450fdd3ab285ae12040d (patch)
tree7a892939623993ce6a438ff277bcbb56efee7acd /theme-compiler/tests
parent5df5c65fb412b9b94e2f8b8f465ec27d81ee7d8a (diff)
parent78bfb5cb1cc72164e73cf7919501fa22ba05445d (diff)
downloadvaadin-framework-4436e3f3a565474723f8450fdd3ab285ae12040d.tar.gz
vaadin-framework-4436e3f3a565474723f8450fdd3ab285ae12040d.zip
Merge "Keep block order when unnesting (#10309)"
Diffstat (limited to 'theme-compiler/tests')
-rw-r--r--theme-compiler/tests/resources/css/nesting.css8
-rw-r--r--theme-compiler/tests/resources/scss/nesting.scss12
-rw-r--r--theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Nesting.java4
3 files changed, 23 insertions, 1 deletions
diff --git a/theme-compiler/tests/resources/css/nesting.css b/theme-compiler/tests/resources/css/nesting.css
index b3861a0131..e1cdf3a579 100644
--- a/theme-compiler/tests/resources/css/nesting.css
+++ b/theme-compiler/tests/resources/css/nesting.css
@@ -44,4 +44,12 @@
.main .second.third .fourth {
color: black;
+}
+
+.root .first-block .nested {
+ order: first;
+}
+
+.root .last-block {
+ order: last;
} \ No newline at end of file
diff --git a/theme-compiler/tests/resources/scss/nesting.scss b/theme-compiler/tests/resources/scss/nesting.scss
index 0336c9e86d..1fefe0dde0 100644
--- a/theme-compiler/tests/resources/scss/nesting.scss
+++ b/theme-compiler/tests/resources/scss/nesting.scss
@@ -37,4 +37,16 @@
color: black;
}
}
+}
+
+.root {
+ .first-block {
+ .nested {
+ order: first;
+ }
+ }
+
+ .last-block {
+ order: last;
+ }
} \ No newline at end of file
diff --git a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Nesting.java b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Nesting.java
index 109182f608..bdc6e63391 100644
--- a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Nesting.java
+++ b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Nesting.java
@@ -42,7 +42,7 @@ public class Nesting extends AbstractTestBase {
parser.setDocumentHandler(handler);
parser.parseStyleSheet(getClass().getResource(scss).getPath());
ScssStylesheet root = handler.getStyleSheet();
- Assert.assertEquals(5, root.getChildren().size());
+ Assert.assertEquals(6, root.getChildren().size());
BlockNode blockNode0 = (BlockNode) root.getChildren().get(0);
Assert.assertEquals(2, blockNode0.getChildren().size());
@@ -78,6 +78,8 @@ public class Nesting extends AbstractTestBase {
BlockNode nestednestedBlockInBlock4 = (BlockNode) nestedBlockInBlock3
.getChildren().get(1);
Assert.assertEquals(1, nestednestedBlockInBlock4.getChildren().size());
+
+ // the parsing of the last block is not checked in detail
}
@Test