aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/test/java/com/vaadin/tests/push/PushConfigurationLongPollingTest.java
blob: f00eecd9aec661013a0f2a375804d286f14cae3e (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
package com.vaadin.tests.push;

import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.MatcherAssert.assertThat;

import org.junit.Test;

public class PushConfigurationLongPollingTest extends PushConfigurationTest {

    @Test
    public void testLongPolling() throws InterruptedException {
        openDebugLogTab();

        getTransportSelect().selectByText("Long polling");
        assertThat(getStatusText(),
                containsString("fallbackTransport: long-polling"));
        assertThat(getStatusText(), containsString("transport: long-polling"));

        clearDebugMessages();
        getPushModeSelect().selectByText("Automatic");
        waitForDebugMessage("Push connection established using long-polling",
                10);
        waitForServerCounterToUpdate();
    }

}