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.
  • Loading branch information
Stefan Wolf committed Aug 23, 2013
1 parent 629be4a commit 58e8bd7
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 58e8bd7

Please sign in to comment.