Skip to content

Commit d6313f3

Browse files
authored
test: rewrite all tests because of deprecated lib (#533)
* test: rewrite all tests because of deprecated lib (WIP) Migrating to @testing-library/react isn't straighforward ... * test: rewrite all tests because of deprecated lib (WIP) * test: rewrite all tests because of deprecated lib (WIP) * test: rewrite all tests because of deprecated lib (WIP) * test: rewrite all tests because of deprecated lib (WIP) * test: rewrite all tests because of deprecated lib * style: fix styling
1 parent 2f44601 commit d6313f3

37 files changed

+8172
-13959
lines changed

__tests__/JSONSchemaViewer/__snapshots__/array.test.tsx.snap

Lines changed: 1058 additions & 1514 deletions
Large diffs are not rendered by default.
Lines changed: 46 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,59 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`JSONSchemaViewer - basics tests Can render Schema title 1`] = `
4-
<details
5-
className="json-schema-viewer"
6-
open={true}
7-
>
8-
<summary>
9-
<strong>
10-
My Super Schema
11-
</strong>
12-
</summary>
13-
<div>
14-
<div>
4+
<DocumentFragment>
5+
<details
6+
class="json-schema-viewer"
7+
open=""
8+
>
9+
<summary>
1510
<strong>
16-
type
11+
My Super Schema
1712
</strong>
18-
 : 
19-
<span
20-
style={
21-
{
22-
"opacity": "0.6",
23-
}
24-
}
25-
>
26-
boolean
27-
</span>
28-
<div
29-
style={
30-
{
31-
"marginTop": "var(--ifm-table-cell-padding)",
32-
}
33-
}
34-
/>
13+
</summary>
14+
<div>
15+
<div>
16+
<strong>
17+
type
18+
</strong>
19+
 : 
20+
<span
21+
style="opacity: 0.6;"
22+
>
23+
boolean
24+
</span>
25+
<div />
26+
</div>
3527
</div>
36-
</div>
37-
</details>
28+
</details>
29+
</DocumentFragment>
3830
`;
3931

4032
exports[`JSONSchemaViewer - basics tests Can render a simple schema 1`] = `
41-
<details
42-
className="json-schema-viewer"
43-
open={true}
44-
>
45-
<summary>
46-
<strong>
47-
Schema
48-
</strong>
49-
</summary>
50-
<div>
51-
<div>
33+
<DocumentFragment>
34+
<details
35+
class="json-schema-viewer"
36+
open=""
37+
>
38+
<summary>
5239
<strong>
53-
type
40+
Schema
5441
</strong>
55-
 : 
56-
<span
57-
style={
58-
{
59-
"opacity": "0.6",
60-
}
61-
}
62-
>
63-
boolean
64-
</span>
65-
<div
66-
style={
67-
{
68-
"marginTop": "var(--ifm-table-cell-padding)",
69-
}
70-
}
71-
/>
42+
</summary>
43+
<div>
44+
<div>
45+
<strong>
46+
type
47+
</strong>
48+
 : 
49+
<span
50+
style="opacity: 0.6;"
51+
>
52+
boolean
53+
</span>
54+
<div />
55+
</div>
7256
</div>
73-
</div>
74-
</details>
57+
</details>
58+
</DocumentFragment>
7559
`;
Lines changed: 72 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,112 +1,90 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`JSONSchemaViewer - Boolean type test 0 1`] = `
4-
<details
5-
className="json-schema-viewer"
6-
open={true}
7-
>
8-
<summary>
9-
<strong>
10-
Schema
11-
</strong>
12-
</summary>
13-
<div>
14-
<div>
4+
<DocumentFragment>
5+
<details
6+
class="json-schema-viewer"
7+
open=""
8+
>
9+
<summary>
1510
<strong>
16-
type
11+
Schema
1712
</strong>
18-
 : 
19-
<span
20-
style={
21-
{
22-
"opacity": "0.6",
23-
}
24-
}
25-
>
26-
boolean
27-
</span>
28-
<div
29-
style={
30-
{
31-
"marginTop": "var(--ifm-table-cell-padding)",
32-
}
33-
}
34-
/>
13+
</summary>
14+
<div>
15+
<div>
16+
<strong>
17+
type
18+
</strong>
19+
 : 
20+
<span
21+
style="opacity: 0.6;"
22+
>
23+
boolean
24+
</span>
25+
<div />
26+
</div>
3527
</div>
36-
</div>
37-
</details>
28+
</details>
29+
</DocumentFragment>
3830
`;
3931

4032
exports[`JSONSchemaViewer - Boolean type test 1 1`] = `
41-
<details
42-
className="json-schema-viewer"
43-
open={true}
44-
>
45-
<summary>
46-
<strong>
47-
Schema
48-
</strong>
49-
</summary>
50-
<div>
51-
<div>
33+
<DocumentFragment>
34+
<details
35+
class="json-schema-viewer"
36+
open=""
37+
>
38+
<summary>
5239
<strong>
53-
type
40+
Schema
5441
</strong>
55-
 : 
56-
<span
57-
style={
58-
{
59-
"opacity": "0.6",
60-
}
61-
}
62-
>
63-
boolean
64-
</span>
65-
<div
66-
style={
67-
{
68-
"marginTop": "var(--ifm-table-cell-padding)",
69-
}
70-
}
71-
>
42+
</summary>
43+
<div>
44+
<div>
45+
<strong>
46+
type
47+
</strong>
48+
 : 
49+
<span
50+
style="opacity: 0.6;"
51+
>
52+
boolean
53+
</span>
7254
<div>
73-
<strong>
74-
Possible values :
75-
</strong>
76-
 
77-
<ul>
78-
<li>
79-
<code>
80-
true
81-
</code>
82-
</li>
83-
<li>
84-
<code>
85-
false
86-
</code>
87-
</li>
88-
</ul>
55+
<div>
56+
<strong>
57+
Possible values :
58+
</strong>
59+
 
60+
<ul>
61+
<li>
62+
<code>
63+
true
64+
</code>
65+
</li>
66+
<li>
67+
<code>
68+
false
69+
</code>
70+
</li>
71+
</ul>
72+
</div>
73+
<div>
74+
<strong>
75+
Default value :
76+
</strong>
77+
 
78+
<code>
79+
false
80+
</code>
81+
</div>
8982
</div>
9083
<div>
91-
<strong>
92-
Default value :
93-
</strong>
94-
 
95-
<code>
96-
false
97-
</code>
84+
Boolean without the explicit type
9885
</div>
9986
</div>
100-
<div
101-
style={
102-
{
103-
"marginTop": "var(--ifm-table-cell-padding)",
104-
}
105-
}
106-
>
107-
Boolean without the explict type
108-
</div>
10987
</div>
110-
</div>
111-
</details>
88+
</details>
89+
</DocumentFragment>
11290
`;

0 commit comments

Comments
 (0)