summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Paul <henrik@vaadin.com>2014-12-05 12:55:40 +0200
committerVaadin Code Review <review@vaadin.com>2014-12-08 09:27:34 +0000
commit9f24790d3607510b30abba08a3b29f8144332ac5 (patch)
tree8167eff1bd8dae4d487e147f8ffdb5333be51b58
parent167a9bcc33d5c36e148dae04d63f37ca7f01f34b (diff)
downloadvaadin-framework-9f24790d3607510b30abba08a3b29f8144332ac5.tar.gz
vaadin-framework-9f24790d3607510b30abba08a3b29f8144332ac5.zip
Fixes some errors in Runo/Reindeer (#13334)
Change-Id: I5f19b8b03362035b4217dcda626d368559fc424d
-rw-r--r--WebContent/VAADIN/themes/reindeer/grid/grid.scss2
-rw-r--r--WebContent/VAADIN/themes/reindeer/grid/img/asc-light.pngbin0 -> 228 bytes
-rw-r--r--WebContent/VAADIN/themes/reindeer/grid/img/desc-light.pngbin0 -> 231 bytes
-rw-r--r--WebContent/VAADIN/themes/reindeer/grid/img/header-bg-light.pngbin0 -> 208 bytes
-rw-r--r--WebContent/VAADIN/themes/reindeer/reindeer.scss2
-rw-r--r--WebContent/VAADIN/themes/runo/grid/grid.scss2
-rw-r--r--WebContent/VAADIN/themes/runo/grid/img/header-bg.pngbin0 -> 236 bytes
-rw-r--r--WebContent/VAADIN/themes/runo/grid/img/resizer-bg.pngbin0 -> 141 bytes
-rw-r--r--WebContent/VAADIN/themes/runo/grid/img/sort-asc.pngbin0 -> 281 bytes
-rw-r--r--WebContent/VAADIN/themes/runo/grid/img/sort-desc.pngbin0 -> 303 bytes
-rw-r--r--WebContent/VAADIN/themes/runo/runo.scss2
-rw-r--r--WebContent/VAADIN/themes/valo/components/_grid.scss16
-rw-r--r--uitest/src/com/vaadin/tests/components/grid/GridColspansTest.java40
-rw-r--r--uitest/src/com/vaadin/tests/components/grid/GridGeneratedPropertiesTest.java2
-rw-r--r--uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridStructureTest.java10
15 files changed, 40 insertions, 36 deletions
diff --git a/WebContent/VAADIN/themes/reindeer/grid/grid.scss b/WebContent/VAADIN/themes/reindeer/grid/grid.scss
index 976693fba7..1fa0a743a6 100644
--- a/WebContent/VAADIN/themes/reindeer/grid/grid.scss
+++ b/WebContent/VAADIN/themes/reindeer/grid/grid.scss
@@ -51,7 +51,7 @@
.#{$primary-stylename}-body {
// Rows
- .#{$primary-stylename}-row:nth-child(odd) .#{$primary-stylename}-cell {
+ .#{$primary-stylename}-row-stripe > .#{$primary-stylename}-cell {
background-color: #eff0f1;
}
diff --git a/WebContent/VAADIN/themes/reindeer/grid/img/asc-light.png b/WebContent/VAADIN/themes/reindeer/grid/img/asc-light.png
new file mode 100644
index 0000000000..44ed76001a
--- /dev/null
+++ b/WebContent/VAADIN/themes/reindeer/grid/img/asc-light.png
Binary files differ
diff --git a/WebContent/VAADIN/themes/reindeer/grid/img/desc-light.png b/WebContent/VAADIN/themes/reindeer/grid/img/desc-light.png
new file mode 100644
index 0000000000..84d15a0628
--- /dev/null
+++ b/WebContent/VAADIN/themes/reindeer/grid/img/desc-light.png
Binary files differ
diff --git a/WebContent/VAADIN/themes/reindeer/grid/img/header-bg-light.png b/WebContent/VAADIN/themes/reindeer/grid/img/header-bg-light.png
new file mode 100644
index 0000000000..0b913e2ef1
--- /dev/null
+++ b/WebContent/VAADIN/themes/reindeer/grid/img/header-bg-light.png
Binary files differ
diff --git a/WebContent/VAADIN/themes/reindeer/reindeer.scss b/WebContent/VAADIN/themes/reindeer/reindeer.scss
index 485839ecc7..b49e58c323 100644
--- a/WebContent/VAADIN/themes/reindeer/reindeer.scss
+++ b/WebContent/VAADIN/themes/reindeer/reindeer.scss
@@ -12,6 +12,7 @@
@import "datefield/datefield.scss";
@import "inlinedatefield/inlinedatefield.scss";
@import "formlayout/formlayout.scss";
+@import "grid/grid.scss";
@import "label/label.scss";
@import "layouts/layouts.scss";
@import "link/link.scss";
@@ -49,6 +50,7 @@ $line-height: normal;
@include reindeer-datefield;
@include reindeer-inlinedatefield;
@include reindeer-formlayout;
+ @include reindeer-grid;
@include reindeer-label;
@include reindeer-layouts;
@include reindeer-link;
diff --git a/WebContent/VAADIN/themes/runo/grid/grid.scss b/WebContent/VAADIN/themes/runo/grid/grid.scss
index 65d16849a8..c5b3602943 100644
--- a/WebContent/VAADIN/themes/runo/grid/grid.scss
+++ b/WebContent/VAADIN/themes/runo/grid/grid.scss
@@ -76,7 +76,7 @@
// Grid body
.#{$primary-stylename}-body {
- .#{$primary-stylename}-row:nth-child(odd) .#{$primary-stylename}-cell {
+ .#{$primary-stylename}-row-stripe(odd) > .#{$primary-stylename}-cell {
background-color: #f6f7f7;
}
diff --git a/WebContent/VAADIN/themes/runo/grid/img/header-bg.png b/WebContent/VAADIN/themes/runo/grid/img/header-bg.png
new file mode 100644
index 0000000000..275fbc4382
--- /dev/null
+++ b/WebContent/VAADIN/themes/runo/grid/img/header-bg.png
Binary files differ
diff --git a/WebContent/VAADIN/themes/runo/grid/img/resizer-bg.png b/WebContent/VAADIN/themes/runo/grid/img/resizer-bg.png
new file mode 100644
index 0000000000..d9089775cb
--- /dev/null
+++ b/WebContent/VAADIN/themes/runo/grid/img/resizer-bg.png
Binary files differ
diff --git a/WebContent/VAADIN/themes/runo/grid/img/sort-asc.png b/WebContent/VAADIN/themes/runo/grid/img/sort-asc.png
new file mode 100644
index 0000000000..44e17d5446
--- /dev/null
+++ b/WebContent/VAADIN/themes/runo/grid/img/sort-asc.png
Binary files differ
diff --git a/WebContent/VAADIN/themes/runo/grid/img/sort-desc.png b/WebContent/VAADIN/themes/runo/grid/img/sort-desc.png
new file mode 100644
index 0000000000..35fd0595f8
--- /dev/null
+++ b/WebContent/VAADIN/themes/runo/grid/img/sort-desc.png
Binary files differ
diff --git a/WebContent/VAADIN/themes/runo/runo.scss b/WebContent/VAADIN/themes/runo/runo.scss
index 33ad35a8af..2294d0329b 100644
--- a/WebContent/VAADIN/themes/runo/runo.scss
+++ b/WebContent/VAADIN/themes/runo/runo.scss
@@ -9,6 +9,7 @@
@import "datefield/datefield.scss";
@import "inlinedatefield/inlinedatefield.scss";
@import "formlayout/formlayout.scss";
+@import "grid/grid.scss";
@import "gridlayout/gridlayout.scss";
@import "label/label.scss";
@import "link/link.scss";
@@ -50,6 +51,7 @@ $line-height: 18px;
@include runo-datefield;
@include runo-inline-datefield;
@include runo-formlayout;
+ @include runo-grid;
@include runo-gridlayout;
@include runo-label;
@include runo-link;
diff --git a/WebContent/VAADIN/themes/valo/components/_grid.scss b/WebContent/VAADIN/themes/valo/components/_grid.scss
index 6a17393809..ee973921b9 100644
--- a/WebContent/VAADIN/themes/valo/components/_grid.scss
+++ b/WebContent/VAADIN/themes/valo/components/_grid.scss
@@ -56,15 +56,13 @@ $grid-cell-padding-vertical: round(($v-table-row-height - $v-font-size)/2);
.#{$primary-stylename}-body {
// Rows
- .#{$primary-stylename}-row {
- &:nth-child(odd) td {
- $bg-lightness: if(color-luminance($grid-background-color) < 10, 4%, -4%);
- background-color: scale-color($grid-background-color, $lightness: $bg-lightness);
- }
-
- &:nth-child(even) td {
- background-color: $grid-background-color;
- }
+ .#{$primary-stylename}-row > td {
+ background-color: $grid-background-color;
+ }
+
+ .#{$primary-stylename}-row-stripe > td {
+ $bg-lightness: if(color-luminance($grid-background-color) < 10, 4%, -4%);
+ background-color: scale-color($grid-background-color, $lightness: $bg-lightness);
}
// Cells
diff --git a/uitest/src/com/vaadin/tests/components/grid/GridColspansTest.java b/uitest/src/com/vaadin/tests/components/grid/GridColspansTest.java
index 3030592492..8372656ceb 100644
--- a/uitest/src/com/vaadin/tests/components/grid/GridColspansTest.java
+++ b/uitest/src/com/vaadin/tests/components/grid/GridColspansTest.java
@@ -16,10 +16,10 @@
package com.vaadin.tests.components.grid;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
import java.io.IOException;
-import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.By;
@@ -86,15 +86,15 @@ public class GridColspansTest extends MultiBrowserTest {
openTestURL();
GridElement grid = $(GridElement.class).first();
- Assert.assertEquals("Failed initial condition.",
- grid.getHeaderCell(0, 1).getText(), "All the stuff");
- Assert.assertEquals("Failed initial condition.",
- grid.getHeaderCell(2, 1).getText(), "firstName");
+ assertEquals("Failed initial condition.", "all the stuff", grid
+ .getHeaderCell(0, 1).getText().toLowerCase());
+ assertEquals("Failed initial condition.", "firstname", grid
+ .getHeaderCell(2, 1).getText().toLowerCase());
$(ButtonElement.class).first().click();
- Assert.assertEquals("Header text changed on column hide.", grid
- .getHeaderCell(0, 1).getText(), "All the stuff");
- Assert.assertEquals("Failed initial condition.", "lastName", grid
- .getHeaderCell(2, 1).getText());
+ assertEquals("Header text changed on column hide.", "all the stuff",
+ grid.getHeaderCell(0, 1).getText().toLowerCase());
+ assertEquals("Failed initial condition.", "lastname", grid
+ .getHeaderCell(2, 1).getText().toLowerCase());
}
@Test
@@ -103,23 +103,23 @@ public class GridColspansTest extends MultiBrowserTest {
GridElement grid = $(GridElement.class).first();
GridCellElement headerCell = grid.getHeaderCell(1, 1);
- Assert.assertEquals("Failed initial condition.", headerCell.getText(),
- "Full Name");
- Assert.assertEquals("Failed initial condition.",
- grid.getHeaderCell(2, 1).getText(), "firstName");
+ assertEquals("Failed initial condition.", "full name", headerCell
+ .getText().toLowerCase());
+ assertEquals("Failed initial condition.", "firstname", grid
+ .getHeaderCell(2, 1).getText().toLowerCase());
$(ButtonElement.class).get(1).click();
headerCell = grid.getHeaderCell(1, 1);
- Assert.assertEquals("Header text not changed on column reorder.",
- headerCell.getText(), "Address");
- Assert.assertEquals("Unexpected colspan", "1",
+ assertEquals("Header text not changed on column reorder.", "address",
+ headerCell.getText().toLowerCase());
+ assertEquals("Unexpected colspan", "1",
headerCell.getAttribute("colspan"));
headerCell = grid.getHeaderCell(1, 2);
- Assert.assertEquals("Header text not changed on column reorder",
- "Full Name", headerCell.getText());
- Assert.assertEquals("Unexpected colspan", "2",
+ assertEquals("Header text not changed on column reorder", "full name",
+ headerCell.getText().toLowerCase());
+ assertEquals("Unexpected colspan", "2",
headerCell.getAttribute("colspan"));
- Assert.assertTrue("Error indicator not present",
+ assertTrue("Error indicator not present",
isElementPresent(By.className("v-errorindicator")));
}
diff --git a/uitest/src/com/vaadin/tests/components/grid/GridGeneratedPropertiesTest.java b/uitest/src/com/vaadin/tests/components/grid/GridGeneratedPropertiesTest.java
index 21cc66c8a3..cb61c6e91c 100644
--- a/uitest/src/com/vaadin/tests/components/grid/GridGeneratedPropertiesTest.java
+++ b/uitest/src/com/vaadin/tests/components/grid/GridGeneratedPropertiesTest.java
@@ -33,7 +33,7 @@ public class GridGeneratedPropertiesTest extends MultiBrowserTest {
openTestURL();
GridElement grid = $(GridElement.class).first();
assertEquals("Miles header wasn't present.", "miles", grid
- .getHeaderCell(0, 3).getText());
+ .getHeaderCell(0, 3).getText().toLowerCase());
}
@Test
diff --git a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridStructureTest.java b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridStructureTest.java
index 054c584d28..961eeb3fb6 100644
--- a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridStructureTest.java
+++ b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridStructureTest.java
@@ -58,13 +58,15 @@ public class GridStructureTest extends GridBasicFeaturesTest {
setDebug(true);
openTestURL();
- assertEquals("Column 0", getGridElement().getHeaderCell(0, 0).getText());
+ assertEquals("column 0", getGridElement().getHeaderCell(0, 0).getText()
+ .toLowerCase());
selectMenuPath("Component", "Columns", "Column 0", "Add / Remove");
- assertEquals("Column 1", getGridElement().getHeaderCell(0, 0).getText());
+ assertEquals("column 1", getGridElement().getHeaderCell(0, 0).getText()
+ .toLowerCase());
selectMenuPath("Component", "Columns", "Column 0", "Add / Remove");
// Column 0 is appended to the end of grid
- assertEquals("Column 0", getGridElement().getHeaderCell(0, 11)
- .getText());
+ assertEquals("column 0", getGridElement().getHeaderCell(0, 11)
+ .getText().toLowerCase());
}
@Test