Skip to content

Commit 00dfbbf

Browse files
committed
Fix types
1 parent 62af8da commit 00dfbbf

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

packages/react-sdk/src/component-generator.test.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ test("generate jsx element with children and without them", () => {
8484
usedDataSources: new Map(),
8585
indexesWithinAncestors: new Map(),
8686
metas: new Map(),
87+
tagsOverrides: {},
8788
children: [{ type: "id", value: "body" }],
8889
...renderData(<$.Body ws:id="body">Children</$.Body>),
8990
})
@@ -102,6 +103,7 @@ test("generate jsx element with children and without them", () => {
102103
usedDataSources: new Map(),
103104
indexesWithinAncestors: new Map(),
104105
metas: new Map(),
106+
tagsOverrides: {},
105107
children: [{ type: "id", value: "image" }],
106108
...renderData(<$.Image ws:id="image"></$.Image>),
107109
})
@@ -122,6 +124,7 @@ test("generate jsx element with namespaces components", () => {
122124
usedDataSources: new Map(),
123125
indexesWithinAncestors: new Map(),
124126
metas: new Map(),
127+
tagsOverrides: {},
125128
children: [{ type: "id", value: "body" }],
126129
...renderData(<library.Body ws:id="body"></library.Body>),
127130
})
@@ -138,6 +141,7 @@ test("generate jsx element with namespaces components", () => {
138141
usedDataSources: new Map(),
139142
indexesWithinAncestors: new Map(),
140143
metas: new Map(),
144+
tagsOverrides: {},
141145
children: [{ type: "id", value: "image" }],
142146
...renderData(<library.Image ws:id="image"></library.Image>),
143147
})
@@ -157,6 +161,7 @@ test("generate jsx element with literal props", () => {
157161
usedDataSources: new Map(),
158162
indexesWithinAncestors: new Map(),
159163
metas: new Map(),
164+
tagsOverrides: {},
160165
children: [{ type: "id", value: "body" }],
161166
...renderData(<$.Body ws:id="body" string="string" number={0}></$.Body>),
162167
})
@@ -175,6 +180,7 @@ test("generate jsx element with literal props", () => {
175180
usedDataSources: new Map(),
176181
indexesWithinAncestors: new Map(),
177182
metas: new Map(),
183+
tagsOverrides: {},
178184
children: [{ type: "id", value: "image" }],
179185
...renderData(
180186
<$.Image
@@ -202,6 +208,7 @@ test("ignore asset and page props", () => {
202208
usedDataSources: new Map(),
203209
indexesWithinAncestors: new Map(),
204210
metas: new Map(),
211+
tagsOverrides: {},
205212
children: [{ type: "id", value: "box" }],
206213
...renderData(
207214
<$.Box
@@ -228,6 +235,7 @@ test("generate jsx element with data sources and action", () => {
228235
usedDataSources: new Map(),
229236
indexesWithinAncestors: new Map(),
230237
metas: new Map(),
238+
tagsOverrides: {},
231239
children: [{ type: "id", value: "box" }],
232240
...renderData(
233241
<$.Box
@@ -260,6 +268,7 @@ test("generate jsx element with condition based on show prop", () => {
260268
usedDataSources: new Map(),
261269
indexesWithinAncestors: new Map(),
262270
metas: new Map(),
271+
tagsOverrides: {},
263272
children: [{ type: "id", value: "box" }],
264273
...renderData(<$.Box ws:id="box" data-ws-show={true}></$.Box>),
265274
})
@@ -276,6 +285,7 @@ test("generate jsx element with condition based on show prop", () => {
276285
usedDataSources: new Map(),
277286
indexesWithinAncestors: new Map(),
278287
metas: new Map(),
288+
tagsOverrides: {},
279289
children: [{ type: "id", value: "box" }],
280290
...renderData(<$.Box ws:id="box" data-ws-show={false}></$.Box>),
281291
})
@@ -287,6 +297,7 @@ test("generate jsx element with condition based on show prop", () => {
287297
usedDataSources: new Map(),
288298
indexesWithinAncestors: new Map(),
289299
metas: new Map(),
300+
tagsOverrides: {},
290301
children: [{ type: "id", value: "box" }],
291302
...renderData(
292303
<$.Box ws:id="box" data-ws-show={expression`${condition}`}></$.Box>
@@ -308,6 +319,7 @@ test("generate jsx children with text", () => {
308319
generateJsxChildren({
309320
scope: createScope(),
310321
metas: new Map(),
322+
tagsOverrides: {},
311323
children: [
312324
{ type: "text", value: "Some\ntext" },
313325
{ type: "text", value: 'Escaped "text"' },
@@ -335,6 +347,7 @@ test("exclude text placeholders", () => {
335347
generateJsxChildren({
336348
scope: createScope(),
337349
metas: new Map(),
350+
tagsOverrides: {},
338351
children: [
339352
{ type: "text", value: "Text" },
340353
{ type: "text", value: "Placeholder text", placeholder: true },
@@ -360,6 +373,7 @@ test("generate jsx children with expression", () => {
360373
generateJsxChildren({
361374
scope: createScope(),
362375
metas: new Map(),
376+
tagsOverrides: {},
363377
children: [
364378
{ type: "expression", value: "'Hello ' + $ws$dataSource$var" },
365379
],
@@ -391,6 +405,7 @@ test("generate jsx children with nested instances", () => {
391405
generateJsxChildren({
392406
scope: createScope(),
393407
metas: new Map(),
408+
tagsOverrides: {},
394409
children: [{ type: "id", value: "form" }],
395410
usedDataSources: new Map(),
396411
indexesWithinAncestors: new Map(),
@@ -420,6 +435,7 @@ test("deduplicate base and namespaced components with same short name", () => {
420435
generateJsxChildren({
421436
scope: createScope(),
422437
metas: new Map(),
438+
tagsOverrides: {},
423439
children: [
424440
{ type: "id", value: "button1" },
425441
{ type: "id", value: "button2" },
@@ -448,6 +464,7 @@ test("generate collection component as map", () => {
448464
generateJsxChildren({
449465
scope: createScope(),
450466
metas: new Map(),
467+
tagsOverrides: {},
451468
children: [{ type: "id", value: "list" }],
452469
usedDataSources: new Map(),
453470
indexesWithinAncestors: new Map(),

0 commit comments

Comments
 (0)