Collapse arrays and objects in json view #363
Annotations
3 errors
|
src/components/Json/Json.test.tsx > Json Component > renders nested objects:
src/components/Json/Json.test.tsx#L33
TestingLibraryElementError: Unable to find an element with the text: null. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div>
<div
class="_json_92b7cc"
>
<div
class="_clickable_92b7cc"
>
<span
class="_drill_92b7cc"
>
▼
</span>
<span
class="_object_92b7cc"
>
{
</span>
</div>
<ul>
<li>
<div
class="_json_92b7cc"
>
<div
class="_clickable_92b7cc"
>
<span
class="_drill_92b7cc"
>
▼
</span>
<span
class="_key_92b7cc"
>
obj
:
</span>
<span
class="_object_92b7cc"
>
{
</span>
</div>
<ul>
<li>
<div
class="_json_92b7cc"
>
<div
class="_clickable_92b7cc"
>
<span
class="_drill_92b7cc"
>
▶
</span>
<span
class="_key_92b7cc"
>
arr
:
</span>
<span
class="_array_92b7cc"
>
[
</span>
<span
class="_array_92b7cc"
>
<span
class="_number_92b7cc"
>
314
</span>
<span>
,
</span>
<span>
...
</span>
</span>
<span
class="_array_92b7cc"
>
]
</span>
<span
class="_comment_92b7cc"
>
length: 2
</span>
</div>
</div>
</li>
</ul>
<div
class="_object_92b7cc"
>
}
</div>
</div>
</li>
</ul>
<div
class="_object_92b7cc"
>
}
</div>
</div>
</div>
</body>
❯ Object.getElementError node_modules/@testing-library/dom/dist/config.js:37:19
❯ node_modules/@testing-library/dom/dist/query-helpers.js:76:38
❯ node_modules/@testing-library/dom/dist/query-helpers.js:52:17
❯ node_modules/@testing-library/dom/dist/query-helpers.js:95:19
❯ src/components/Json/Json.test.tsx:33:12
|
|
src/components/Json/Json.test.tsx > Json Component > toggles array collapse state:
src/components/Json/Json.test.tsx#L40
TestingLibraryElementError: Unable to find an element with the text: ▼. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div>
<div
class="_json_92b7cc"
>
<div
class="_clickable_92b7cc"
>
<span
class="_drill_92b7cc"
>
▶
</span>
<span
class="_array_92b7cc"
>
[
</span>
<span
class="_array_92b7cc"
>
<span
class="_string_92b7cc"
>
"foo"
</span>
<span>
,
</span>
<span
class="_string_92b7cc"
>
"bar"
</span>
</span>
<span
class="_array_92b7cc"
>
]
</span>
</div>
</div>
</div>
</body>
❯ Object.getElementError node_modules/@testing-library/dom/dist/config.js:37:19
❯ node_modules/@testing-library/dom/dist/query-helpers.js:76:38
❯ node_modules/@testing-library/dom/dist/query-helpers.js:52:17
❯ node_modules/@testing-library/dom/dist/query-helpers.js:95:19
❯ src/components/Json/Json.test.tsx:40:21
|
|
test
Process completed with exit code 1.
|