forked from rosa/hakurei
Compare commits
12 Commits
97d6fd9bfa
...
e5cd9a10b9
| Author | SHA1 | Date | |
|---|---|---|---|
|
e5cd9a10b9
|
|||
|
f84cbd492d
|
|||
|
16186882bf
|
|||
|
5d57b8e0fc
|
|||
|
bc39688aa3
|
|||
|
a462583783
|
|||
|
aabddddc89
|
|||
|
f12c74e77b
|
|||
|
550fd6f724
|
|||
|
cd46234892
|
|||
|
7697f44d94
|
|||
|
66c391d2eb
|
@@ -290,6 +290,7 @@ export class DOMReporter implements Reporter {
|
||||
}
|
||||
const counter = document.getElementById(`${result.state}-counter`);
|
||||
counter.innerText = (Number(counter.innerText) + 1).toString();
|
||||
|
||||
let parent = document.getElementById("root");
|
||||
for (const node of path) {
|
||||
let child = null;
|
||||
@@ -309,13 +310,30 @@ export class DOMReporter implements Reporter {
|
||||
child.appendChild(summary);
|
||||
parent.appendChild(child);
|
||||
}
|
||||
if (result.state === "failure") child.open = true;
|
||||
if (!child.classList.contains("failure") &&
|
||||
(result.state !== "success" || !child.classList.contains("skip"))) {
|
||||
child.classList.add(result.state);
|
||||
|
||||
switch (result.state) {
|
||||
case "failure":
|
||||
child.open = true;
|
||||
child.classList.add("failure");
|
||||
child.classList.remove("skip");
|
||||
child.classList.remove("success");
|
||||
break;
|
||||
case "skip":
|
||||
if (child.classList.contains("failure")) break;
|
||||
child.classList.add("skip");
|
||||
child.classList.remove("success");
|
||||
break;
|
||||
case "success":
|
||||
if (!(child.classList.contains("failure") ||
|
||||
child.classList.contains("skip"))) {
|
||||
child.classList.add("success")
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
parent = child;
|
||||
}
|
||||
|
||||
const p = document.createElement("p");
|
||||
p.classList.add("test-desc");
|
||||
if (result.logs.length) {
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
* present in the DOM, so use duplicated versions.
|
||||
*/
|
||||
details.test-node.success {
|
||||
&[open] > summary::marker {
|
||||
content: url("/static/success-open-white.svg");
|
||||
}
|
||||
> summary::marker {
|
||||
content: url("/static/success-closed-white.svg");
|
||||
}
|
||||
&[open] > summary::marker {
|
||||
content: url("/static/success-open-white.svg");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
* present in the DOM, so use duplicated versions.
|
||||
*/
|
||||
details.test-node.success {
|
||||
&[open] > summary::marker {
|
||||
content: url("/static/success-open-black.svg");
|
||||
}
|
||||
> summary::marker {
|
||||
content: url("/static/success-closed-black.svg");
|
||||
}
|
||||
&[open] > summary::marker {
|
||||
content: url("/static/success-open-black.svg");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user