@contrail/flexplm 1.7.1-alpha.78479d6 → 1.7.1-alpha.9439d6e
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.
|
@@ -136,8 +136,8 @@ class ThumbnailUtil {
|
|
|
136
136
|
const eventData = event.data || {};
|
|
137
137
|
const newThumbnailId = eventData[ThumbnailUtil.NEW_THUMBNAIL_ID];
|
|
138
138
|
const existingThumbnailId = eventData[ThumbnailUtil.EXISTING_THUMBNAIL_ID];
|
|
139
|
-
const
|
|
140
|
-
const thumbnailUrl =
|
|
139
|
+
const thumbnailUrl = eventData[ThumbnailUtil.THUMBNAIL];
|
|
140
|
+
// const thumbnailUrl = newThumbnailId || existingThumbnailId;
|
|
141
141
|
// Case 1: REMOVE_THUMBNAIL
|
|
142
142
|
if (newThumbnailId === ThumbnailUtil.REMOVE_THUMBNAIL) {
|
|
143
143
|
if (primaryViewableId) {
|
|
@@ -350,7 +350,8 @@ describe('ThumbnailUtil Tests', () => {
|
|
|
350
350
|
primaryFileUrl: 'https://files/primary.png', largeViewableUrl: null,
|
|
351
351
|
mediumLargeViewableUrl: null, mediumViewableUrl: null, smallViewableUrl: null, tinyViewableUrl: null,
|
|
352
352
|
});
|
|
353
|
-
const event = { data: { [
|
|
353
|
+
// const event = { data: { [ThumbnailUtil.NEW_THUMBNAIL_ID]: '/rest/thumbnail/my image.png' } };
|
|
354
|
+
const event = { data: { [thumbnail_util_1.ThumbnailUtil.THUMBNAIL]: '/rest/thumbnail/my image.png' } };
|
|
354
355
|
await tu.syncThumbnailToVibeIQ({ entityId: 'entity1', event, entityName: 'color' });
|
|
355
356
|
expect(mockGetRequest).toHaveBeenCalledWith({
|
|
356
357
|
urlPath: '/rest/thumbnail/my%20image.png',
|
|
@@ -370,7 +371,8 @@ describe('ThumbnailUtil Tests', () => {
|
|
|
370
371
|
primaryFileUrl: 'https://files/primary.jpg', largeViewableUrl: null,
|
|
371
372
|
mediumLargeViewableUrl: null, mediumViewableUrl: null, smallViewableUrl: null, tinyViewableUrl: null,
|
|
372
373
|
});
|
|
373
|
-
const event = { data: { [
|
|
374
|
+
// const event = { data: { [ThumbnailUtil.NEW_THUMBNAIL_ID]: '/rest/thumbnail/café-logo.jpg' } };
|
|
375
|
+
const event = { data: { [thumbnail_util_1.ThumbnailUtil.THUMBNAIL]: '/rest/thumbnail/café-logo.jpg' } };
|
|
374
376
|
await tu.syncThumbnailToVibeIQ({ entityId: 'entity1', event, entityName: 'item' });
|
|
375
377
|
expect(mockGetRequest).toHaveBeenCalledWith({
|
|
376
378
|
urlPath: '/rest/thumbnail/caf%C3%A9-logo.jpg',
|
|
@@ -405,7 +407,8 @@ describe('ThumbnailUtil Tests', () => {
|
|
|
405
407
|
tinyViewableUrl: null,
|
|
406
408
|
};
|
|
407
409
|
mockContentCreate.mockResolvedValue(createdContent);
|
|
408
|
-
const event = { data: { [
|
|
410
|
+
// const event = { data: { [ThumbnailUtil.NEW_THUMBNAIL_ID]: '/rest/thumbnail/new.jpg' } };
|
|
411
|
+
const event = { data: { [thumbnail_util_1.ThumbnailUtil.THUMBNAIL]: '/rest/thumbnail/new.jpg' } };
|
|
409
412
|
await tu.syncThumbnailToVibeIQ({ entityId: 'entity1', primaryViewableId: 'oldPv', event, entityName: 'item' });
|
|
410
413
|
// Creates new content
|
|
411
414
|
expect(mockContentCreate).toHaveBeenCalled();
|