aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridThemeChangeTest.java
blob: a0220e6764f3a5cfa1fed4b13959c87c0074cc45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package com.vaadin.v7.tests.components.grid;

import static org.junit.Assert.assertTrue;

import org.junit.Test;

import com.vaadin.testbench.elements.GridElement;
import com.vaadin.testbench.parallel.TestCategory;
import com.vaadin.tests.tb3.MultiBrowserTest;

@TestCategory("grid")
public class GridThemeChangeTest extends MultiBrowserTest {

    @Test
    public void testThemeChange() {
        openTestURL("debug");

        GridElement grid = $(GridElement.class).first();

        int reindeerHeight = grid.getRow(0).getSize().getHeight();

        grid.getCell(0, 0).click();

        grid = $(GridElement.class).first();
        int valoHeight = grid.getRow(0).getSize().getHeight();

        assertTrue(
                "Row height should increase when changing from Reindeer to Valo",
                valoHeight > reindeerHeight);
    }
}