From fe37cc443d2268d813aadfa09d0f2f881d5c464c Mon Sep 17 00:00:00 2001 From: Anna Koskinen Date: Mon, 29 Mar 2021 15:52:45 +0300 Subject: Add ErrorHandler to AbstractTestUI (#12256) * Add ErrorHandler to AbstractTestUI --- .../src/test/java/com/vaadin/tests/components/ui/UIAccessTest.java | 6 ++++-- .../vaadin/tests/components/upload/UploadChangeListenerTest.java | 7 +++++-- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'uitest/src/test') diff --git a/uitest/src/test/java/com/vaadin/tests/components/ui/UIAccessTest.java b/uitest/src/test/java/com/vaadin/tests/components/ui/UIAccessTest.java index f1ac5a5841..3202d95e64 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/ui/UIAccessTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/ui/UIAccessTest.java @@ -60,9 +60,11 @@ public class UIAccessTest extends MultiBrowserTest { $(ButtonElement.class).get(2).click(); assertTrue(logContainsText("0. Throwing exception in access")); - assertTrue(logContainsText("1. firstFuture is done? true")); assertTrue(logContainsText( - "2. Got exception from firstFuture: java.lang.RuntimeException: Catch me if you can")); + "1. Exception occurred, java.lang.RuntimeException: Catch me if you can")); + assertTrue(logContainsText("2. firstFuture is done? true")); + assertTrue(logContainsText( + "3. Got exception from firstFuture: java.lang.RuntimeException: Catch me if you can")); } @Test diff --git a/uitest/src/test/java/com/vaadin/tests/components/upload/UploadChangeListenerTest.java b/uitest/src/test/java/com/vaadin/tests/components/upload/UploadChangeListenerTest.java index a7e8a4e3ce..a55029c249 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/upload/UploadChangeListenerTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/upload/UploadChangeListenerTest.java @@ -30,12 +30,15 @@ public class UploadChangeListenerTest extends MultiBrowserTest { upload.click(); - assertEquals("2. finished", getLogRow(0)); + assertEquals("2. finished", getLogRow(1)); + assertEquals( + "3. Exception occurred, com.vaadin.server.UploadException: Upload failed", + getLogRow(0)); tempFile = createTempFile(); fillPathToUploadInput(tempFile.getPath()); - assertEquals("3. change", getLogRow(0)); + assertEquals("4. change", getLogRow(0)); } /** -- cgit v1.2.3