9 new revisions:
Revision: 87efb6177990
Author: Jussi Malinen
Date: Fri Jun 3 08:37:10 2011
Log: totals to report
http://code.google.com/p/robotframework/source/detail?r=87efb6177990
Revision: 28438f717efa
Author: Jussi Malinen
Date: Fri Jun 3 08:37:26 2011
Log: merge
http://code.google.com/p/robotframework/source/detail?r=28438f717efa
Revision: 2a70424ff3f9
Author: Jussi Malinen
Date: Fri Jun 3 08:44:45 2011
Log: totals selector fixed
http://code.google.com/p/robotframework/source/detail?r=2a70424ff3f9
Revision: b470db02998b
Author: Jussi Malinen
Date: Fri Jun 3 09:18:58 2011
Log: links to total and critical tests from report
http://code.google.com/p/robotframework/source/detail?r=b470db02998b
Revision: 595dbd5934d0
Author: Jussi Malinen
Date: Fri Jun 3 11:27:55 2011
Log: reordered javascript functions in report
http://code.google.com/p/robotframework/source/detail?r=595dbd5934d0
Revision: 4a0809085ae6
Author: Jussi Malinen
Date: Fri Jun 3 11:33:54 2011
Log: cleanup
http://code.google.com/p/robotframework/source/detail?r=4a0809085ae6
Revision: 3c5639ff0e61
Author: Jussi Malinen
Date: Fri Jun 3 11:42:51 2011
Log: hash links to critical and all tests work
http://code.google.com/p/robotframework/source/detail?r=3c5639ff0e61
Revision: 3a37b6232a1e
Author: Jussi Malinen
Date: Fri Jun 3 11:50:36 2011
Log: cleanup
http://code.google.com/p/robotframework/source/detail?r=3a37b6232a1e
Revision: 5e10251b5850
Author: Jussi Malinen
Date: Fri Jun 3 11:55:49 2011
Log: error when selecting dropdown instruction row
http://code.google.com/p/robotframework/source/detail?r=5e10251b5850
==============================================================================
Revision: 87efb6177990
Author: Jussi Malinen
Date: Fri Jun 3 08:37:10 2011
Log: totals to report
http://code.google.com/p/robotframework/source/detail?r=87efb6177990
Modified:
/src/robot/webcontent/js/model.js
/src/robot/webcontent/report.html
=======================================
--- /src/robot/webcontent/js/model.js Wed Jun 1 03:41:18 2011
+++ /src/robot/webcontent/js/model.js Fri Jun 3 08:37:10 2011
@@ -47,6 +47,9 @@
suite.allTests = function () {
return suite.searchTests(function (test) { return true; });
};
+ suite.criticalTests = function () {
+ return suite.searchTests(function (test) { return
test.isCritical; });
+ };
return suite;
}
=======================================
--- /src/robot/webcontent/report.html Wed Jun 1 06:23:45 2011
+++ /src/robot/webcontent/report.html Fri Jun 3 08:37:10 2011
@@ -322,6 +322,11 @@
$.tmpl(window.templates.testDetailsByTagTable).appendTo('#test_details_by_tag_container');
$.tmpl(window.templates.testDetailsRow,
tests).appendTo('#tests_by_tag');
}
+
+function renderTotalDetails(type) {
+
$.tmpl(window.templates.testDetailsByTagTable).appendTo('#test_details_by_tag_container');
+ $.tmpl(window.templates.testDetailsRow,
totalTests(type)).appendTo('#tests_by_tag');
+}
function tagDetailSelected(name) {
$('#test_details_by_tag_container').empty();
@@ -338,10 +343,16 @@
return tags[i];
}
}
+
+function totalDetailSelected(type) {
+ $('#test_details_by_tag_container').empty();
+ renderDetailsHeader();
+ renderTotalDetails(type);
+ ensureTotalDetailsAreVisible(name);
+}
function suiteDetailSelected(name) {
$('#test_details_by_tag_container').empty();
- var allSuites = window.testdata.statistics().suite;
renderDetailsHeader();
renderDetailsBySuite(name);
ensureSuiteDetailsAreVisible(name);
@@ -366,18 +377,25 @@
}
window.location.hash = window.location.hash.substring(1);
}
+
+function sort_failures_first(t1, t2) {
+ if (t1.status != t2.status)
+ return t1.status == 'fail' ? -1 : 1;
+ if (t1.isCritical != t2.isCritical)
+ return t1.isCritical ? -1 : 1;
+ return t1.fullname < t2.fullname ? -1 : 1;
+}
function testsHavingTag(tag) {
if (!tag)
return [];
- var sorter = function (t1, t2) {
- if (t1.status != t2.status)
- return t1.status == 'fail' ? -1 : 1;
- if (t1.isCritical != t2.isCritical)
- return t1.isCritical ? -1 : 1;
- return t1.fullname < t2.fullname ? -1 : 1;
- }
- return window.testdata.suite().searchTestsByTag(tag).sort(sorter);
+ return
window.testdata.suite().searchTestsByTag(tag).sort(sort_failures_first);
+}
+
+function totalTests(type) {
+ if (type == 'critical')
+ return
window.testdata.suite().criticalTests().sort(sort_failures_first);
+ return window.testdata.suite().allTests().sort(sort_failures_first);
}
function calculateTotalTime(tests) {
@@ -395,6 +413,10 @@
function ensureSuiteDetailsAreVisible(name) {
document.getElementById('suite_detail_selector').value = name;
}
+
+function ensureTotalDetailsAreVisible(type) {
+ document.getElementById('total_detail_selector').value = type;
+}
$(document).ready(function(){
var topsuite = window.testdata.suite();
@@ -580,6 +602,11 @@
{{each suites}}
<option
value="${$value.fullname}">${$value.fullname}</option>
{{/each}}
+ </select>
+ <select id="total_detail_selector"
onchange="totalDetailSelected(this.options[this.selectedIndex].value);">
+ <option>Select see to totals...</option>
+ <option value="all">All tests</option>
+ <option value="critical">Critical tests</option>
</select>
</td>
</tr>
==============================================================================
Revision: 28438f717efa
Author: Jussi Malinen
Date: Fri Jun 3 08:37:26 2011
Log: merge
http://code.google.com/p/robotframework/source/detail?r=28438f717efa
==============================================================================
Revision: 2a70424ff3f9
Author: Jussi Malinen
Date: Fri Jun 3 08:44:45 2011
Log: totals selector fixed
http://code.google.com/p/robotframework/source/detail?r=2a70424ff3f9
Modified:
/src/robot/webcontent/report.html
=======================================
--- /src/robot/webcontent/report.html Fri Jun 3 08:37:10 2011
+++ /src/robot/webcontent/report.html Fri Jun 3 08:44:45 2011
@@ -348,7 +348,7 @@
$('#test_details_by_tag_container').empty();
renderDetailsHeader();
renderTotalDetails(type);
- ensureTotalDetailsAreVisible(name);
+ ensureTotalDetailsAreVisible(type);
}
function suiteDetailSelected(name) {
==============================================================================
Revision: b470db02998b
Author: Jussi Malinen
Date: Fri Jun 3 09:18:58 2011
Log: links to total and critical tests from report
http://code.google.com/p/robotframework/source/detail?r=b470db02998b
Modified:
/src/robot/webcontent/report.html
=======================================
--- /src/robot/webcontent/report.html Fri Jun 3 08:44:45 2011
+++ /src/robot/webcontent/report.html Fri Jun 3 09:18:58 2011
@@ -90,13 +90,6 @@
padding: 2px 4px;
white-space: pre-wrap;
}
- .status_fail {
- color: red;
- font-weight: bold;
- }
- .status_pass {
- color: #009900;
- }
</style>
<style media="all" type="text/css">
/* Generic styles */
@@ -226,6 +219,13 @@
font-size: 0.8em;
clear: both;
}
+ a.status_fail {
+ color: red;
+ font-weight: bold;
+ }
+ a.status_pass {
+ color: #009900;
+ }
/* Status text colors */
.error, .fail {
color: red;
@@ -393,7 +393,7 @@
}
function totalTests(type) {
- if (type == 'critical')
+ if (type == 'Critical Tests')
return
window.testdata.suite().criticalTests().sort(sort_failures_first);
return window.testdata.suite().allTests().sort(sort_failures_first);
}
@@ -491,9 +491,9 @@
<tr>
<th>Status:</th>
{{if criticalFailed}}
- <td class="status_fail">${criticalFailed} critical test{{if
criticalFailed != 1}}s{{/if}} failed</td>
+ <td><a class="status_fail" href="#details_header"
onClick="totalDetailSelected('critical')">${criticalFailed} critical
test{{if criticalFailed != 1}}s{{/if}} failed</a></td>
{{else}}
- <td class="status_pass">All critical tests passed</td>
+ <td><a class="status_pass" href="#details_header"
onClick="totalDetailSelected('critical')">All critical tests passed</a></td>
{{/if}}
</tr>
{{if documentation}}
@@ -512,7 +512,7 @@
<tr>
<td class="col_stat_name">
<div class="stat_name">
- <span title="${doc}">${label}</span>
+ <span title="${doc}"><a href="#details_header"
onClick="totalDetailSelected('${label}')">${label}</a></span>
</div>
</td>
{{tmpl($data) '#stat_columns'}}
@@ -605,8 +605,8 @@
</select>
<select id="total_detail_selector"
onchange="totalDetailSelected(this.options[this.selectedIndex].value);">
<option>Select see to totals...</option>
- <option value="all">All tests</option>
- <option value="critical">Critical tests</option>
+ <option value="All Tests">All tests</option>
+ <option value="Critical Tests">Critical tests</option>
</select>
</td>
</tr>
==============================================================================
Revision: 595dbd5934d0
Author: Jussi Malinen
Date: Fri Jun 3 11:27:55 2011
Log: reordered javascript functions in report
http://code.google.com/p/robotframework/source/detail?r=595dbd5934d0
Modified:
/src/robot/webcontent/report.html
=======================================
--- /src/robot/webcontent/report.html Fri Jun 3 09:18:58 2011
+++ /src/robot/webcontent/report.html Fri Jun 3 11:27:55 2011
@@ -303,6 +303,20 @@
<div id="test_details_by_tag_container"></div>
<script type="text/javascript">
+$(document).ready(function(){
+ var topsuite = window.testdata.suite();
+ setBackground(topsuite);
+ setDocumentTitle(topsuite);
+ window.templates = initTemplates();
+ addHeader();
+ addSummary(topsuite);
+ addStatistics();
+ renderDetailsHeader();
+ if(window.location.hash !== "") {
+ showByHash();
+ }
+});
+
function addSummary(topsuite) {
$.tmpl(window.templates.summaryTable,
topsuite).insertAfter($('#header_div'));
}
@@ -312,21 +326,6 @@
var suitestats = window.testdata.statistics().suite;
$.tmpl(window.templates.detailsHeader, {tags: tagstats, suites:
suitestats}).appendTo('#test_details_by_tag_container');
}
-
-function renderDetailsByTag(tag) {
- var tests = testsHavingTag(tag);
- if (tag) {
- tag.totalTime = calculateTotalTime(tests);
- }
- $.tmpl(window.templates.tagDetails, tag).appendTo('#details_header');
-
$.tmpl(window.templates.testDetailsByTagTable).appendTo('#test_details_by_tag_container');
- $.tmpl(window.templates.testDetailsRow,
tests).appendTo('#tests_by_tag');
-}
-
-function renderTotalDetails(type) {
-
$.tmpl(window.templates.testDetailsByTagTable).appendTo('#test_details_by_tag_container');
- $.tmpl(window.templates.testDetailsRow,
totalTests(type)).appendTo('#tests_by_tag');
-}
function tagDetailSelected(name) {
$('#test_details_by_tag_container').empty();
@@ -337,11 +336,11 @@
ensureTagDetailsAreVisible(name);
}
-function findTagByName(name, tags) {
- for (var i=0; i<tags.length; i++) {
- if (tags[i].label == name)
- return tags[i];
- }
+function suiteDetailSelected(name) {
+ $('#test_details_by_tag_container').empty();
+ renderDetailsHeader();
+ renderDetailsBySuite(name);
+ ensureSuiteDetailsAreVisible(name);
}
function totalDetailSelected(type) {
@@ -351,11 +350,14 @@
ensureTotalDetailsAreVisible(type);
}
-function suiteDetailSelected(name) {
- $('#test_details_by_tag_container').empty();
- renderDetailsHeader();
- renderDetailsBySuite(name);
- ensureSuiteDetailsAreVisible(name);
+function renderDetailsByTag(tag) {
+ var tests = getTestsHavingTag(tag);
+ if (tag) {
+ tag.totalTime = calculateTotalTime(tests);
+ }
+ $.tmpl(window.templates.tagDetails, tag).appendTo('#details_header');
+
$.tmpl(window.templates.testDetailsByTagTable).appendTo('#test_details_by_tag_container');
+ $.tmpl(window.templates.testDetailsRow,
tests).appendTo('#tests_by_tag');
}
function renderDetailsBySuite(name) {
@@ -364,6 +366,30 @@
$.tmpl(window.templates.testDetailsByTagTable).appendTo('#test_details_by_tag_container');
$.tmpl(window.templates.testDetailsRow,
suite.allTests()).appendTo('#tests_by_tag');
}
+
+function renderTotalDetails(type) {
+
$.tmpl(window.templates.testDetailsByTagTable).appendTo('#test_details_by_tag_container');
+ $.tmpl(window.templates.testDetailsRow,
getTotalTests(type)).appendTo('#tests_by_tag');
+}
+
+function ensureTagDetailsAreVisible(name) {
+ document.getElementById('tag_detail_selector').value = name;
+}
+
+function ensureSuiteDetailsAreVisible(name) {
+ document.getElementById('suite_detail_selector').value = name;
+}
+
+function ensureTotalDetailsAreVisible(type) {
+ document.getElementById('total_detail_selector').value = type;
+}
+
+function findTagByName(name, tags) {
+ for (var i=0; i<tags.length; i++) {
+ if (tags[i].label == name)
+ return tags[i];
+ }
+}
function showByHash() {
hash = window.location.hash.substring(1);
@@ -386,13 +412,13 @@
return t1.fullname < t2.fullname ? -1 : 1;
}
-function testsHavingTag(tag) {
+function getTestsHavingTag(tag) {
if (!tag)
return [];
return
window.testdata.suite().searchTestsByTag(tag).sort(sort_failures_first);
}
-function totalTests(type) {
+function getTotalTests(type) {
if (type == 'Critical Tests')
return
window.testdata.suite().criticalTests().sort(sort_failures_first);
return window.testdata.suite().allTests().sort(sort_failures_first);
@@ -406,32 +432,6 @@
return model.formatElapsed(totaltime).split('.')[0];
}
-function ensureTagDetailsAreVisible(name) {
- document.getElementById('tag_detail_selector').value = name;
-}
-
-function ensureSuiteDetailsAreVisible(name) {
- document.getElementById('suite_detail_selector').value = name;
-}
-
-function ensureTotalDetailsAreVisible(type) {
- document.getElementById('total_detail_selector').value = type;
-}
-
-$(document).ready(function(){
- var topsuite = window.testdata.suite();
- setBackground(topsuite);
- setDocumentTitle(topsuite);
- window.templates = initTemplates();
- addHeader();
- addSummary(topsuite);
- addStatistics();
- renderDetailsHeader();
- if(window.location.hash !== "") {
- showByHash();
- }
-});
-
function setDocumentTitle(suite){
document.title = document.title.replace("[SUITE_NAME]",
suite.name, "g");
}
@@ -470,7 +470,6 @@
testDetailsByTagTable: $('#test_details_by_tag_table').template()
};
};
-
</script>
<script type="text/html" id="header_template">
==============================================================================
Revision: 4a0809085ae6
Author: Jussi Malinen
Date: Fri Jun 3 11:33:54 2011
Log: cleanup
http://code.google.com/p/robotframework/source/detail?r=4a0809085ae6
Modified:
/src/robot/webcontent/report.html
=======================================
--- /src/robot/webcontent/report.html Fri Jun 3 11:27:55 2011
+++ /src/robot/webcontent/report.html Fri Jun 3 11:33:54 2011
@@ -300,7 +300,7 @@
<th class="col_graph">Graph</th>
</tr>
</table>
- <div id="test_details_by_tag_container"></div>
+ <div id="test_details_container"></div>
<script type="text/javascript">
$(document).ready(function(){
@@ -313,7 +313,7 @@
addStatistics();
renderDetailsHeader();
if(window.location.hash !== "") {
- showByHash();
+ showDetailsByHash();
}
});
@@ -324,31 +324,33 @@
function renderDetailsHeader() {
var tagstats = window.testdata.statistics().tag;
var suitestats = window.testdata.statistics().suite;
- $.tmpl(window.templates.detailsHeader, {tags: tagstats, suites:
suitestats}).appendTo('#test_details_by_tag_container');
+ $.tmpl(window.templates.detailsHeader, {tags: tagstats, suites:
suitestats}).appendTo('#test_details_container');
}
function tagDetailSelected(name) {
- $('#test_details_by_tag_container').empty();
+ refreshDetailsHeader();
var alltags = window.testdata.statistics().tag;
var tag = findTagByName(name, alltags);
- renderDetailsHeader();
renderDetailsByTag(tag);
ensureTagDetailsAreVisible(name);
}
function suiteDetailSelected(name) {
- $('#test_details_by_tag_container').empty();
- renderDetailsHeader();
+ refreshDetailsHeader();
renderDetailsBySuite(name);
ensureSuiteDetailsAreVisible(name);
}
function totalDetailSelected(type) {
- $('#test_details_by_tag_container').empty();
- renderDetailsHeader();
+ refreshDetailsHeader();
renderTotalDetails(type);
ensureTotalDetailsAreVisible(type);
}
+
+function refreshDetailsHeader() {
+ $('#test_details_container').empty();
+ renderDetailsHeader();
+}
function renderDetailsByTag(tag) {
var tests = getTestsHavingTag(tag);
@@ -356,19 +358,19 @@
tag.totalTime = calculateTotalTime(tests);
}
$.tmpl(window.templates.tagDetails, tag).appendTo('#details_header');
-
$.tmpl(window.templates.testDetailsByTagTable).appendTo('#test_details_by_tag_container');
+
$.tmpl(window.templates.testDetailsByTagTable).appendTo('#test_details_container');
$.tmpl(window.templates.testDetailsRow,
tests).appendTo('#tests_by_tag');
}
function renderDetailsBySuite(name) {
var suite = testdata.suite().findSuiteByName(name);
$.tmpl(window.templates.suiteDetails,
suite).appendTo('#details_header');
-
$.tmpl(window.templates.testDetailsByTagTable).appendTo('#test_details_by_tag_container');
+
$.tmpl(window.templates.testDetailsByTagTable).appendTo('#test_details_container');
$.tmpl(window.templates.testDetailsRow,
suite.allTests()).appendTo('#tests_by_tag');
}
function renderTotalDetails(type) {
-
$.tmpl(window.templates.testDetailsByTagTable).appendTo('#test_details_by_tag_container');
+
$.tmpl(window.templates.testDetailsByTagTable).appendTo('#test_details_container');
$.tmpl(window.templates.testDetailsRow,
getTotalTests(type)).appendTo('#tests_by_tag');
}
@@ -391,7 +393,7 @@
}
}
-function showByHash() {
+function showDetailsByHash() {
hash = window.location.hash.substring(1);
if(hash.indexOf("suite_")==0){
suite = hash.substring("suite_".length);
==============================================================================
Revision: 3c5639ff0e61
Author: Jussi Malinen
Date: Fri Jun 3 11:42:51 2011
Log: hash links to critical and all tests work
http://code.google.com/p/robotframework/source/detail?r=3c5639ff0e61
Modified:
/src/robot/webcontent/report.html
=======================================
--- /src/robot/webcontent/report.html Fri Jun 3 11:33:54 2011
+++ /src/robot/webcontent/report.html Fri Jun 3 11:42:51 2011
@@ -370,6 +370,7 @@
}
function renderTotalDetails(type) {
+ $.tmpl(window.templates.totalDetails,
{type:type}).appendTo('#details_header');
$.tmpl(window.templates.testDetailsByTagTable).appendTo('#test_details_container');
$.tmpl(window.templates.testDetailsRow,
getTotalTests(type)).appendTo('#tests_by_tag');
}
@@ -403,6 +404,10 @@
tag = hash.substring("tag_".length);
tagDetailSelected(tag)
}
+ else if(hash.indexOf("total_")==0){
+ type = hash.substring("total_".length);
+ totalDetailSelected(type)
+ }
window.location.hash = window.location.hash.substring(1);
}
@@ -469,6 +474,7 @@
detailsHeader: $('#details_header').template(),
tagDetails: $('#tag_details').template(),
suiteDetails: $('#suite_details').template(),
+ totalDetails: $('#total_details').template(),
testDetailsByTagTable: $('#test_details_by_tag_table').template()
};
};
@@ -492,9 +498,9 @@
<tr>
<th>Status:</th>
{{if criticalFailed}}
- <td><a class="status_fail" href="#details_header"
onClick="totalDetailSelected('critical')">${criticalFailed} critical
test{{if criticalFailed != 1}}s{{/if}} failed</a></td>
+ <td><a class="status_fail" href="#total_Critical Tests"
onClick="totalDetailSelected('critical')">${criticalFailed} critical
test{{if criticalFailed != 1}}s{{/if}} failed</a></td>
{{else}}
- <td><a class="status_pass" href="#details_header"
onClick="totalDetailSelected('critical')">All critical tests passed</a></td>
+ <td><a class="status_pass" href="#total_Critical Tests"
onClick="totalDetailSelected('critical')">All critical tests passed</a></td>
{{/if}}
</tr>
{{if documentation}}
@@ -513,7 +519,7 @@
<tr>
<td class="col_stat_name">
<div class="stat_name">
- <span title="${doc}"><a href="#details_header"
onClick="totalDetailSelected('${label}')">${label}</a></span>
+ <span title="${doc}"><a href="#total_${label}"
onClick="totalDetailSelected('${label}')">${label}</a></span>
</div>
</td>
{{tmpl($data) '#stat_columns'}}
@@ -663,6 +669,10 @@
</tr>
</script>
+<script type="text/html" id="total_details">
+ <div id='total_${type}'></div>
+</script>
+
<script type="text/html" id="stats_message_partial_template">
${critical} critical test, ${criticalPassed} passed, <span
class="${criticalFailureClass}">${criticalFailed} failed</span><br
/>${total} test total, ${totalPassed} passed, <span
class="${totalFailureClass}">${totalFailed} failed</span>
</script>
==============================================================================
Revision: 3a37b6232a1e
Author: Jussi Malinen
Date: Fri Jun 3 11:50:36 2011
Log: cleanup
http://code.google.com/p/robotframework/source/detail?r=3a37b6232a1e
Modified:
/src/robot/webcontent/report.html
=======================================
--- /src/robot/webcontent/report.html Fri Jun 3 11:42:51 2011
+++ /src/robot/webcontent/report.html Fri Jun 3 11:50:36 2011
@@ -32,7 +32,7 @@
color: black;
}
/* Test by Suite/Tag Tables */
- table#tests_by_suite, table#tests_by_tag {
+ table#tests_by_suite, table#tests_detail_table {
width: 100%;
}
.col_name {
@@ -358,21 +358,23 @@
tag.totalTime = calculateTotalTime(tests);
}
$.tmpl(window.templates.tagDetails, tag).appendTo('#details_header');
-
$.tmpl(window.templates.testDetailsByTagTable).appendTo('#test_details_container');
- $.tmpl(window.templates.testDetailsRow,
tests).appendTo('#tests_by_tag');
+ drawTestDetailsTable(tests);
}
function renderDetailsBySuite(name) {
var suite = testdata.suite().findSuiteByName(name);
$.tmpl(window.templates.suiteDetails,
suite).appendTo('#details_header');
-
$.tmpl(window.templates.testDetailsByTagTable).appendTo('#test_details_container');
- $.tmpl(window.templates.testDetailsRow,
suite.allTests()).appendTo('#tests_by_tag');
+ drawTestDetailsTable(suite.allTests())
}
function renderTotalDetails(type) {
$.tmpl(window.templates.totalDetails,
{type:type}).appendTo('#details_header');
-
$.tmpl(window.templates.testDetailsByTagTable).appendTo('#test_details_container');
- $.tmpl(window.templates.testDetailsRow,
getTotalTests(type)).appendTo('#tests_by_tag');
+ drawTestDetailsTable(getTotalTests(type));
+}
+
+function drawTestDetailsTable(tests) {
+
$.tmpl(window.templates.testDetailsTable).appendTo('#test_details_container');
+ $.tmpl(window.templates.testDetailsRow,
tests).appendTo('#tests_detail_table');
}
function ensureTagDetailsAreVisible(name) {
@@ -475,7 +477,7 @@
tagDetails: $('#tag_details').template(),
suiteDetails: $('#suite_details').template(),
totalDetails: $('#total_details').template(),
- testDetailsByTagTable: $('#test_details_by_tag_table').template()
+ testDetailsTable: $('#test_details_table').template()
};
};
</script>
@@ -498,9 +500,9 @@
<tr>
<th>Status:</th>
{{if criticalFailed}}
- <td><a class="status_fail" href="#total_Critical Tests"
onClick="totalDetailSelected('critical')">${criticalFailed} critical
test{{if criticalFailed != 1}}s{{/if}} failed</a></td>
+ <td><a class="status_fail" href="#total_Critical Tests"
onClick="totalDetailSelected('Critical Tests')">${criticalFailed} critical
test{{if criticalFailed != 1}}s{{/if}} failed</a></td>
{{else}}
- <td><a class="status_pass" href="#total_Critical Tests"
onClick="totalDetailSelected('critical')">All critical tests passed</a></td>
+ <td><a class="status_pass" href="#total_Critical Tests"
onClick="totalDetailSelected('Critical Tests')">All critical tests
passed</a></td>
{{/if}}
</tr>
{{if documentation}}
@@ -677,8 +679,8 @@
${critical} critical test, ${criticalPassed} passed, <span
class="${criticalFailureClass}">${criticalFailed} failed</span><br
/>${total} test total, ${totalPassed} passed, <span
class="${totalFailureClass}">${totalFailed} failed</span>
</script>
-<script type="text/html" id="test_details_by_tag_table">
- <table id="tests_by_tag">
+<script type="text/html" id="test_details_table">
+ <table id="tests_detail_table">
<tr>
<th class="col_name">Name</th>
<th class="col_doc">Documentation</th>
==============================================================================
Revision: 5e10251b5850
Author: Jussi Malinen
Date: Fri Jun 3 11:55:49 2011
Log: error when selecting dropdown instruction row
http://code.google.com/p/robotframework/source/detail?r=5e10251b5850
Modified:
/src/robot/webcontent/report.html
=======================================
--- /src/robot/webcontent/report.html Fri Jun 3 11:50:36 2011
+++ /src/robot/webcontent/report.html Fri Jun 3 11:55:49 2011
@@ -328,6 +328,7 @@
}
function tagDetailSelected(name) {
+ if (name == "") return;
refreshDetailsHeader();
var alltags = window.testdata.statistics().tag;
var tag = findTagByName(name, alltags);
@@ -336,12 +337,14 @@
}
function suiteDetailSelected(name) {
+ if (name == "") return;
refreshDetailsHeader();
renderDetailsBySuite(name);
ensureSuiteDetailsAreVisible(name);
}
function totalDetailSelected(type) {
+ if (type == "") return;
refreshDetailsHeader();
renderTotalDetails(type);
ensureTotalDetailsAreVisible(type);
@@ -601,19 +604,19 @@
<th>Name:</th>
<td>
<select id="tag_detail_selector"
onchange="tagDetailSelected(this.options[this.selectedIndex].value);">
- <option>Select tag...</option>
+ <option value="">Select tag...</option>
{{each tags}}
<option value="${$value.label}">${$value.label}
${$value.shownInfo}</option>
{{/each}}
</select>
<select id="suite_detail_selector"
onchange="suiteDetailSelected(this.options[this.selectedIndex].value);">
- <option>Select suite...</option>
+ <option value="">Select suite...</option>
{{each suites}}
<option
value="${$value.fullname}">${$value.fullname}</option>
{{/each}}
</select>
<select id="total_detail_selector"
onchange="totalDetailSelected(this.options[this.selectedIndex].value);">
- <option>Select see to totals...</option>
+ <option value="">Select see to totals...</option>
<option value="All Tests">All tests</option>
<option value="Critical Tests">Critical tests</option>
</select>