aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/test/java/com/vaadin/tests/themes/valo/TableWithEmptyCaptionTest.java
blob: 92c0d7b5827e151279b15c4b3aa2232f90692507 (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.tests.themes.valo;

import org.junit.Test;
import org.openqa.selenium.TimeoutException;
import org.openqa.selenium.support.ui.ExpectedConditions;

import com.vaadin.testbench.By;
import com.vaadin.tests.tb3.MultiBrowserTest;

public class TableWithEmptyCaptionTest extends MultiBrowserTest {

    @Test
    public void testEmptyCaption() throws Exception {
        openTestURL();

        // Wait for the loading bar to disappear before taking the screenshot.
        try {
            waitUntil(ExpectedConditions.invisibilityOfElementLocated(
                    By.className("v-loading-indicator")), 5);
        } catch (TimeoutException e) {
            // Just take the screenshot, PhantomJS always times out.
        }

        compareScreen("table-empty-caption");
    }

}