From 43608bf92010787914d0b624dd2cc0838430ae10 Mon Sep 17 00:00:00 2001 From: Andrei Solntsev Date: Tue, 27 Jun 2017 23:06:16 +0300 Subject: [PATCH] #484 fix tests --- .../integration/ErrorMessagesWithScreenshotsTest.java | 10 +++------- .../MethodCalledOnCollectionFailsOnTest.java | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/test/java/integration/ErrorMessagesWithScreenshotsTest.java b/src/test/java/integration/ErrorMessagesWithScreenshotsTest.java index 6f8dbb9df8..621e665750 100644 --- a/src/test/java/integration/ErrorMessagesWithScreenshotsTest.java +++ b/src/test/java/integration/ErrorMessagesWithScreenshotsTest.java @@ -11,14 +11,10 @@ import java.io.File; import static com.codeborne.selenide.Condition.*; -import static com.codeborne.selenide.Configuration.browser; -import static com.codeborne.selenide.Configuration.reportsFolder; -import static com.codeborne.selenide.Configuration.timeout; +import static com.codeborne.selenide.Configuration.*; import static com.codeborne.selenide.Selectors.byText; import static com.codeborne.selenide.Selenide.$; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; +import static org.junit.Assert.*; public class ErrorMessagesWithScreenshotsTest extends IntegrationTest { private String reportsUrl; @@ -88,7 +84,7 @@ public void itShouldBeReportedIfParentCollectionIsNotFound() { fail(); } catch (ElementNotFound e) { assertTrue("Actual error message: " + e.getMessage(), - e.getMessage().contains("Element not found {/thead")); + e.getMessage().contains("Element not found {#multirowTable/thead")); assertEquals("http://ci.org/build/reports/tests/" + browser + "/1.jpg", e.getScreenshot()); } } diff --git a/src/test/java/integration/errormessages/MethodCalledOnCollectionFailsOnTest.java b/src/test/java/integration/errormessages/MethodCalledOnCollectionFailsOnTest.java index 9ac825c3b6..83c4ae849c 100644 --- a/src/test/java/integration/errormessages/MethodCalledOnCollectionFailsOnTest.java +++ b/src/test/java/integration/errormessages/MethodCalledOnCollectionFailsOnTest.java @@ -150,7 +150,7 @@ public void shouldCondition_WhenInnerCollection_WithNonExistentInnerWebElements( fail("Expected ElementNotFound"); } catch (ElementNotFound expected) { - assertThat(expected.getMessage(), startsWith("Element not found {