Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions src/main/resources/hudson/plugins/robot/util/failedCases.jelly
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:u="/util">
<j:if test="${!it.allFailedCases.isEmpty()}">
Expand All @@ -17,13 +17,15 @@
</tr>
<j:forEach var="case" items="${it.allFailedCases}">
<j:set var="fullName" value="${case.getRelativePackageName(it)}" />
<j:set var="relativeId" value="${case.getRelativeId(it)}" />
<j:set var="escapedName" value="${h.escape(fullName)}" />
<tr>
<td class="pane">
<a id="${h.escape(fullName)}-showlink" href="javascript:showStackTrace('${h.jsStringEscape(h.escape(fullName))}','${h.jsStringEscape(case.getRelativeId(it))}/summary')" class="expand"></a>
<a id="${h.escape(fullName)}-hidelink" style="display:none" href="javascript:hideStackTrace('${h.jsStringEscape(h.escape(fullName))}')" class="collapse"></a>
<a id="${escapedName}-showlink" href="#" onclick="javascript:showStackTrace('${h.jsStringEscape(escapedName)}','${h.jsStringEscape(relativeId)}/summary')" class="expand"></a>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that the href="#" will cause the page relocate to the top when we expand the result.

<a id="${escapedName}-hidelink" href="#" onclick="javascript:hideStackTrace('${h.jsStringEscape(escapedName)}')" style="display:none" class="collapse"></a>
<st:nbsp/>
<a href="${case.getRelativeId(it)}"><small>${case.getRelativeParent(it)}</small>${case.name}</a>
<div id="${h.escape(fullName)}" class="hidden" style="display:none">
<a href="${relativeId}"><small>${case.getRelativeParent(it)}</small>${case.name}</a>
<div id="${escapedName}" class="hidden" style="display:none">
${%Loading...}
</div>
</td>
Expand Down