@localazy/strapi-plugin 0.1.9 → 0.1.11-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/.eslintrc +6 -2
  2. package/.nvmrc +1 -1
  3. package/admin/src/modules/@common/models/supported-content-type-fields.js +8 -0
  4. package/admin/src/modules/plugin-settings/components/Tree/index.js +2 -0
  5. package/admin/src/modules/plugin-settings/utils/get-filtered-models-schemas.js +4 -4
  6. package/admin/src/modules/plugin-settings/utils/get-models-tree.js +3 -1
  7. package/package.json +1 -1
  8. package/server/bootstrap.js +15 -1
  9. package/server/controllers/localazy-transfer-controller.js +45 -47
  10. package/server/functions/should-set-downloaded-property.js +16 -0
  11. package/server/models/supported-content-type-fields.js +8 -0
  12. package/server/services/index.js +2 -0
  13. package/server/services/strapi-i18n-service.js +4 -3
  14. package/server/services/strapi-localazy-i18n-service.js +104 -0
  15. package/server/tests/fixtures/parsed-localazy-entry-to-create-entry-cookbook.js +5761 -0
  16. package/server/tests/fixtures/parsed-localazy-entry-to-create-entry-restaurant-simple-menu.js +536 -0
  17. package/server/tests/fixtures/parsed-localazy-entry-to-update-entry.js +35157 -0
  18. package/server/tests/fixtures/populate-create-update-entry-with-base-entry-cookbook-empty-recipes.js +202 -0
  19. package/server/tests/fixtures/populate-create-update-entry-with-base-entry-cookbook.js +2700 -0
  20. package/server/tests/fixtures/populate-create-update-entry-with-base-entry-restaurant-simple-flat-simple.js +47 -0
  21. package/server/tests/fixtures/populate-create-update-entry-with-base-entry-restaurant-simple-flat-with-media.js +169 -0
  22. package/server/tests/fixtures/populate-create-update-entry-with-base-entry-restaurant-simple-menu-empty.js +3003 -0
  23. package/server/tests/fixtures/populate-create-update-entry-with-base-entry-restaurant-simple-menu-with-media.js +2057 -0
  24. package/server/tests/fixtures/populate-create-update-entry-with-base-entry-sample-json.js +46 -0
  25. package/server/tests/fixtures/{all-models-with-multimedia.js → strapi-plugin-all-models.js} +717 -540
  26. package/server/utils/__tests__/get-models-tree.test.js +1 -1
  27. package/server/utils/__tests__/parsed-localazy-entry-to-create-entry.test.js +74 -107
  28. package/server/utils/__tests__/parsed-localazy-entry-to-update-entry.test.js +396 -133
  29. package/server/utils/__tests__/populate-create-update-entry-with-base-entry.test.js +852 -0
  30. package/server/utils/get-full-populate-object.js +56 -0
  31. package/server/utils/get-models-tree.js +3 -1
  32. package/server/utils/model-utils.js +38 -0
  33. package/server/utils/parsed-localazy-entry-to-create-entry.js +24 -24
  34. package/server/utils/parsed-localazy-entry-to-update-entry.js +43 -4
  35. package/server/utils/pick-entries.js +2 -1
  36. package/server/utils/populate-create-update-entry-with-base-entry.js +222 -0
  37. package/server/utils/reset-array-keys-deep.js +19 -0
  38. package/server/utils/transfer-setup-utils.js +14 -0
  39. package/server/tests/fixtures/restaurant-model.js +0 -230
  40. package/server/tests/fixtures/restaurants-entries.js +0 -152
  41. package/server/tests/fixtures/strapi-book-with-multimedia-components-cs.js +0 -31
  42. package/server/tests/fixtures/stringified-book-cs.js +0 -3
  43. package/server/tests/fixtures/stringified-book-with-multimedia-components-cs.js +0 -3
  44. package/server/tests/fixtures/stringified-restaurant-cs.js +0 -3
  45. package/server/tests/fixtures/stringified-restaurant-de.js +0 -5
@@ -1,170 +1,433 @@
1
1
  "use strict";
