forked from rosa/hakurei
Compare commits
12 Commits
e5cd9a10b9
...
97d6fd9bfa
| Author | SHA1 | Date | |
|---|---|---|---|
|
97d6fd9bfa
|
|||
|
382df3191c
|
|||
|
fd66125fd8
|
|||
|
e95455c53c
|
|||
|
190141745e
|
|||
|
cd7108a138
|
|||
|
33acdccddc
|
|||
|
1e8fc8e20c
|
|||
|
96acdd696c
|
|||
|
90e7a63acc
|
|||
|
8541fdd1f4
|
|||
|
1ab3b697e5
|
@@ -290,7 +290,6 @@ 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;
|
||||
@@ -310,30 +309,13 @@ export class DOMReporter implements Reporter {
|
||||
child.appendChild(summary);
|
||||
parent.appendChild(child);
|
||||
}
|
||||
|
||||
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;
|
||||
if (result.state === "failure") child.open = true;
|
||||
if (!child.classList.contains("failure") &&
|
||||
(result.state !== "success" || !child.classList.contains("skip"))) {
|
||||
child.classList.add(result.state);
|
||||
}
|
||||
|
||||
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 {
|
||||
> summary::marker {
|
||||
content: url("/static/success-closed-white.svg");
|
||||
}
|
||||
&[open] > summary::marker {
|
||||
content: url("/static/success-open-white.svg");
|
||||
}
|
||||
> summary::marker {
|
||||
content: url("/static/success-closed-white.svg");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
* present in the DOM, so use duplicated versions.
|
||||
*/
|
||||
details.test-node.success {
|
||||
> summary::marker {
|
||||
content: url("/static/success-closed-black.svg");
|
||||
}
|
||||
&[open] > summary::marker {
|
||||
content: url("/static/success-open-black.svg");
|
||||
}
|
||||
> summary::marker {
|
||||
content: url("/static/success-closed-black.svg");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user