Skip to content

Commit cbda9e7

Browse files
committed
fix odt test
1 parent 553932b commit cbda9e7

File tree

4 files changed

+38
-7
lines changed

4 files changed

+38
-7
lines changed

packages/xl-odt-exporter/src/odt/__snapshots__/basic/content.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@
256256
<!-- -->
257257
Check List Item
258258
</text:p>
259-
<table:table table:name="" table:style-name="BN_S12">
259+
<table:table table:name="test20" table:style-name="BN_S12">
260260
<table:table-column table:style-name="BN_S13"></table:table-column>
261261
<table:table-column table:style-name="BN_S14"></table:table-column>
262262
<table:table-column table:style-name="BN_S15"></table:table-column>
@@ -381,7 +381,7 @@
381381
Link
382382
</text:a>
383383
</text:p>
384-
<table:table table:name="" table:style-name="BN_S20">
384+
<table:table table:name="test30" table:style-name="BN_S20">
385385
<table:table-column table:style-name="BN_S21"></table:table-column>
386386
<table:table-column table:style-name="BN_S22"></table:table-column>
387387
<table:table-column table:style-name="BN_S23"></table:table-column>

packages/xl-odt-exporter/src/odt/__snapshots__/withCustomOptions/content.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@
270270
<!-- -->
271271
Check List Item
272272
</text:p>
273-
<table:table table:name="" table:style-name="BN_S12">
273+
<table:table table:name="test20" table:style-name="BN_S12">
274274
<table:table-column table:style-name="BN_S13"></table:table-column>
275275
<table:table-column table:style-name="BN_S14"></table:table-column>
276276
<table:table-column table:style-name="BN_S15"></table:table-column>
@@ -395,7 +395,7 @@
395395
Link
396396
</text:a>
397397
</text:p>
398-
<table:table table:name="" table:style-name="BN_S20">
398+
<table:table table:name="test30" table:style-name="BN_S20">
399399
<table:table-column table:style-name="BN_S21"></table:table-column>
400400
<table:table-column table:style-name="BN_S22"></table:table-column>
401401
<table:table-column table:style-name="BN_S23"></table:table-column>

packages/xl-odt-exporter/src/odt/__snapshots__/withMultiColumn/content.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
</office:automatic-styles>
4444
<office:body>
4545
<office:text>
46-
<table:table table:name="" table:style-name="BN_S7">
46+
<table:table table:name="0" table:style-name="BN_S7">
4747
<table:table-column table:style-name="BN_S8"></table:table-column>
4848
<table:table-column table:style-name="BN_S9"></table:table-column>
4949
<table:table-column table:style-name="BN_S10"></table:table-column>

