Collapse arrays and objects in json view #365
Annotations
5 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
|
|
src/components/Json/Json.test.tsx > Json Component > toggles object collapse state:
src/components/Json/Json.test.tsx#L51
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="_object_92b7cc"
>
{
</span>
<span
class="_object_92b7cc"
>
<span
class="_key_92b7cc"
>
key
:
</span>
<span
class="_string_92b7cc"
>
"value"
</span>
</span>
<span
class="_object_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:51:21
|
|
src/components/JsonView/JsonView.test.tsx > JsonView Component > renders json content as nested lists:
src/components/JsonView/JsonView.test.tsx#L37
AssertionError: promise rejected "TestingLibraryElementError: Unable to fin…" instead of resolving
❯ src/components/JsonView/JsonView.test.tsx:37:36
Caused by: Caused by: TestingLibraryElementError: Unable to find role="list"
Ignored nodes: comments, script, style
<body>
<div>
<div
class="_contentWrapper_5e7fa5"
>
<header>
<span
title="15 bytes"
>
15 b
</span>
</header>
<code
class="_jsonView_92b7cc"
>
<div
class="_json_92b7cc"
>
<div
class="_clickable_92b7cc"
>
<span
class="_drill_92b7cc"
>
▶
</span>
<span
class="_object_92b7cc"
>
{
</span>
<span
class="_object_92b7cc"
>
<span
class="_key_92b7cc"
>
key
:
</span>
<span
class="_string_92b7cc"
>
"value"
</span>
</span>
<span
class="_object_92b7cc"
>
}
</span>
</div>
</div>
</code>
</div>
</div>
</body>
Ignored nodes: comments, script, style
<body>
<div>
<div
class="_contentWrapper_5e7fa5"
>
<header>
<span
title="15 bytes"
>
15 b
</span>
</header>
<code
class="_jsonView_92b7cc"
>
<div
class="_json_92b7cc"
>
<div
class="_clickable_92b7cc"
>
<span
class="_drill_92b7cc"
>
▶
</span>
<span
class="_object_92b7cc"
>
{
</span>
<span
class="_object_92b7cc"
>
<span
class="_key_92b7cc"
>
key
:
</span>
<span
class="_string_92b7cc"
>
"value"
</span>
</span>
<span
class="_object_92b7cc"
>
}
</span>
</div>
</div>
</code>
</div>
</div>
</body>
❯ waitForWrapper node_modules/@testing-library/dom/dist/wait-for.js:163:27
❯ node_modules/@testing-library/dom/dist/query-helpers.js:86:33
❯ src/components/JsonView/JsonView.test.tsx:37:18
|
|
test
Process completed with exit code 1.
|