From 4fb98d08c814f66312ba6d2f557f0e368a31cc43 Mon Sep 17 00:00:00 2001 From: Mariia Lukianets Date: Tue, 17 Sep 2024 11:46:18 +0200 Subject: [PATCH] remove edge payload --- libs/features/mas/mocks/aem.js | 4 +- .../cf/fragments/search/edgePayload.json | 356 ------------------ 2 files changed, 2 insertions(+), 358 deletions(-) delete mode 100644 libs/features/mas/mocks/sites/cf/fragments/search/edgePayload.json diff --git a/libs/features/mas/mocks/aem.js b/libs/features/mas/mocks/aem.js index 9d859d83ce..3d6d5a9226 100644 --- a/libs/features/mas/mocks/aem.js +++ b/libs/features/mas/mocks/aem.js @@ -6,12 +6,12 @@ export async function withAem(originalFetch) { '/test/mocks/sites/cf/fragments/search/authorPayload.json', ); } else if (/cf\/fragments/.test(pathname) && searchParams.has('path')) { - const fragmentId = searchParams.get('fragmentId'); + const path = searchParams.get('path'); const item = await originalFetch( '/test/mocks/sites/cf/fragments/search/authorPayload.json', ) .then((res) => res.json()) - .then(({ items }) => items.find((item) => item.id === id)); + .then(({ items }) => items.find((item) => item.path === path)); if (item) { return Promise.resolve({ ok: true, diff --git a/libs/features/mas/mocks/sites/cf/fragments/search/edgePayload.json b/libs/features/mas/mocks/sites/cf/fragments/search/edgePayload.json deleted file mode 100644 index cf638313f1..0000000000 --- a/libs/features/mas/mocks/sites/cf/fragments/search/edgePayload.json +++ /dev/null @@ -1,356 +0,0 @@ -{ - "items": [ - { - "path": "/content/dam/sandbox/mas/creative-cloud", - "title": "Creative Cloud All Apps", - "description": "", - "id": "be9aa9c6-b8e9-4058-aa6b-f0125647479a", - "created": { - "at": "2024-05-08T12:05:03.588Z", - "by": "johndoe@adobe.com", - "fullName": "John Doe" - }, - "modified": { - "at": "2024-06-13T11:10:53.174Z", - "by": "johndoe@adobe.com", - "fullName": "John Doe" - }, - "published": { - "at": "2024-06-13T11:11:01.224Z", - "by": "johndoe@adobe.com", - "fullName": "John Doe" - }, - "status": "PUBLISHED", - "fields": [ - { - "name": "type", - "type": "enumeration", - "multiple": false, - "values": ["ccd-action"] - }, - { - "name": "icon", - "type": "text", - "multiple": true, - "values": ["/test/mocks/img/creative-cloud.svg"] - }, - { - "name": "name", - "type": "text", - "multiple": false, - "values": ["creative-cloud"] - }, - { - "name": "title", - "type": "text", - "multiple": false, - "values": ["Creative Cloud All Apps"] - }, - { - "name": "link", - "type": "text", - "multiple": false, - "values": [] - }, - { - "name": "prices", - "type": "long-text", - "multiple": false, - "mimeType": "text/html", - "values": [ - "" - ] - }, - { - "name": "description", - "type": "long-text", - "multiple": false, - "mimeType": "text/html", - "values": [ - "

Get 25 apps and games plus fonts, storage, templates, and tutorials for less than the price of Acrobat Pro, Photoshop, and Premiere Pro sold separately. (Substance 3D apps not included.)

" - ] - }, - { - "name": "secure", - "type": "boolean", - "multiple": false, - "values": [true] - }, - { - "name": "stock", - "type": "boolean", - "multiple": false, - "values": [true] - }, - { - "name": "ctas", - "type": "long-text", - "multiple": false, - "mimeType": "text/html", - "values": [ - "Buy nowFree trial" - ] - } - ], - "variations": [], - "tags": [], - "references": [], - "model": { - "id": "L2NvbmYvc2FuZGJveC9zZXR0aW5ncy9kYW0vY2ZtL21vZGVscy9tZXJjaC1jYXJk", - "path": "/conf/sandbox/settings/dam/cfm/models/merch-card", - "name": "Merch Card", - "title": "Merch Card", - "description": "content for adobe.com merch-card web component." - }, - "validationStatus": [], - "fieldTags": [], - "etag": "\"2028f561fa1f216104ee23d9ee4a141e\"" - }, - { - "path": "/content/dam/sandbox/mas/photoshop", - "title": "Photoshop", - "description": "", - "id": "d52dcff2-9dea-439e-a7a4-a53099ec9315", - "created": { - "at": "2024-05-08T12:05:04.785Z", - "by": "johndoe@adobe.com", - "fullName": "John Doe" - }, - "modified": { - "at": "2024-06-13T11:10:20.455Z", - "by": "johndoe@adobe.com", - "fullName": "John Doe" - }, - "published": { - "at": "2024-06-13T11:11:01.224Z", - "by": "johndoe@adobe.com", - "fullName": "John Doe" - }, - "status": "PUBLISHED", - "fields": [ - { - "name": "type", - "type": "enumeration", - "multiple": false, - "values": ["ccd-action"] - }, - { - "name": "icon", - "type": "text", - "multiple": true, - "values": ["/test/mocks/img/photoshop.svg"] - }, - { - "name": "name", - "type": "text", - "multiple": false, - "values": ["photoshop"] - }, - { - "name": "title", - "type": "text", - "multiple": false, - "values": ["Photoshop"] - }, - { - "name": "link", - "type": "text", - "multiple": false, - "values": [] - }, - { - "name": "prices", - "type": "long-text", - "multiple": false, - "mimeType": "text/html", - "values": [ - "" - ] - }, - { - "name": "description", - "type": "long-text", - "multiple": false, - "mimeType": "text/html", - "values": [ - "

Edit, composite, and create beautiful images, graphics, and art on desktop and iPad.

" - ] - }, - { - "name": "secure", - "type": "boolean", - "multiple": false, - "values": [true] - }, - { - "name": "stock", - "type": "boolean", - "multiple": false, - "values": [true] - }, - { - "name": "ctas", - "type": "long-text", - "multiple": false, - "mimeType": "text/html", - "values": [ - "Buy nowFree trial" - ] - } - ], - "variations": [], - "tags": [], - "references": [], - "model": { - "id": "L2NvbmYvc2FuZGJveC9zZXR0aW5ncy9kYW0vY2ZtL21vZGVscy9tZXJjaC1jYXJk", - "path": "/conf/sandbox/settings/dam/cfm/models/merch-card", - "name": "Merch Card", - "title": "Merch Card", - "description": "content for adobe.com merch-card web component." - }, - "validationStatus": [], - "fieldTags": [], - "etag": "\"343f00d61244effce6e55c31cc90d4f9\"" - }, - { - "path": "/content/dam/sandbox/mas/special-offers-students-and-teachers", - "title": "Special Offers Students and Teachers", - "description": "", - "id": "64382bf2-6308-4245-85c6-ea43e0edb287", - "created": { - "at": "2024-08-15T21:48:42.597Z", - "by": "johndoe@adobe.com", - "fullName": "John Doe" - }, - "modified": { - "at": "2024-08-27T11:58:39.08Z", - "by": "johndoe@adobe.com", - "fullName": "John Doe" - }, - "published": { - "at": "2024-08-26T09:22:58.047Z", - "by": "johndoe@adobe.com", - "fullName": "John Doe" - }, - "status": "MODIFIED", - "fields": [ - { - "name": "variant", - "type": "enumeration", - "multiple": false, - "locked": false, - "values": ["special-offers"] - }, - { - "name": "icon", - "type": "text", - "multiple": true, - "locked": false, - "values": [] - }, - { - "name": "name", - "type": "text", - "multiple": false, - "locked": false, - "values": ["Special Offers Students and Teachers"] - }, - { - "name": "title", - "type": "text", - "multiple": false, - "locked": false, - "values": ["Individuals"] - }, - { - "name": "link", - "type": "text", - "multiple": false, - "locked": false, - "values": [] - }, - { - "name": "backgroundImage", - "type": "text", - "multiple": false, - "locked": false, - "values": [ - "/test/img/special-offers-img2.png" - ] - }, - { - "name": "prices", - "type": "long-text", - "multiple": false, - "locked": false, - "mimeType": "text/html", - "values": [ - "

Save over 30% on Creative Cloud All Apps.

" - ] - }, - { - "name": "description", - "type": "long-text", - "multiple": false, - "locked": false, - "mimeType": "text/html", - "values": [ - "

Join us for the creative event of the year Oct 14-16. Register by August 31 and save US$200 on a full conference pass.

See terms

" - ] - }, - { - "name": "secure", - "type": "boolean", - "multiple": false, - "locked": false, - "values": [false] - }, - { - "name": "stock", - "type": "boolean", - "multiple": false, - "locked": false, - "values": [false] - }, - { - "name": "ctas", - "type": "long-text", - "multiple": false, - "locked": false, - "mimeType": "text/html", - "values": [ - "

Buy now

" - ] - }, - { - "name": "xlg", - "type": "text", - "multiple": false, - "locked": false, - "values": ["photoshop-lapsed"] - } - ], - "variations": [], - "tags": [], - "references": [], - "model": { - "id": "L2NvbmYvc2FuZGJveC9zZXR0aW5ncy9kYW0vY2ZtL21vZGVscy9tZXJjaC1jYXJk", - "path": "/conf/sandbox/settings/dam/cfm/models/merch-card", - "name": "Merch Card", - "title": "Merch Card", - "description": "content for adobe.com merch-card web component." - }, - "validationStatus": [ - { - "property": "fields.description.values[0].", - "message": "has unsafe html content" - }, - { - "property": "fields.ctas.values[0].", - "message": "has unsafe html content" - } - ], - "fieldTags": [] - } - ] -}