Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

Commit

Permalink
Adapt tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nchevobbe committed Mar 16, 2018
1 parent 858a9a0 commit 43aa5cf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,8 @@ exports[`ObjectInspector - dimTopLevelWindow renders collapsed top-level window
className="node object-node"
onClick={[Function]}
>
<i
<img
className="arrow"
dangerouslySetInnerHTML={
Object {
"__html": "<svg></svg>",
}
}
src={null}
/>
<span
className="object-label"
Expand Down Expand Up @@ -98,14 +92,8 @@ exports[`ObjectInspector - dimTopLevelWindow renders collapsed top-level window
className="node object-node lessen"
onClick={[Function]}
>
<i
<img
className="arrow"
dangerouslySetInnerHTML={
Object {
"__html": "<svg></svg>",
}
}
src={null}
/>
<span
className="object-label"
Expand Down Expand Up @@ -164,14 +152,8 @@ exports[`ObjectInspector - dimTopLevelWindow renders expanded top-level window w
className="node object-node"
onClick={[Function]}
>
<i
<img
className="arrow expanded"
dangerouslySetInnerHTML={
Object {
"__html": "<svg></svg>",
}
}
src={null}
/>
<span
className="object-label"
Expand Down Expand Up @@ -230,14 +212,8 @@ exports[`ObjectInspector - dimTopLevelWindow renders sub-level window 1`] = `
className="node object-node"
onClick={[Function]}
>
<i
<img
className="arrow expanded"
dangerouslySetInnerHTML={
Object {
"__html": "<svg></svg>",
}
}
src={null}
/>
<span
className="object-label"
Expand All @@ -264,14 +240,8 @@ exports[`ObjectInspector - dimTopLevelWindow renders sub-level window 1`] = `
className="node object-node"
onClick={[Function]}
>
<i
<img
className="arrow"
dangerouslySetInnerHTML={
Object {
"__html": "<svg></svg>",
}
}
src={null}
/>
<span
className="object-label"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ function formatObjectInspector(wrapper: Object) {
return wrapper.find(".tree-node")
.map(node => {
const indentStr = "| ".repeat((node.prop("aria-level") || 1) - 1);
// We need to target i.arrow or Enzyme will also match the ArrowExpander component.
const arrow = node.find("i.arrow");
// Need to target img.arrow or Enzyme will also match the ArrowExpander component.
const arrow = node.find("img.arrow");
let arrowStr = " ";
if (arrow.exists()) {
arrowStr = arrow.hasClass("expanded") ? "▼ " : "▶︎ ";
Expand Down

0 comments on commit 43aa5cf

Please sign in to comment.