Skip to content

Commit

Permalink
[FIXED JENKINS-9637] Fixed the 404 when clicking the testResult on th…
Browse files Browse the repository at this point in the history
…e Project Page when there is only an aggregated test result for a freestyle job. The name of the link is still wrong.

(cherry picked from commit 58e8bd7)
  • Loading branch information
Stefan Wolf authored and olivergondza committed Sep 19, 2013
1 parent ee888ca commit 410d1b9
Showing 1 changed file with 7 additions and 2 deletions.
Expand Up @@ -21,17 +21,22 @@ public String getResultText() {
}
public T assertNoTests() {
assertThat(getResultText(), containsString("no tests"));
return (T) this;
return castToConcreteType();
}

public T assertHasTests() {
// Text is either "(no failures)" or "<n> failure(s)"
assertThat(getResultText(), containsString("failure"));
return (T) this;
return castToConcreteType();
}

public TestResultsPage follow() throws Exception {
return new TestResultsPage((HtmlPage) testResultLink.openLinkInNewWindow());
}

@SuppressWarnings("unchecked")
private T castToConcreteType() {
return (T) this;
}

}

0 comments on commit 410d1b9

Please sign in to comment.