Fix position of duration in both HTML reporters

This commit is contained in:
Steve Gravrock
2025-10-18 09:58:55 -07:00
parent ea882c2f1e
commit 54ac39a192
7 changed files with 68 additions and 42 deletions

View File

@@ -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`
)
);
}
}