aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/test/java/com/vaadin/tests/applicationservlet/VaadinRefreshServletTest.java
blob: a8ac4ffc88f379993105751d1d3b7322e4a6f2cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package com.vaadin.tests.applicationservlet;

import static org.junit.Assert.assertEquals;

import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;

import com.vaadin.tests.tb3.SingleBrowserTest;

public class VaadinRefreshServletTest extends SingleBrowserTest {

    @Test
    public void redirectWorksWithContextPath() {
        getDriver().get(getBaseURL() + "/vaadinrefresh/");
        waitUntil((WebDriver d) -> "Please login"
                .equals(findElement(By.tagName("body")).getText()));
        assertEquals(getBaseURL() + "/statictestfiles/login.html",
                getDriver().getCurrentUrl());
    }
}