2
2
 
3
3
  const parsedLocalazyEntryToUpdateEntry = require("../parsed-localazy-entry-to-update-entry");
4
- const allModelsWithMultimedia = require("../../tests/fixtures/all-models-with-multimedia");
5
- const allModels = require("../../tests/fixtures/all-models");
6
- const stringifiedBookCs = require("../../tests/fixtures/stringified-book-with-multimedia-components-cs");
7
- const stringifiedRestaurantDe = require("../../tests/fixtures/stringified-restaurant-de");
8
- const currentBookEntry = require("../../tests/fixtures/strapi-book-with-multimedia-components-cs");
9
- const restaurantsEntries = require("../../tests/fixtures/restaurants-entries");
4
+ const allModels = require("../../tests/fixtures/strapi-plugin-all-models");
5
+ const {
6
+ localazyEntry,
7
+ fullyPopulatedLocalizedEntry,
8
+ currentEntry,
9
+ baseEntry,
10
+ uid,
11
+ locale,
12
+ } = require("../../tests/fixtures/parsed-localazy-entry-to-update-entry");
10
13
 
11
14
  describe("parsed-localazy-entry-to-update-entry.js", () => {
12
- it("should return transformed book entry to strapi update entry structure", () => {
13
- // SETUP
14
- const uid = "api::book.book";
15
- const entry = JSON.parse(stringifiedBookCs);
16
-
15
+ it("should return transformed 'cookbook' entry to strapi update entry structure", async () => {
17
16
  // EXECUTE
18
- const result = parsedLocalazyEntryToUpdateEntry(
19
- allModelsWithMultimedia,
20
- entry,
21
- currentBookEntry,
22
- uid
23
- );
24
-
25
- // VERIFY
26
- const expected = {
27
- id: 29,
28
- Title: "Kniha s obálkou 2",
29
- Author: null,
30
- Pages: null,
31
- non_localizable_name: "Non localizable book for kids",
32
- additional_info: {
33
- id: 38,
34
- rich_description: "RD",
35
- history: "H 2",
36
- excerpt: "E",
37
- test_variants: {
38
- id: 38,
39
- name: "Nejsou k dispozici žádné varianty, proč?",
40
- },
41
- },
42
- seo_setup: [
43
- {
44
- id: 21,
45
- seo_desc: "nastavení 1",
46
- main_image: null,
47
- rest: null,
48
- },
49
- {
50
- id: 22,
51
- seo_desc: "nastavení 2",
52
- main_image: null,
53
- rest: null,
54
- },
55
- ],
56
- };
57
-
58
- expect(result).toEqual(expected);
59
- });
60
- it.only("should return transformed restaurant entry to strapi update entry structure", () => {
61
- // SETUP
62
- const uid = "api::restaurant.restaurant";
63
- const entry = JSON.parse(stringifiedRestaurantDe);
64
- const currentRestaurantEntry = restaurantsEntries[2];
65
-
66
- // EXECUTE
67
- const result = parsedLocalazyEntryToUpdateEntry(
17
+ const result = await parsedLocalazyEntryToUpdateEntry(
68
18
  allModels,
69
- entry,
70
- currentRestaurantEntry,
71
- uid
19
+ localazyEntry,
20
+ fullyPopulatedLocalizedEntry,
21
+ currentEntry,
22
+ baseEntry,
23
+ uid,
24
+ locale
72
25
  );
73
26
 
74
27
  // VERIFY
75
28
  const expected = {
76
- city: "Testow",
77
- country: "Test Rep.",
78
- description: "Mit einer großartigen Beschreibung",
79
- descs: {
80
- excerpt: "Est. 2022",
81
- history: "Est. 2022, mit Sitz in NY, NY",
82
- id: 3,
83
- rich_description: "Ein weiteres Restaurant desc",
84
- test_variants: {
85
- id: 5,
86
- name: "so etwas nicht...",
87
- },
88
- },
89
- id: 3,
29
+ id: 24,
30
+ title: "Pro každý den v roce",
31
+ author_name: "David V.",
32
+ pages: 365,
90
33
  recipes: [
91
34
  {
92
- id: 3,
93
- ingredients: [
35
+ id: 20,
36
+ name: "Bramborový salát",
37
+ recipe: "Oloupejte brambory, smíchejte je se všemi ingrediencemi a máte hotovo. Bon apetit!",
38
+ estimated_cook_time: "00:30:00.000",
39
+ difficulty: "easy",
40
+ author_name: "Mr. Bramborová hlava",
41
+ gallery: [
94
42
  {
95
- id: 2,
96
- name: "Rindfleisch",
97
- pcs: 4,
98
- required: false,
43
+ id: 100,
44
+ image_title: "Syrové brambory",
45
+ image_description: "Čerstvý!",
46
+ image: {
47
+ id: 6,
48
+ name: "rodrigo-dos-reis-h3AkzboxK4Q-unsplash.jpg",
49
+ alternativeText: "rodrigo-dos-reis-h3AkzboxK4Q-unsplash.jpg",
50
+ caption: "rodrigo-dos-reis-h3AkzboxK4Q-unsplash.jpg",
51
+ width: 2268,
52
+ height: 4032,
53
+ formats: {
54
+ thumbnail: {
55
+ name: "thumbnail_rodrigo-dos-reis-h3AkzboxK4Q-unsplash.jpg",
56
+ hash: "thumbnail_rodrigo_dos_reis_h3_Akzbox_K4_Q_unsplash_d17e795cea",
57
+ ext: ".jpg",
58
+ mime: "image/jpeg",
59
+ path: null,
60
+ width: 88,
61
+ height: 156,
62
+ size: 5.35,
63
+ url: "/uploads/thumbnail_rodrigo_dos_reis_h3_Akzbox_K4_Q_unsplash_d17e795cea.jpg",
64
+ },
65
+ large: {
66
+ name: "large_rodrigo-dos-reis-h3AkzboxK4Q-unsplash.jpg",
67
+ hash: "large_rodrigo_dos_reis_h3_Akzbox_K4_Q_unsplash_d17e795cea",
68
+ ext: ".jpg",
69
+ mime: "image/jpeg",
70
+ path: null,
71
+ width: 563,
72
+ height: 1000,
73
+ size: 108.15,
74
+ url: "/uploads/large_rodrigo_dos_reis_h3_Akzbox_K4_Q_unsplash_d17e795cea.jpg",
75
+ },
76
+ medium: {
77
+ name: "medium_rodrigo-dos-reis-h3AkzboxK4Q-unsplash.jpg",
78
+ hash: "medium_rodrigo_dos_reis_h3_Akzbox_K4_Q_unsplash_d17e795cea",
79
+ ext: ".jpg",
80
+ mime: "image/jpeg",
81
+ path: null,
82
+ width: 422,
83
+ height: 750,
84
+ size: 65.52,
85
+ url: "/uploads/medium_rodrigo_dos_reis_h3_Akzbox_K4_Q_unsplash_d17e795cea.jpg",
86
+ },
87
+ small: {
88
+ name: "small_rodrigo-dos-reis-h3AkzboxK4Q-unsplash.jpg",
89
+ hash: "small_rodrigo_dos_reis_h3_Akzbox_K4_Q_unsplash_d17e795cea",
90
+ ext: ".jpg",
91
+ mime: "image/jpeg",
92
+ path: null,
93
+ width: 281,
94
+ height: 500,
95
+ size: 34.23,
96
+ url: "/uploads/small_rodrigo_dos_reis_h3_Akzbox_K4_Q_unsplash_d17e795cea.jpg",
97
+ },
98
+ },
99
+ hash: "rodrigo_dos_reis_h3_Akzbox_K4_Q_unsplash_d17e795cea",
100
+ ext: ".jpg",
101
+ mime: "image/jpeg",
102
+ size: 1081.59,
103
+ url: "/uploads/rodrigo_dos_reis_h3_Akzbox_K4_Q_unsplash_d17e795cea.jpg",
104
+ previewUrl: null,
105
+ provider: "local",
106
+ provider_metadata: null,
107
+ },
99
108
  },
100
109
  {
101
- id: 3,
102
- name: "Wasser",
103
- pcs: 1,
104
- required: true,
110
+ id: 101,
111
+ image_title: "Salát",
112
+ image_description: "Mňam!",
113
+ image: {
114
+ id: 7,
115
+ name: "jeffrey-betts-PeyzQt7tMk0-unsplash.jpg",
116
+ alternativeText: "jeffrey-betts-PeyzQt7tMk0-unsplash.jpg",
117
+ caption: "jeffrey-betts-PeyzQt7tMk0-unsplash.jpg",
118
+ width: 4608,
119
+ height: 3456,
120
+ formats: {
121
+ thumbnail: {
122
+ name: "thumbnail_jeffrey-betts-PeyzQt7tMk0-unsplash.jpg",
123
+ hash: "thumbnail_jeffrey_betts_Peyz_Qt7t_Mk0_unsplash_9650d628db",
124
+ ext: ".jpg",
125
+ mime: "image/jpeg",
126
+ path: null,
127
+ width: 208,
128
+ height: 156,
129
+ size: 9.03,
130
+ url: "/uploads/thumbnail_jeffrey_betts_Peyz_Qt7t_Mk0_unsplash_9650d628db.jpg",
131
+ },
132
+ large: {
133
+ name: "large_jeffrey-betts-PeyzQt7tMk0-unsplash.jpg",
134
+ hash: "large_jeffrey_betts_Peyz_Qt7t_Mk0_unsplash_9650d628db",
135
+ ext: ".jpg",
136
+ mime: "image/jpeg",
137
+ path: null,
138
+ width: 1000,
139
+ height: 750,
140
+ size: 102.77,
141
+ url: "/uploads/large_jeffrey_betts_Peyz_Qt7t_Mk0_unsplash_9650d628db.jpg",
142
+ },
143
+ medium: {
144
+ name: "medium_jeffrey-betts-PeyzQt7tMk0-unsplash.jpg",
145
+ hash: "medium_jeffrey_betts_Peyz_Qt7t_Mk0_unsplash_9650d628db",
146
+ ext: ".jpg",
147
+ mime: "image/jpeg",
148
+ path: null,
149
+ width: 750,
150
+ height: 563,
151
+ size: 66.26,
152
+ url: "/uploads/medium_jeffrey_betts_Peyz_Qt7t_Mk0_unsplash_9650d628db.jpg",
153
+ },
154
+ small: {
155
+ name: "small_jeffrey-betts-PeyzQt7tMk0-unsplash.jpg",
156
+ hash: "small_jeffrey_betts_Peyz_Qt7t_Mk0_unsplash_9650d628db",
157
+ ext: ".jpg",
158
+ mime: "image/jpeg",
159
+ path: null,
160
+ width: 500,
161
+ height: 375,
162
+ size: 35.17,
163
+ url: "/uploads/small_jeffrey_betts_Peyz_Qt7t_Mk0_unsplash_9650d628db.jpg",
164
+ },
165
+ },
166
+ hash: "jeffrey_betts_Peyz_Qt7t_Mk0_unsplash_9650d628db",
167
+ ext: ".jpg",
168
+ mime: "image/jpeg",
169
+ size: 1664.79,
170
+ url: "/uploads/jeffrey_betts_Peyz_Qt7t_Mk0_unsplash_9650d628db.jpg",
171
+ previewUrl: null,
172
+ provider: "local",
173
+ provider_metadata: null,
174
+ },
105
175
  },
106
176
  ],
107
- name: "Rinderbrühe",
108
- variants: {
109
- id: 4,
110
- name: "Red, yellow, green",
111
- },
112
- },
113
- {
114
- id: 2,
115
177
  ingredients: [
116
178
  {
117
- id: 4,
118
- name: "Tomate",
119
- pcs: 1,
120
- required: true,
179
+ id: 115,
180
+ name: "Brambory",
181
+ amount: 2,
182
+ unit: "kg",
183
+ is_required: true,
121
184
  },
122
185
  {
123
- id: 5,
124
- name: "Suppe",
125
- pcs: 2,
126
- required: true,
186
+ id: 116,
187
+ name: "Hrášek",
188
+ amount: 0.5,
189
+ unit: "plechovka",
190
+ is_required: true,
127
191
  },
128
- ],
129
- name: "Tomatensuppe",
130
- variants: {
131
- name: "Rot, gelb, grün",
132
- },
133
- },
134
- {
135
- id: 4,
136
- ingredients: [
137
192
  {
138
- id: 6,
139
- name: "Rindfleisch",
140
- pcs: 1,
141
- required: true,
193
+ id: 117,
194
+ name: "Kukuřice",
195
+ amount: 0.5,
196
+ unit: "plechovka",
197
+ is_required: true,
142
198
  },
143
199
  {
144
- id: 7,
145
- name: "Pfeffer",
146
- pcs: 4,
147
- required: null,
200
+ id: 118,
201
+ name: "Majonéza",
202
+ amount: 4,
203
+ unit: "1",
204
+ is_required: true,
148
205
  },
149
206
  {
150
- id: 8,
151
- name: "Pfeffer-Gewürze",
152
- pcs: 1,
153
- required: true,
207
+ id: 119,
208
+ name: "Sýr",
209
+ amount: 1,
210
+ unit: "1",
211
+ is_required: true,
154
212
  },
155
213
  {
156
- id: 9,
157
- name: "Wasser",
158
- pcs: 1,
159
- required: null,
214
+ id: 120,
215
+ name: "Jablko",
216
+ amount: 1,
217
+ unit: "ks",
218
+ is_required: true,
160
219
  },
161
220
  ],
162
- name: "Gulasch",
163
- variants: null,
164
221
  },
165
222
  ],
166
- street: "Testowa",
167
- title: "Volles Restaurant",
223
+ gallery: {
224
+ id: 24,
225
+ optional_title: null,
226
+ annotation: "Podívejte se na naše chutné jídlo, pak čtěte dál a ponořte se do kulinářského nebe!",
227
+ main_image: {
228
+ id: 102,
229
+ image_title: "Kuchařka",
230
+ image_description: "Booklet",
231
+ image: {
232
+ id: 9,
233
+ name: "dan-gold-5O1ddenSM4g-unsplash.jpg",
234
+ alternativeText: "dan-gold-5O1ddenSM4g-unsplash.jpg",
235
+ caption: "dan-gold-5O1ddenSM4g-unsplash.jpg",
236
+ width: 6000,
237
+ height: 3376,
238
+ formats: {
239
+ thumbnail: {
240
+ name: "thumbnail_dan-gold-5O1ddenSM4g-unsplash.jpg",
241
+ hash: "thumbnail_dan_gold_5_O1dden_SM_4g_unsplash_5adef7d907",
242
+ ext: ".jpg",
243
+ mime: "image/jpeg",
244
+ path: null,
245
+ width: 245,
246
+ height: 138,
247
+ size: 7.44,
248
+ url: "/uploads/thumbnail_dan_gold_5_O1dden_SM_4g_unsplash_5adef7d907.jpg",
249
+ },
250
+ large: {
251
+ name: "large_dan-gold-5O1ddenSM4g-unsplash.jpg",
252
+ hash: "large_dan_gold_5_O1dden_SM_4g_unsplash_5adef7d907",
253
+ ext: ".jpg",
254
+ mime: "image/jpeg",
255
+ path: null,
256
+ width: 1000,
257
+ height: 563,
258
+ size: 52.67,
259
+ url: "/uploads/large_dan_gold_5_O1dden_SM_4g_unsplash_5adef7d907.jpg",
260
+ },
261
+ medium: {
262
+ name: "medium_dan-gold-5O1ddenSM4g-unsplash.jpg",
263
+ hash: "medium_dan_gold_5_O1dden_SM_4g_unsplash_5adef7d907",
264
+ ext: ".jpg",
265
+ mime: "image/jpeg",
266
+ path: null,
267
+ width: 750,
268
+ height: 422,
269
+ size: 35.15,
270
+ url: "/uploads/medium_dan_gold_5_O1dden_SM_4g_unsplash_5adef7d907.jpg",
271
+ },
272
+ small: {
273
+ name: "small_dan-gold-5O1ddenSM4g-unsplash.jpg",
274
+ hash: "small_dan_gold_5_O1dden_SM_4g_unsplash_5adef7d907",
275
+ ext: ".jpg",
276
+ mime: "image/jpeg",
277
+ path: null,
278
+ width: 500,
279
+ height: 281,
280
+ size: 19.95,
281
+ url: "/uploads/small_dan_gold_5_O1dden_SM_4g_unsplash_5adef7d907.jpg",
282
+ },
283
+ },
284
+ hash: "dan_gold_5_O1dden_SM_4g_unsplash_5adef7d907",
285
+ ext: ".jpg",
286
+ mime: "image/jpeg",
287
+ size: 972.68,
288
+ url: "/uploads/dan_gold_5_O1dden_SM_4g_unsplash_5adef7d907.jpg",
289
+ previewUrl: null,
290
+ provider: "local",
291
+ provider_metadata: null,
292
+ },
293
+ },
294
+ gallery: [
295
+ {
296
+ id: 103,
297
+ image_title: null,
298
+ image_description: "Brožura, listy a vidlička.",
299
+ image: {
300
+ id: 11,
301
+ name: "heather-ford-G4LFhuLXhLE-unsplash.jpg",
302
+ alternativeText: "heather-ford-G4LFhuLXhLE-unsplash.jpg",
303
+ caption: "heather-ford-G4LFhuLXhLE-unsplash.jpg",
304
+ width: 6127,
305
+ height: 3844,
306
+ formats: {
307
+ thumbnail: {
308
+ name: "thumbnail_heather-ford-G4LFhuLXhLE-unsplash.jpg",
309
+ hash: "thumbnail_heather_ford_G4_L_Fhu_L_Xh_LE_unsplash_7a2c2cac8f",
310
+ ext: ".jpg",
311
+ mime: "image/jpeg",
312
+ path: null,
313
+ width: 245,
314
+ height: 154,
315
+ size: 9.54,
316
+ url: "/uploads/thumbnail_heather_ford_G4_L_Fhu_L_Xh_LE_unsplash_7a2c2cac8f.jpg",
317
+ },
318
+ large: {
319
+ name: "large_heather-ford-G4LFhuLXhLE-unsplash.jpg",
320
+ hash: "large_heather_ford_G4_L_Fhu_L_Xh_LE_unsplash_7a2c2cac8f",
321
+ ext: ".jpg",
322
+ mime: "image/jpeg",
323
+ path: null,
324
+ width: 1000,
325
+ height: 628,
326
+ size: 117.56,
327
+ url: "/uploads/large_heather_ford_G4_L_Fhu_L_Xh_LE_unsplash_7a2c2cac8f.jpg",
328
+ },
329
+ medium: {
330
+ name: "medium_heather-ford-G4LFhuLXhLE-unsplash.jpg",
331
+ hash: "medium_heather_ford_G4_L_Fhu_L_Xh_LE_unsplash_7a2c2cac8f",
332
+ ext: ".jpg",
333
+ mime: "image/jpeg",
334
+ path: null,
335
+ width: 750,
336
+ height: 471,
337
+ size: 66.32,
338
+ url: "/uploads/medium_heather_ford_G4_L_Fhu_L_Xh_LE_unsplash_7a2c2cac8f.jpg",
339
+ },
340
+ small: {
341
+ name: "small_heather-ford-G4LFhuLXhLE-unsplash.jpg",
342
+ hash: "small_heather_ford_G4_L_Fhu_L_Xh_LE_unsplash_7a2c2cac8f",
343
+ ext: ".jpg",
344
+ mime: "image/jpeg",
345
+ path: null,
346
+ width: 500,
347
+ height: 314,
348
+ size: 31.42,
349
+ url: "/uploads/small_heather_ford_G4_L_Fhu_L_Xh_LE_unsplash_7a2c2cac8f.jpg",
350
+ },
351
+ },
352
+ hash: "heather_ford_G4_L_Fhu_L_Xh_LE_unsplash_7a2c2cac8f",
353
+ ext: ".jpg",
354
+ mime: "image/jpeg",
355
+ size: 6971.47,
356
+ url: "/uploads/heather_ford_G4_L_Fhu_L_Xh_LE_unsplash_7a2c2cac8f.jpg",
357
+ previewUrl: null,
358
+ provider: "local",
359
+ provider_metadata: null,
360
+ },
361
+ },
362
+ {
363
+ id: 104,
364
+ image_title: "Koření",
365
+ image_description: null,
366
+ image: {
367
+ id: 10,
368
+ name: "calum-lewis-vA1L1jRTM70-unsplash.jpg",
369
+ alternativeText: "calum-lewis-vA1L1jRTM70-unsplash.jpg",
370
+ caption: "calum-lewis-vA1L1jRTM70-unsplash.jpg",
371
+ width: 3569,
372
+ height: 5353,
373
+ formats: {
374
+ thumbnail: {
375
+ name: "thumbnail_calum-lewis-vA1L1jRTM70-unsplash.jpg",
376
+ hash: "thumbnail_calum_lewis_v_A1_L1j_RTM_70_unsplash_5aff3a8997",
377
+ ext: ".jpg",
378
+ mime: "image/jpeg",
379
+ path: null,
380
+ width: 104,
381
+ height: 156,
382
+ size: 5.55,
383
+ url: "/uploads/thumbnail_calum_lewis_v_A1_L1j_RTM_70_unsplash_5aff3a8997.jpg",
384
+ },
385
+ large: {
386
+ name: "large_calum-lewis-vA1L1jRTM70-unsplash.jpg",
387
+ hash: "large_calum_lewis_v_A1_L1j_RTM_70_unsplash_5aff3a8997",
388
+ ext: ".jpg",
389
+ mime: "image/jpeg",
390
+ path: null,
391
+ width: 667,
392
+ height: 1000,
393
+ size: 116.32,
394
+ url: "/uploads/large_calum_lewis_v_A1_L1j_RTM_70_unsplash_5aff3a8997.jpg",
395
+ },
396
+ medium: {
397
+ name: "medium_calum-lewis-vA1L1jRTM70-unsplash.jpg",
398
+ hash: "medium_calum_lewis_v_A1_L1j_RTM_70_unsplash_5aff3a8997",
399
+ ext: ".jpg",
400
+ mime: "image/jpeg",
401
+ path: null,
402
+ width: 500,
403
+ height: 750,
404
+ size: 72.75,
405
+ url: "/uploads/medium_calum_lewis_v_A1_L1j_RTM_70_unsplash_5aff3a8997.jpg",
406
+ },
407
+ small: {
408
+ name: "small_calum-lewis-vA1L1jRTM70-unsplash.jpg",
409
+ hash: "small_calum_lewis_v_A1_L1j_RTM_70_unsplash_5aff3a8997",
410
+ ext: ".jpg",
411
+ mime: "image/jpeg",
412
+ path: null,
413
+ width: 333,
414
+ height: 500,
415
+ size: 36.52,
416
+ url: "/uploads/small_calum_lewis_v_A1_L1j_RTM_70_unsplash_5aff3a8997.jpg",
417
+ },
418
+ },
419
+ hash: "calum_lewis_v_A1_L1j_RTM_70_unsplash_5aff3a8997",
420
+ ext: ".jpg",
421
+ mime: "image/jpeg",
422
+ size: 2305.97,
423
+ url: "/uploads/calum_lewis_v_A1_L1j_RTM_70_unsplash_5aff3a8997.jpg",
424
+ previewUrl: null,
425
+ provider: "local",
426
+ provider_metadata: null,
427
+ },
428
+ },
429
+ ],
430
+ },
168
431
  };
169
432
 
170
433
  expect(result).toEqual(expected);