Skip to content

Commit e613254

Browse files
committed
Fixes
1 parent 175ad13 commit e613254

File tree

3 files changed

+358
-25
lines changed

3 files changed

+358
-25
lines changed

tests/src/unit/core/formatConversion/exportParseEquality/exportParseEqualityTestInstances.ts

+27
Original file line numberDiff line numberDiff line change
@@ -174,4 +174,31 @@ export const exportParseEqualityTestInstancesHTML: TestInstance<
174174
},
175175
executeTest: testExportParseEqualityHTML,
176176
},
177+
// TODO: Tests failing
178+
// {
179+
// testCase: {
180+
// name: "lists/nested",
181+
// content: [
182+
// {
183+
// type: "bulletListItem",
184+
// content: "List Item 1",
185+
// children: [
186+
// {
187+
// type: "bulletListItem",
188+
// content: "Nested List Item 1",
189+
// },
190+
// {
191+
// type: "bulletListItem",
192+
// content: "Nested List Item 2",
193+
// },
194+
// ],
195+
// },
196+
// {
197+
// type: "bulletListItem",
198+
// content: "List Item 2",
199+
// },
200+
// ],
201+
// },
202+
// executeTest: testExportParseEqualityHTML,
203+
// },
177204
];

tests/src/unit/core/formatConversion/parse/__snapshots__/html/googleDocs.json

