aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/test/java/com/vaadin/tests/components/abstractcomponent/ResponseWritingErrorHandlingTest.java
blob: 7bfd53968a9ed6f9a89e1311dc69cfc7d51465ab (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.components.abstractcomponent;

import static org.junit.Assert.assertEquals;

import org.junit.Test;

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

public class ResponseWritingErrorHandlingTest extends SingleBrowserTest {

    @Test
    public void testExceptionInBeforeClientResponse() {
        openTestURL();

        $(ButtonElement.class).first().click();

        assertEquals("Message should be logged by error handler",
                "1. Button.beforeClientResponse", getLogRow(0));
    }
}