From df2ea046edb300f3b0cba5c0ffa96434cdb2851b Mon Sep 17 00:00:00 2001 From: Laura Martinez Garcia Date: Tue, 5 Sep 2023 08:28:11 +0200 Subject: [PATCH] chore: add promoted tagging object in search response --- .../src/__tests__/__fixtures__/search.response.ts | 6 +++++- .../search-response.mapper.spec.ts.snap | 13 ++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/packages/x-adapter-platform/src/__tests__/__fixtures__/search.response.ts b/packages/x-adapter-platform/src/__tests__/__fixtures__/search.response.ts index d6a8b3c002..72c7ec3496 100644 --- a/packages/x-adapter-platform/src/__tests__/__fixtures__/search.response.ts +++ b/packages/x-adapter-platform/src/__tests__/__fixtures__/search.response.ts @@ -307,7 +307,11 @@ export const platformSearchResponse = { id: '61f9223221c06701c2f98c17', image_url: 'https://assets.empathy.co/images-demo/31335.jpg', title: 'Promoted title', - url: 'https://assets.empathy.co/' + url: 'https://assets.empathy.co/', + tagging: { + click: + 'https://api.staging.empathy.co/tagging/v1/track/empathy/click?q=jeans&lang=en&scope=desktop&title=promoted+title&productId=61f9223221c06701c2f98c17&position=1&page=1&url=https://assets.empathy.co/&follow=false&origin=url%3Aexternal&filtered=false&spellcheck=false' + } } ] }, diff --git a/packages/x-adapter-platform/src/mappers/responses/__tests__/__snapshots__/search-response.mapper.spec.ts.snap b/packages/x-adapter-platform/src/mappers/responses/__tests__/__snapshots__/search-response.mapper.spec.ts.snap index 0f46f49040..dcca26cf5a 100644 --- a/packages/x-adapter-platform/src/mappers/responses/__tests__/__snapshots__/search-response.mapper.spec.ts.snap +++ b/packages/x-adapter-platform/src/mappers/responses/__tests__/__snapshots__/search-response.mapper.spec.ts.snap @@ -394,9 +394,20 @@ Object { "tagging": Object { "click": Object { "params": Object { + "filtered": "false", "follow": false, + "lang": "en", + "origin": "url:external", + "page": "1", + "position": "1", + "productId": "61f9223221c06701c2f98c17", + "q": "jeans", + "scope": "desktop", + "spellcheck": "false", + "title": "promoted title", + "url": "https://assets.empathy.co/", }, - "url": "", + "url": "https://api.staging.empathy.co/tagging/v1/track/empathy/click", }, }, "title": "Promoted title",