+122-25
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
{
66
"styles": {
77
"bold": true,
8+
"textColor": "rgb(0, 0, 0)",
89
},
910
"text": "Heading 1",
1011
"type": "text",
@@ -25,6 +26,7 @@
2526
{
2627
"styles": {
2728
"bold": true,
29+
"textColor": "rgb(0, 0, 0)",
2830
},
2931
"text": "Heading 2",
3032
"type": "text",
@@ -45,6 +47,7 @@
4547
{
4648
"styles": {
4749
"bold": true,
50+
"textColor": "rgb(0, 0, 0)",
4851
},
4952
"text": "Heading 3",
5053
"type": "text",
@@ -63,7 +66,9 @@
6366
"children": [],
6467
"content": [
6568
{
66-
"styles": {},
69+
"styles": {
70+
"textColor": "rgb(0, 0, 0)",
71+
},
6772
"text": "Paragraph 1",
6873
"type": "text",
6974
},
@@ -80,7 +85,9 @@
8085
"children": [],
8186
"content": [
8287
{
83-
"styles": {},
88+
"styles": {
89+
"textColor": "rgb(0, 0, 0)",
90+
},
8491
"text": "Paragraph 2",
8592
"type": "text",
8693
},
@@ -97,7 +104,9 @@
97104
"children": [],
98105
"content": [
99106
{
100-
"styles": {},
107+
"styles": {
108+
"textColor": "rgb(0, 0, 0)",
109+
},
101110
"text": "Paragraph 3",
102111
"type": "text",
103112
},
@@ -114,7 +123,9 @@
114123
"children": [],
115124
"content": [
116125
{
117-
"styles": {},
126+
"styles": {
127+
"textColor": "rgb(0, 0, 0)",
128+
},
118129
"text": "Paragraph With
119130
Hard Break",
120131
"type": "text",
@@ -134,36 +145,45 @@ Hard Break",
134145
{
135146
"styles": {
136147
"bold": true,
148+
"textColor": "rgb(0, 0, 0)",
137149
},
138150
"text": "Bold",
139151
"type": "text",
140152
},
141153
{
142-
"styles": {},
154+
"styles": {
155+
"textColor": "rgb(0, 0, 0)",
156+
},
143157
"text": " ",
144158
"type": "text",
145159
},
146160
{
147161
"styles": {
148162
"italic": true,
163+
"textColor": "rgb(0, 0, 0)",
149164
},
150165
"text": "Italic",
151166
"type": "text",
152167
},
153168
{
154-
"styles": {},
169+
"styles": {
170+
"textColor": "rgb(0, 0, 0)",
171+
},
155172
"text": " Underline ",
156173
"type": "text",
157174
},
158175
{
159176
"styles": {
160177
"strike": true,
178+
"textColor": "rgb(0, 0, 0)",
161179
},
162180
"text": "Strikethrough",
163181
"type": "text",
164182
},
165183
{
166-
"styles": {},
184+
"styles": {
185+
"textColor": "rgb(0, 0, 0)",
186+
},
167187
"text": " ",
168188
"type": "text",
169189
},
@@ -172,6 +192,7 @@ Hard Break",
172192
"bold": true,
173193
"italic": true,
174194
"strike": true,
195+
"textColor": "rgb(255, 0, 0)",
175196
},
176197
"text": "All",
177198
"type": "text",
@@ -194,7 +215,14 @@ Hard Break",
194215
"content": [
195216
{
196217
"styles": {},
197-
"text": " Nested Numbered List Item 1",
218+
"text": " ",
219+
"type": "text",
220+
},
221+
{
222+
"styles": {
223+
"textColor": "rgb(0, 0, 0)",
224+
},
225+
"text": "Nested Numbered List Item 1",
198226
"type": "text",
199227
},
200228
],
@@ -211,7 +239,14 @@ Hard Break",
211239
"content": [
212240
{
213241
"styles": {},
214-
"text": " Nested Numbered List Item 2",
242+
"text": " ",
243+
"type": "text",
244+
},
245+
{
246+
"styles": {
247+
"textColor": "rgb(0, 0, 0)",
248+
},
249+
"text": "Nested Numbered List Item 2",
215250
"type": "text",
216251
},
217252
],
@@ -227,7 +262,14 @@ Hard Break",
227262
"content": [
228263
{
229264
"styles": {},
230-
"text": " Nested Bullet List Item 1",
265+
"text": " ",
266+
"type": "text",
267+
},
268+
{
269+
"styles": {
270+
"textColor": "rgb(0, 0, 0)",
271+
},
272+
"text": "Nested Bullet List Item 1",
231273
"type": "text",
232274
},
233275
],
@@ -244,7 +286,14 @@ Hard Break",
244286
"content": [
245287
{
246288
"styles": {},
247-
"text": " Nested Bullet List Item 2",
289+
"text": " ",
290+
"type": "text",
291+
},
292+
{
293+
"styles": {
294+
"textColor": "rgb(0, 0, 0)",
295+
},
296+
"text": "Nested Bullet List Item 2",
248297
"type": "text",
249298
},
250299
],
@@ -260,7 +309,14 @@ Hard Break",
260309
"content": [
261310
{
262311
"styles": {},
263-
"text": " Bullet List Item 1",
312+
"text": " ",
313+
"type": "text",
314+
},
315+
{
316+
"styles": {
317+
"textColor": "rgb(0, 0, 0)",
318+
},
319+
"text": "Bullet List Item 1",
264320
"type": "text",
265321
},
266322
],
@@ -277,7 +333,14 @@ Hard Break",
277333
"content": [
278334
{
279335
"styles": {},
280-
"text": " Bullet List Item 2",
336+
"text": " ",
337+
"type": "text",
338+
},
339+
{
340+
"styles": {
341+
"textColor": "rgb(0, 0, 0)",
342+
},
343+
"text": "Bullet List Item 2",
281344
"type": "text",
282345
},
283346
],
@@ -294,7 +357,14 @@ Hard Break",
294357
"content": [
295358
{
296359
"styles": {},
297-
"text": " Numbered List Item 1",
360+
"text": " ",
361+
"type": "text",
362+
},
363+
{
364+
"styles": {
365+
"textColor": "rgb(0, 0, 0)",
366+
},
367+
"text": "Numbered List Item 1",
298368
"type": "text",
299369
},
300370
],
@@ -311,7 +381,14 @@ Hard Break",
311381
"content": [
312382
{
313383
"styles": {},
314-
"text": " Numbered List Item 2",
384+
"text": " ",
385+
"type": "text",
386+
},
387+
{
388+
"styles": {
389+
"textColor": "rgb(0, 0, 0)",
390+
},
391+
"text": "Numbered List Item 2",
315392
"type": "text",
316393
},
317394
],
@@ -372,7 +449,9 @@ Hard Break",
372449
{
373450
"content": [
374451
{
375-
"styles": {},
452+
"styles": {
453+
"textColor": "rgb(0, 0, 0)",
454+
},
376455
"text": "Cell 1",
377456
"type": "text",
378457
},
@@ -389,7 +468,9 @@ Hard Break",
389468
{
390469
"content": [
391470
{
392-
"styles": {},
471+
"styles": {
472+
"textColor": "rgb(0, 0, 0)",
473+
},
393474
"text": "Cell 2",
394475
"type": "text",
395476
},
@@ -406,7 +487,9 @@ Hard Break",
406487
{
407488
"content": [
408489
{
409-
"styles": {},
490+
"styles": {
491+
"textColor": "rgb(0, 0, 0)",
492+
},
410493
"text": "Cell 3",
411494
"type": "text",
412495
},
@@ -427,7 +510,9 @@ Hard Break",
427510
{
428511
"content": [
429512
{
430-
"styles": {},
513+
"styles": {
514+
"textColor": "rgb(0, 0, 0)",
515+
},
431516
"text": "Cell 4",
432517
"type": "text",
433518
},
@@ -444,7 +529,9 @@ Hard Break",
444529
{
445530
"content": [
446531
{
447-
"styles": {},
532+
"styles": {
533+
"textColor": "rgb(0, 0, 0)",
534+
},
448535
"text": "Cell 5",
449536
"type": "text",
450537
},
@@ -461,7 +548,9 @@ Hard Break",
461548
{
462549
"content": [
463550
{
464-
"styles": {},
551+
"styles": {
552+
"textColor": "rgb(0, 0, 0)",
553+
},
465554
"text": "Cell 6",
466555
"type": "text",
467556
},
@@ -482,7 +571,9 @@ Hard Break",
482571
{
483572
"content": [
484573
{
485-
"styles": {},
574+
"styles": {
575+
"textColor": "rgb(0, 0, 0)",
576+
},
486577
"text": "Cell 7",
487578
"type": "text",
488579
},
@@ -499,7 +590,9 @@ Hard Break",
499590
{
500591
"content": [
501592
{
502-
"styles": {},
593+
"styles": {
594+
"textColor": "rgb(0, 0, 0)",
595+
},
503596
"text": "Cell 8",
504597
"type": "text",
505598
},
@@ -516,7 +609,9 @@ Hard Break",
516609
{
517610
"content": [
518611
{
519-
"styles": {},
612+
"styles": {
613+
"textColor": "rgb(0, 0, 0)",
614+
},
520615
"text": "Cell 9",
521616
"type": "text",
522617
},
@@ -545,7 +640,9 @@ Hard Break",
545640
"children": [],
546641
"content": [
547642
{
548-
"styles": {},
643+
"styles": {
644+
"textColor": "rgb(0, 0, 0)",
645+
},
549646
"text": "Paragraph",
550647
"type": "text",
551648
},

0 commit comments

Comments
 (0)