Fix position of duration in both HTML reporters
This commit is contained in:
@@ -153,7 +153,6 @@ jasmineRequire.HtmlReporter = function(j$) {
|
||||
|
||||
jasmineDone(doneResult) {
|
||||
this.#stateBuilder.jasmineDone(doneResult);
|
||||
this.#alerts.addDuration(doneResult.totalTime);
|
||||
this.#banner.showOptionsMenu(this.#config);
|
||||
|
||||
if (
|
||||
@@ -424,10 +423,6 @@ jasmineRequire.AlertsView = function(j$) {
|
||||
this.rootEl = createDom('div', { className: 'jasmine-alert' });
|
||||
}
|
||||
|
||||
addDuration(ms) {
|
||||
this.#createAndAdd('jasmine-duration', 'finished in ' + ms / 1000 + 's');
|
||||
}
|
||||
|
||||
addSkipped(numExecuted, numDefined) {
|
||||
this.#createAndAdd(
|
||||
'jasmine-bar jasmine-skipped',
|
||||
@@ -1076,7 +1071,6 @@ jasmineRequire.HtmlReporterV2 = function(j$) {
|
||||
jasmineDone(doneResult) {
|
||||
this.#stateBuilder.jasmineDone(doneResult);
|
||||
this.#progress.rootEl.style.visibility = 'hidden';
|
||||
this.#alerts.addDuration(doneResult.totalTime);
|
||||
this.#banner.showOptionsMenu(this.#config);
|
||||
|
||||
if (
|
||||
@@ -1387,26 +1381,44 @@ jasmineRequire.OverallStatusBar = function(j$) {
|
||||
this.rootEl.classList.add('jasmine-failed');
|
||||
}
|
||||
|
||||
// Replace any existing children with the message
|
||||
this.rootEl.textContent = statusBarMessage;
|
||||
|
||||
const order = doneResult.order;
|
||||
if (order && order.random) {
|
||||
this.rootEl.appendChild(
|
||||
createDom(
|
||||
'span',
|
||||
{ className: 'jasmine-seed-bar' },
|
||||
', randomized with seed ',
|
||||
createDom(
|
||||
'a',
|
||||
{
|
||||
title: 'randomized with seed ' + order.seed,
|
||||
href: this.#urlBuilder.seedHref(order.seed)
|
||||
},
|
||||
order.seed
|
||||
)
|
||||
)
|
||||
);
|
||||
this.#addSeedBar(order);
|
||||
}
|
||||
|
||||
this.#addDuration(doneResult);
|
||||
}
|
||||
|
||||
#addSeedBar(order) {
|
||||
this.rootEl.appendChild(
|
||||
createDom(
|
||||
'span',
|
||||
{ className: 'jasmine-seed-bar' },
|
||||
', randomized with seed ',
|
||||
createDom(
|
||||
'a',
|
||||
{
|
||||
title: 'randomized with seed ' + order.seed,
|
||||
href: this.#urlBuilder.seedHref(order.seed)
|
||||
},
|
||||
order.seed
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
#addDuration(doneResult) {
|
||||
const secs = doneResult.totalTime / 1000;
|
||||
this.rootEl.appendChild(
|
||||
createDom(
|
||||
'span',
|
||||
{ className: 'jasmine-duration' },
|
||||
`finished in ${secs}s`
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@ body {
|
||||
float: right;
|
||||
line-height: 28px;
|
||||
padding-right: 9px;
|
||||
font-size: 11px;
|
||||
}
|
||||
.jasmine_html-reporter .jasmine-symbol-summary {
|
||||
overflow: hidden;
|
||||
|
||||
@@ -13,10 +13,6 @@ jasmineRequire.AlertsView = function(j$) {
|
||||
this.rootEl = createDom('div', { className: 'jasmine-alert' });
|
||||
}
|
||||
|
||||
addDuration(ms) {
|
||||
this.#createAndAdd('jasmine-duration', 'finished in ' + ms / 1000 + 's');
|
||||
}
|
||||
|
||||
addSkipped(numExecuted, numDefined) {
|
||||
this.#createAndAdd(
|
||||
'jasmine-bar jasmine-skipped',
|
||||
|
||||
@@ -108,7 +108,6 @@ jasmineRequire.HtmlReporter = function(j$) {
|
||||
|
||||
jasmineDone(doneResult) {
|
||||
this.#stateBuilder.jasmineDone(doneResult);
|
||||
this.#alerts.addDuration(doneResult.totalTime);
|
||||
this.#banner.showOptionsMenu(this.#config);
|
||||
|
||||
if (
|
||||
|
||||
@@ -128,7 +128,6 @@ jasmineRequire.HtmlReporterV2 = function(j$) {
|
||||
jasmineDone(doneResult) {
|
||||
this.#stateBuilder.jasmineDone(doneResult);
|
||||
this.#progress.rootEl.style.visibility = 'hidden';
|
||||
this.#alerts.addDuration(doneResult.totalTime);
|
||||
this.#banner.showOptionsMenu(this.#config);
|
||||
|
||||
if (
|
||||
|
||||
@@ -58,26 +58,44 @@ jasmineRequire.OverallStatusBar = function(j$) {
|
||||
this.rootEl.classList.add('jasmine-failed');
|
||||
}
|
||||
|
||||
// Replace any existing children with the message
|
||||
this.rootEl.textContent = statusBarMessage;
|
||||
|
||||
const order = doneResult.order;
|
||||
if (order && order.random) {
|
||||
this.rootEl.appendChild(
|
||||
createDom(
|
||||
'span',
|
||||
{ className: 'jasmine-seed-bar' },
|
||||
', randomized with seed ',
|
||||
createDom(
|
||||
'a',
|
||||
{
|
||||
title: 'randomized with seed ' + order.seed,
|
||||
href: this.#urlBuilder.seedHref(order.seed)
|
||||
},
|
||||
order.seed
|
||||
)
|
||||
)
|
||||
);
|
||||
this.#addSeedBar(order);
|
||||
}
|
||||
|
||||
this.#addDuration(doneResult);
|
||||
}
|
||||
|
||||
#addSeedBar(order) {
|
||||
this.rootEl.appendChild(
|
||||
createDom(
|
||||
'span',
|
||||
{ className: 'jasmine-seed-bar' },
|
||||
', randomized with seed ',
|
||||
createDom(
|
||||
'a',
|
||||
{
|
||||
title: 'randomized with seed ' + order.seed,
|
||||
href: this.#urlBuilder.seedHref(order.seed)
|
||||
},
|
||||
order.seed
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
#addDuration(doneResult) {
|
||||
const secs = doneResult.totalTime / 1000;
|
||||
this.rootEl.appendChild(
|
||||
createDom(
|
||||
'span',
|
||||
{ className: 'jasmine-duration' },
|
||||
`finished in ${secs}s`
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -104,6 +104,7 @@ body {
|
||||
float: right;
|
||||
line-height: $line-height * 2;
|
||||
padding-right: 9px;
|
||||
font-size: $font-size;
|
||||
}
|
||||
|
||||
//--- Symbol summary (v1 reporter) ---//
|
||||
|
||||
Reference in New Issue
Block a user