aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridWithBrokenRendererTest.java
blob: 6f369fb6b375e934a94195ab78d9c37b72341a8a (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
package com.vaadin.v7.tests.components.grid;

import static org.junit.Assert.assertEquals;

import org.junit.Test;

import com.vaadin.testbench.elements.GridElement;
import com.vaadin.tests.tb3.SingleBrowserTest;

public class GridWithBrokenRendererTest extends SingleBrowserTest {

    @Test
    public void ensureRendered() {
        openTestURL();
        GridElement grid = $(GridElement.class).first();
        assertRow(grid, 0, "FI", "", "Finland");
        assertRow(grid, 1, "SE", "", "Sweden");
    }

    private void assertRow(GridElement grid, int row, String... texts) {
        for (int column = 0; column < texts.length; column++) {
            assertEquals("Cell " + row + "," + column, texts[column],
                    grid.getCell(row, column).getText());
        }

    }
}