-
Notifications
You must be signed in to change notification settings - Fork 4k
/
quote.test.js.snap
213 lines (172 loc) · 5.8 KB
/
quote.test.js.snap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Quote can be converted to a pullquote 1`] = `
"<!-- wp:pullquote -->
<figure class=\\"wp-block-pullquote\\"><blockquote><p>one</p><p>two</p><cite>cite</cite></blockquote></figure>
<!-- /wp:pullquote -->"
`;
exports[`Quote can be converted to paragraphs and renders a paragraph for the cite, if it exists 1`] = `
"<!-- wp:paragraph -->
<p>one</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>two</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>cite</p>
<!-- /wp:paragraph -->"
`;
exports[`Quote can be converted to paragraphs and renders a void paragraph if both the cite and quote are void 1`] = `""`;
exports[`Quote can be converted to paragraphs and renders one paragraph block per <p> within quote 1`] = `
"<!-- wp:paragraph -->
<p>one</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>two</p>
<!-- /wp:paragraph -->"
`;
exports[`Quote can be converted to paragraphs and renders only one paragraph for the cite, if the quote is void 1`] = `
"<!-- wp:paragraph -->
<p>cite</p>
<!-- /wp:paragraph -->"
`;
exports[`Quote can be created by converting a heading 1`] = `
"<!-- wp:quote -->
<blockquote class=\\"wp-block-quote\\" id=\\"wp-test\\"><p>test</p></blockquote>
<!-- /wp:quote -->"
`;
exports[`Quote can be created by converting a paragraph 1`] = `
"<!-- wp:quote -->
<blockquote class=\\"wp-block-quote\\"><p>test</p></blockquote>
<!-- /wp:quote -->"
`;
exports[`Quote can be created by converting multiple paragraphs 1`] = `
"<!-- wp:quote -->
<blockquote class=\\"wp-block-quote\\"><p>one</p><p>two</p></blockquote>
<!-- /wp:quote -->"
`;
exports[`Quote can be created by typing "/quote" 1`] = `
"<!-- wp:quote -->
<blockquote class=\\"wp-block-quote\\"><p>I’m a quote</p></blockquote>
<!-- /wp:quote -->"
`;
exports[`Quote can be created by typing > in front of text of a paragraph block 1`] = `
"<!-- wp:quote -->
<blockquote class=\\"wp-block-quote\\"><p>test</p></blockquote>
<!-- /wp:quote -->"
`;
exports[`Quote can be created by using > at the start of a paragraph block 1`] = `
"<!-- wp:quote -->
<blockquote class=\\"wp-block-quote\\"><p>A quote</p><p>Another paragraph</p></blockquote>
<!-- /wp:quote -->"
`;
exports[`Quote can be merged into from a paragraph 1`] = `
"<!-- wp:quote -->
<blockquote class=\\"wp-block-quote\\"><p>test</p></blockquote>
<!-- /wp:quote -->"
`;
exports[`Quote can be split at the end and merged back 1`] = `
"<!-- wp:quote -->
<blockquote class=\\"wp-block-quote\\"><p>1</p></blockquote>
<!-- /wp:quote -->
<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->"
`;
exports[`Quote can be split at the end and merged back 2`] = `
"<!-- wp:quote -->
<blockquote class=\\"wp-block-quote\\"><p>1</p><p></p></blockquote>
<!-- /wp:quote -->"
`;
exports[`Quote can be split at the end and merged back 3`] = `
"<!-- wp:quote -->
<blockquote class=\\"wp-block-quote\\"><p>1</p></blockquote>
<!-- /wp:quote -->"
`;
exports[`Quote can be split in the middle and merged back 1`] = `
"<!-- wp:quote -->
<blockquote class=\\"wp-block-quote\\"><p>1</p><cite>c</cite></blockquote>
<!-- /wp:quote -->
<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->
<!-- wp:quote -->
<blockquote class=\\"wp-block-quote\\"><p>2</p><cite>c</cite></blockquote>
<!-- /wp:quote -->"
`;
exports[`Quote can be split in the middle and merged back 2`] = `
"<!-- wp:quote -->
<blockquote class=\\"wp-block-quote\\"><p>1</p><p></p><cite>c</cite></blockquote>
<!-- /wp:quote -->
<!-- wp:quote -->
<blockquote class=\\"wp-block-quote\\"><p>2</p><cite>c</cite></blockquote>
<!-- /wp:quote -->"
`;
exports[`Quote can be split in the middle and merged back 3`] = `
"<!-- wp:quote -->
<blockquote class=\\"wp-block-quote\\"><p>1</p><cite>c</cite></blockquote>
<!-- /wp:quote -->
<!-- wp:quote -->
<blockquote class=\\"wp-block-quote\\"><p>2</p><cite>c</cite></blockquote>
<!-- /wp:quote -->"
`;
exports[`Quote can be split in the middle and merged back 4`] = `
"<!-- wp:quote -->
<blockquote class=\\"wp-block-quote\\"><p>1</p><p>2</p><cite>c</cite></blockquote>
<!-- /wp:quote -->"
`;
exports[`Quote is transformed to a heading and a quote if the quote contains a citation 1`] = `
"<!-- wp:heading -->
<h2 id=\\"wp-one\\">one</h2>
<!-- /wp:heading -->
<!-- wp:quote -->
<blockquote class=\\"wp-block-quote\\"><p></p><cite>cite</cite></blockquote>
<!-- /wp:quote -->"
`;
exports[`Quote is transformed to a heading and a quote if the quote contains multiple paragraphs 1`] = `
"<!-- wp:heading -->
<h2 id=\\"wp-one\\">one</h2>
<!-- /wp:heading -->
<!-- wp:quote -->
<blockquote class=\\"wp-block-quote\\"><p>two</p><p>three</p></blockquote>
<!-- /wp:quote -->"
`;
exports[`Quote is transformed to a heading if the quote just contains one paragraph 1`] = `
"<!-- wp:heading -->
<h2 id=\\"wp-one\\">one</h2>
<!-- /wp:heading -->"
`;
exports[`Quote is transformed to an empty heading if the quote is empty 1`] = `
"<!-- wp:heading -->
<h2></h2>
<!-- /wp:heading -->"
`;
exports[`Quote the resuling quote after transforming to a heading can be transformed again 1`] = `
"<!-- wp:heading -->
<h2 id=\\"wp-one\\">one</h2>
<!-- /wp:heading -->
<!-- wp:quote -->
<blockquote class=\\"wp-block-quote\\"><p>two</p><cite>cite</cite></blockquote>
<!-- /wp:quote -->"
`;
exports[`Quote the resuling quote after transforming to a heading can be transformed again 2`] = `
"<!-- wp:heading -->
<h2 id=\\"wp-one\\">one</h2>
<!-- /wp:heading -->
<!-- wp:heading -->
<h2 id=\\"wp-two\\">two</h2>
<!-- /wp:heading -->
<!-- wp:quote -->
<blockquote class=\\"wp-block-quote\\"><p></p><cite>cite</cite></blockquote>
<!-- /wp:quote -->"
`;
exports[`Quote the resuling quote after transforming to a heading can be transformed again 3`] = `
"<!-- wp:heading -->
<h2 id=\\"wp-one\\">one</h2>
<!-- /wp:heading -->
<!-- wp:heading -->
<h2 id=\\"wp-two\\">two</h2>
<!-- /wp:heading -->
<!-- wp:heading -->
<h2 id=\\"wp-cite\\">cite</h2>
<!-- /wp:heading -->"
`;