Skip to content

Commit

Permalink
#484 fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
asolntsev committed Jun 27, 2017
1 parent d7544aa commit 43608bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 3 additions & 7 deletions src/test/java/integration/ErrorMessagesWithScreenshotsTest.java
Expand Up @@ -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;
Expand Down Expand Up @@ -88,7 +84,7 @@ public void itShouldBeReportedIfParentCollectionIsNotFound() {
fail();
} catch (ElementNotFound e) {
assertTrue("Actual error message: " + e.getMessage(),
e.getMessage().contains("Element not found {<table id=\"multirowTable\">/thead"));
e.getMessage().contains("Element not found {#multirowTable/thead"));
assertEquals("http://ci.org/build/reports/tests/" + browser + "/1.jpg", e.getScreenshot());
}
}
Expand Down
Expand Up @@ -150,7 +150,7 @@ public void shouldCondition_WhenInnerCollection_WithNonExistentInnerWebElements(
fail("Expected ElementNotFound");
}
catch (ElementNotFound expected) {
assertThat(expected.getMessage(), startsWith("Element not found {<ul>/.nonexistent}"));
assertThat(expected.getMessage(), startsWith("Element not found {ul/.nonexistent}"));
assertThat(expected.getMessage(), containsString("Expected: [Miller, Julie Mao]"));
assertScreenshot(expected);
assertThat(expected.getCause(), nullValue());
Expand Down

0 comments on commit 43608bf

Please sign in to comment.