Skip to content

Commit

Permalink
Still trying to fix the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mcasperson committed Aug 7, 2017
1 parent ec630a4 commit 6d11c4d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ public void verifyPageContent(final String alias, final String text) {
webDriver.findElement(By.tagName("body")).getAttribute("innerText");

if (!pageText.contains(fixedtext)) {
throw new ValidationException("Could not find the text \"" + fixedtext + "\" on the page");
throw new ValidationException("Could not find the text \"" + fixedtext + "\" on the page with text " + pageText);
}
}

Expand All @@ -360,7 +360,7 @@ public void verifyPageRegexContent(final String alias, final String regex) {
webDriver.findElement(By.tagName("body")).getAttribute("innerText");

if (!pattern.matcher(pageText).find()) {
throw new ValidationException("Could not find the regex \"" + fixedRegex + "\" on the page");
throw new ValidationException("Could not find the regex \"" + fixedRegex + "\" on the page with text " + pageText);
}
}

Expand All @@ -378,7 +378,7 @@ public void verifyPageContentAbsent(final String alias, final String text) {
webDriver.findElement(By.tagName("body")).getAttribute("innerText");

if (pageText.contains(fixedtext)) {
throw new ValidationException("Found the text \"" + fixedtext + "\" on the page");
throw new ValidationException("Found the text \"" + fixedtext + "\" on the page with text " + pageText);
}
}

Expand All @@ -399,7 +399,7 @@ public void verifyPageRegexNotContent(final String alias, final String regex) {
webDriver.findElement(By.tagName("body")).getAttribute("innerText");

if (pattern.matcher(pageText).find()) {
throw new ValidationException("Found the regex \"" + fixedRegex + "\" on the page");
throw new ValidationException("Found the regex \"" + fixedRegex + "\" on the page with text " + pageText);
}
}

Expand Down
2 changes: 0 additions & 2 deletions src/test/java/au/com/agic/apptesting/LiveTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ public void getBrowserList() throws JSONException {
browsers.add("PhantomJS");
} else {
try {


final JSONObject settings = new JSONObject(browsersSysProp);

if (settings.has("browsers")) {
Expand Down
7 changes: 4 additions & 3 deletions src/test/resources/steptest.feature
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,13 @@ Feature: Test of the steps provided by Iridium
And I scroll to the bottom of the page
# IE reports hidden and invisible text
And I verify that the page contains the regex "Some text with (blah)?hidden elements"
And I verify that the page contains the regex "Some text with (blah)?invisible elements"
# The whitspace before the invisible element could be a space, or a space and line break
And I verify that the page contains the regex "Some text with\s+(blah)?invisible elements"
And I verify that the page contains the text "Some text with supertext"
And I verify that the page contains the text "Some text with subtext"
And I verify that the page contains the text "Some text with UTF characters like Є and ϼ"
# The whitespace between table cells can be tabs or spaces depending on the browser
And I verify that the page contains the regex "Some\stext\sin\sa\stable"
# The whitespace between table cells can be tabs, spaces or newlines depending on the browser
And I verify that the page contains the regex "Some(\s)+text(\s)+in(\s)+a(\s)+table"

@test
Scenario: Test cookie steps
Expand Down

0 comments on commit 6d11c4d

Please sign in to comment.