shared/testDocument.ts

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export const testDocument = partialBlocksToBlocks(
1616
}),
1717
[
1818
{
19+
id: "test1",
1920
type: "paragraph",
2021
content: [
2122
{
@@ -36,10 +37,12 @@ export const testDocument = partialBlocksToBlocks(
3637
],
3738
children: [
3839
{
40+
id: "test2",
3941
type: "paragraph",
4042
content: "Hello World nested",
4143
children: [
4244
{
45+
id: "test2child",
4346
type: "paragraph",
4447
content: "Hello World double nested",
4548
},
@@ -48,6 +51,7 @@ export const testDocument = partialBlocksToBlocks(
4851
],
4952
},
5053
{
54+
id: "test3",
5155
type: "paragraph",
5256
content: [
5357
{
@@ -61,21 +65,25 @@ export const testDocument = partialBlocksToBlocks(
6165
},
6266
},
6367
{
68+
id: "test4",
6469
type: "paragraph",
6570
content: "Paragraph",
6671
},
6772
{
73+
id: "test5",
6874
type: "heading",
6975
content: "Heading",
7076
},
7177
{
78+
id: "test6",
7279
type: "heading",
7380
content: "Heading right",
7481
props: {
7582
textAlignment: "right",
7683
},
7784
},
7885
{
86+
id: "test7",
7987
type: "paragraph",
8088
content:
8189
"justified paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
@@ -84,18 +92,21 @@ export const testDocument = partialBlocksToBlocks(
8492
textAlignment: "justify",
8593
},
8694
},
87-
{ type: "pageBreak" },
95+
{ id: "test8", type: "pageBreak" },
8896
{
97+
id: "test9",
8998
type: "bulletListItem",
9099
content:
91100
"Bullet List Item. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
92101
children: [
93102
{
103+
id: "test10",
94104
type: "bulletListItem",
95105
content:
96106
"Bullet List Item. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
97107
},
98108
{
109+
id: "test11",
99110
type: "bulletListItem",
100111
content:
101112
"Bullet List Item right. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
@@ -104,22 +115,27 @@ export const testDocument = partialBlocksToBlocks(
104115
},
105116
},
106117
{
118+
id: "test12",
107119
type: "numberedListItem",
108120
content: "Numbered List Item 1",
109121
},
110122
{
123+
id: "test13",
111124
type: "numberedListItem",
112125
content: "Numbered List Item 2",
113126
children: [
114127
{
128+
id: "test14",
115129
type: "numberedListItem",
116130
content: "Numbered List Item Nested 1",
117131
},
118132
{
133+
id: "test15",
119134
type: "numberedListItem",
120135
content: "Numbered List Item Nested 2",
121136
},
122137
{
138+
id: "test16",
123139
type: "numberedListItem",
124140
content: "Numbered List Item Nested funky right",
125141
props: {
@@ -129,6 +145,7 @@ export const testDocument = partialBlocksToBlocks(
129145
},
130146
},
131147
{
148+
id: "test17",
132149
type: "numberedListItem",
133150
content: "Numbered List Item Nested funky center",
134151
props: {
@@ -142,14 +159,17 @@ export const testDocument = partialBlocksToBlocks(
142159
],
143160
},
144161
{
162+
id: "test18",
145163
type: "numberedListItem",
146164
content: "Numbered List Item",
147165
},
148166
{
167+
id: "test19",
149168
type: "checkListItem",
150169
content: "Check List Item",
151170
},
152171
{
172+
id: "test20",
153173
type: "table",
154174
content: {
155175
type: "tableContent",
@@ -168,9 +188,11 @@ export const testDocument = partialBlocksToBlocks(
168188
},
169189
},
170190
{
191+
id: "test21",
171192
type: "file",
172193
},
173194
{
195+
id: "test22",
174196
type: "image",
175197
props: {
176198
url: "https://interactive-examples.mdn.mozilla.net/media/cc0-images/grapefruit-slice-332-332.jpg",
@@ -179,6 +201,7 @@ export const testDocument = partialBlocksToBlocks(
179201
},
180202
},
181203
{
204+
id: "test23",
182205
type: "image",
183206
props: {
184207
previewWidth: 200,
@@ -187,6 +210,7 @@ export const testDocument = partialBlocksToBlocks(
187210
},
188211
},
189212
{
213+
id: "test24",
190214
type: "video",
191215
props: {
192216
url: "https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm",
@@ -195,6 +219,7 @@ export const testDocument = partialBlocksToBlocks(
195219
},
196220
},
197221
{
222+
id: "test25",
198223
type: "audio",
199224
props: {
200225
url: "https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3",
@@ -203,16 +228,19 @@ export const testDocument = partialBlocksToBlocks(
203228
},
204229
},
205230
{
231+
id: "test26",
206232
type: "paragraph",
207233
},
208234
{
235+
id: "test27",
209236
type: "audio",
210237
props: {
211238
caption: "Audio file caption",
212239
name: "audio.mp3",
213240
},
214241
},
215242
{
243+
id: "test28",
216244
type: "paragraph",
217245
content: [
218246
{
@@ -223,6 +251,7 @@ export const testDocument = partialBlocksToBlocks(
223251
],
224252
},
225253
{
254+
id: "test29",
226255
type: "paragraph",
227256
content: [
228257
{
@@ -248,6 +277,7 @@ export const testDocument = partialBlocksToBlocks(
248277
],
249278
},
250279
{
280+
id: "test30",
251281
type: "table",
252282
content: {
253283
type: "tableContent",
@@ -277,6 +307,7 @@ export const testDocument = partialBlocksToBlocks(
277307
},
278308
},
279309
{
310+
id: "test31",
280311
type: "codeBlock",
281312
props: {
282313
language: "javascript",
@@ -285,6 +316,6 @@ export const testDocument = partialBlocksToBlocks(
285316
console.log("Hello World", message);
286317
};`,
287318
},
288-
{ type: "divider" },
319+
{ id: "test32", type: "divider" },
289320
],
290321
);

0 commit comments

Comments
 (0)