Skip to content

Commit fbb6a9e

Browse files
committed
test: split out portable text fixtures
1 parent 0b18069 commit fbb6a9e

File tree

10 files changed

+483
-476
lines changed

10 files changed

+483
-476
lines changed
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
export const adjacentLists = [
2+
{
3+
_type: 'block',
4+
_key: 'eaaff9001d58',
5+
style: 'normal',
6+
markDefs: [],
7+
children: [
8+
{
9+
_type: 'span',
10+
_key: '4440ea891a28',
11+
text: 'item',
12+
marks: [],
13+
},
14+
],
15+
level: 1,
16+
listItem: 'bullet',
17+
},
18+
{
19+
_type: 'block',
20+
_key: '6a09faddaaa7',
21+
style: 'normal',
22+
markDefs: [],
23+
children: [
24+
{
25+
_type: 'span',
26+
_key: 'b75282293981',
27+
text: 'item',
28+
marks: [],
29+
},
30+
],
31+
level: 1,
32+
listItem: 'bullet',
33+
},
34+
{
35+
_type: 'block',
36+
_key: '52869db6c040',
37+
style: 'normal',
38+
markDefs: [],
39+
children: [
40+
{
41+
_type: 'span',
42+
_key: 'edcc77e18c09',
43+
text: 'item',
44+
marks: [],
45+
},
46+
],
47+
level: 1,
48+
listItem: 'bullet',
49+
},
50+
{
51+
_type: 'block',
52+
_key: '15f5136c8810',
53+
style: 'normal',
54+
markDefs: [],
55+
children: [
56+
{
57+
_type: 'span',
58+
_key: '0c0897ad8490',
59+
text: 'item',
60+
marks: [],
61+
},
62+
],
63+
level: 1,
64+
listItem: 'number',
65+
},
66+
{
67+
_type: 'block',
68+
_key: '8d9673a59e12',
69+
style: 'normal',
70+
markDefs: [],
71+
children: [
72+
{
73+
_type: 'span',
74+
_key: 'b00c2547a438',
75+
text: 'item',
76+
marks: [],
77+
},
78+
],
79+
level: 1,
80+
listItem: 'number',
81+
},
82+
{
83+
_type: 'block',
84+
_key: 'ef73df2f2879',
85+
style: 'normal',
86+
markDefs: [],
87+
children: [
88+
{
89+
_type: 'span',
90+
_key: 'c6e5d952a160',
91+
text: 'item',
92+
marks: [],
93+
},
94+
],
95+
level: 1,
96+
listItem: 'number',
97+
},
98+
]
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
export const blockquote = {
2+
_key: 'd810da8ac845',
3+
_type: 'block',
4+
children: [
5+
{
6+
_key: 'd810da8ac8450',
7+
_type: 'span',
8+
marks: [],
9+
text: 'Build your next Vue.js application with confidence using ',
10+
},
11+
{
12+
_key: 'd810da8ac8451',
13+
_type: 'span',
14+
marks: [
15+
'c9c6224401ba',
16+
],
17+
text: 'NuxtJS',
18+
},
19+
{
20+
_key: 'd810da8ac8452',
21+
_type: 'span',
22+
marks: [],
23+
text: '. An open source framework making web development simple and powerful.',
24+
},
25+
],
26+
markDefs: [
27+
{
28+
_key: 'c9c6224401ba',
29+
_type: 'link',
30+
href: 'https://nuxtjs.org',
31+
},
32+
],
33+
style: 'blockquote',
34+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
export const customBlockTypes = {
2+
_key: 'd810da8ac845',
3+
_type: 'block',
4+
children: [
5+
{
6+
_key: 'd810da8ac8450',
7+
_type: 'span',
8+
marks: [],
9+
text: 'An example of ',
10+
},
11+
{
12+
_key: '7dc51c030a2f',
13+
_type: 'customIcon',
14+
icon: 'cog',
15+
text: 'custom',
16+
},
17+
{
18+
_key: '230498a',
19+
_type: 'span',
20+
marks: [],
21+
text: ' block types.',
22+
},
23+
],
24+
markDefs: [],
25+
style: 'normal',
26+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
export * from './adjacent-list'
2+
export * from './blockquote'
3+
export * from './custom-block-types'
4+
export * from './list'
5+
export * from './mark-defs'
6+
export * from './nested-list'
7+
export * from './nested-list-2'
8+
export * from './strong'
9+
10+
export const link = {
11+
_type: 'link',
12+
href: 'http://test.com/',
13+
}
14+
15+
export const heading = {
16+
_key: 'b1905c55df85',
17+
_type: 'block',
18+
children: [
19+
{
20+
_key: 'b1905c55df850',
21+
_type: 'span',
22+
marks: [],
23+
text: '3. Providing your personal data to others',
24+
},
25+
],
26+
markDefs: [],
27+
style: 'h3',
28+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
export const list = [
2+
{
3+
_type: 'block',
4+
_key: 'a6cec1a2a738',
5+
style: 'normal',
6+
markDefs: [],
7+
children: [
8+
{
9+
_type: 'span',
10+
_key: 'b39d8ec32f27',
11+
text: 'test',
12+
marks: [],
13+
},
14+
],
15+
level: 1,
16+
listItem: 'number',
17+
},
18+
{
19+
_type: 'block',
20+
_key: '5917a3f6485d',
21+
style: 'normal',
22+
markDefs: [],
23+
children: [
24+
{
25+
_type: 'span',
26+
_key: 'aaa0e0ab720a',
27+
text: 'thing',
28+
marks: [],
29+
},
30+
],
31+
level: 1,
32+
listItem: 'number',
33+
},
34+
]
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
export const exampleMarkDefs = {
2+
_key: '3522a2a863b9',
3+
_type: 'block',
4+
children: [
5+
{
6+
_key: '3522a2a863b90',
7+
_type: 'span',
8+
marks: ['strong'],
9+
text: 'Google Analytics',
10+
},
11+
{
12+
_key: '3522a2a863b91',
13+
_type: 'span',
14+
marks: [],
15+
text:
16+
': The Sites use Google Analytics. Further information is available at ',
17+
},
18+
{
19+
_key: '3522a2a863b92',
20+
_type: 'span',
21+
marks: ['71968b05862f'],
22+
text: 'https://tools.google.com/dlpage/gaoptout/',
23+
},
24+
{
25+
_key: '3522a2a863b93',
26+
_type: 'span',
27+
marks: [],
28+
text: '.',
29+
},
30+
],
31+
level: 1,
32+
listItem: 'bullet',
33+
markDefs: [
34+
{
35+
_key: '71968b05862f',
36+
_type: 'link',
37+
href: 'https://tools.google.com/dlpage/gaoptout/',
38+
},
39+
],
40+
style: 'normal',
41+
}
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
export const evenMoreNestedList = [
2+
{
3+
_key: 'ef73df2f2879',
4+
_type: 'block',
5+
children: [
6+
{
7+
_key: 'c6e5d952a160',
8+
_type: 'span',
9+
marks: [],
10+
text: '1. Top level',
11+
},
12+
],
13+
level: 1,
14+
listItem: 'number',
15+
markDefs: [],
16+
style: 'normal',
17+
},
18+
{
19+
_key: 'de0a206f4585',
20+
_type: 'block',
21+
children: [
22+
{
23+
_key: '37e2c4f12734',
24+
_type: 'span',
25+
marks: [],
26+
text: 'a. Second level',
27+
},
28+
],
29+
level: 2,
30+
listItem: 'number',
31+
markDefs: [],
32+
style: 'normal',
33+
},
34+
{
35+
_key: 'ff34dfbe4cef',
36+
_type: 'block',
37+
children: [
38+
{
39+
_key: '00c289997101',
40+
_type: 'span',
41+
marks: [],
42+
text: 'i. Third level',
43+
},
44+
],
45+
level: 3,
46+
listItem: 'number',
47+
markDefs: [],
48+
style: 'normal',
49+
},
50+
{
51+
_key: 'e79ba2560bba',
52+
_type: 'block',
53+
children: [
54+
{
55+
_key: 'cedad6fc0ce3',
56+
_type: 'span',
57+
marks: [],
58+
text: 'b. Second level',
59+
},
60+
],
61+
level: 2,
62+
listItem: 'number',
63+
markDefs: [],
64+
style: 'normal',
65+
},
66+
{
67+
_key: 'ef1ceb2dbd53',
68+
_type: 'block',
69+
children: [
70+
{
71+
_key: '68c7856c32c9',
72+
_type: 'span',
73+
marks: [],
74+
text: '2. Top level',
75+
},
76+
],
77+
level: 1,
78+
listItem: 'number',
79+
markDefs: [],
80+
style: 'normal',
81+
},
82+
{
83+
_key: 'f6995c48f359',
84+
_type: 'block',
85+
children: [
86+
{
87+
_key: 'a011caafa3df',
88+
_type: 'span',
89+
marks: [],
90+
text: 'a. Second level',
91+
},
92+
],
93+
level: 2,
94+
listItem: 'number',
95+
markDefs: [],
96+
style: 'normal',
97+
},
98+
]

0 commit comments

Comments
 (0)