From 7426718275ad9e14b9b85d610c89dc98a41c4bde Mon Sep 17 00:00:00 2001 From: Raphaelle Cantin Date: Mon, 25 Nov 2024 17:27:43 +0000 Subject: [PATCH] Update tests to add addressables --- common/data/formats.ts | 3 + pipeline/src/helpers/getGraphQuery.ts | 107 +++++++++++++ pipeline/src/scripts/testGraphQuery.ts | 150 +++++------------- .../WXInvioAABlsbLHu.articles.json | 4 +- .../WcvPmSsAAG5B5-ox.articles.json | 6 +- .../Wn3Q3SoAACsAIeFI.event-formats.json | 2 +- .../WsuS_R8AACS1Nwlx.collection-venue.json | 38 ++--- .../WwVK3CAAAHm5Exxr.books.json | 116 ++++++++++++++ .../XK9p2RIAAO1vQn__.webcomics.json | 10 +- .../XUGruhEAACYASyJh.webcomics.json | 10 +- .../Y0U4GBEAAA__16h6.articles.json | 12 +- .../YbjAThEAACEAcPYF.articles.json | 14 +- .../YvtXgxAAACMA9j5d.people.json | 2 +- .../ZFt0WhQAAHnPEH7P.events.json | 38 ++--- .../ZJLZoRAAACIARz42.events.json | 12 +- .../ZQgdkREAAAbr6cRR.events.json | 32 ++-- .../ZRrijRIAAJNSARgG.events.json | 10 +- .../ZSPXJBAAACIAiERm.events.json | 14 +- .../ZTevFxAAACQAyHEk.events.json | 10 +- .../Zs8EuRAAAB4APxrA.visual-stories.json | 43 +++++ .../__snapshots__/addressables.test.ts.snap | 42 +++++ .../__snapshots__/article.test.ts.snap | 24 +-- .../__snapshots__/eventDocument.test.ts.snap | 30 ++-- .../__snapshots__/venues.test.ts.snap | 68 ++++---- .../test/transformers/addressables.test.ts | 28 ++++ pipeline/test/update-prismic-snapshots.ts | 47 +++++- 26 files changed, 596 insertions(+), 276 deletions(-) create mode 100644 pipeline/src/helpers/getGraphQuery.ts create mode 100644 pipeline/test/prismic-snapshots/WwVK3CAAAHm5Exxr.books.json create mode 100644 pipeline/test/prismic-snapshots/Zs8EuRAAAB4APxrA.visual-stories.json create mode 100644 pipeline/test/transformers/__snapshots__/addressables.test.ts.snap create mode 100644 pipeline/test/transformers/addressables.test.ts diff --git a/common/data/formats.ts b/common/data/formats.ts index 1e24c86d..b830d35a 100644 --- a/common/data/formats.ts +++ b/common/data/formats.ts @@ -16,6 +16,9 @@ export const contentTypes = [ 'exhibition-guides', 'stories-landing', 'collection-venue', + 'visual-stories', + 'exhibition-texts', + 'exhibition-highlight-tours', ] as const; export const articleFormatIds = { diff --git a/pipeline/src/helpers/getGraphQuery.ts b/pipeline/src/helpers/getGraphQuery.ts new file mode 100644 index 00000000..2359d142 --- /dev/null +++ b/pipeline/src/helpers/getGraphQuery.ts @@ -0,0 +1,107 @@ +import { + articlesQuery, + eventDocumentsQuery, + venueQuery, + webcomicsQuery, +} from '@weco/content-pipeline/src/graph-queries'; +import { + addressablesArticlesQuery, + addressablesBooksQuery, + addressablesEventsQuery, + addressablesExhibitionsQuery, + addressablesExhibitionTextsQuery, + addressablesHighlightToursQuery, + addressablesPagesQuery, + addressablesProjectsQuery, + addressablesSeasonsQuery, + addressablesVisualStoriesQuery, +} from '@weco/content-pipeline/src/graph-queries/addressables'; + +export const allowedTypes = [ + 'article', + 'webcomic', + 'event', + 'venue', + 'exhibition', + 'book', + 'page', + 'exhibition-text', + 'highlight-tour', + 'visual-story', + 'project', + 'season', +]; + +export const getGraphQuery = ({ + type, + isDetailed, +}: { + type: (typeof allowedTypes)[number]; + isDetailed?: boolean; +}) => { + switch (type) { + case 'article': + return `{ + ${isDetailed ? articlesQuery : addressablesArticlesQuery} + }`; + + case 'webcomic': + return `{ + ${webcomicsQuery} + }`; + + case 'event': + return isDetailed + ? eventDocumentsQuery + : `{ + ${addressablesEventsQuery} + }`; + + case 'venue': + return venueQuery; + + case 'exhibition': + return `{ + ${addressablesExhibitionsQuery} + }`; + + case 'book': + return `{ + ${addressablesBooksQuery} + }`; + + case 'page': + return `{ + ${addressablesPagesQuery} + }`; + + case 'visual-story': + return `{ + ${addressablesVisualStoriesQuery} + }`; + + case 'exhibition-text': + return `{ + ${addressablesExhibitionTextsQuery} + }`; + + case 'highlight-tour': + return `{ + ${addressablesHighlightToursQuery} + }`; + + case 'project': + return `{ + ${addressablesProjectsQuery} + }`; + + case 'season': + return `{ + ${addressablesSeasonsQuery} + }`; + + default: + console.error(`Allowed types are ${allowedTypes.join(', ')}.`); + process.exit(1); + } +}; diff --git a/pipeline/src/scripts/testGraphQuery.ts b/pipeline/src/scripts/testGraphQuery.ts index e3e61b20..ad71cd77 100644 --- a/pipeline/src/scripts/testGraphQuery.ts +++ b/pipeline/src/scripts/testGraphQuery.ts @@ -2,24 +2,10 @@ import util from 'util'; import yargs from 'yargs'; import { - articlesQuery, - eventDocumentsQuery, - venueQuery, - webcomicsQuery, -} from './../graph-queries'; -import { - addressablesArticlesQuery, - addressablesBooksQuery, - addressablesEventsQuery, - addressablesExhibitionsQuery, - addressablesExhibitionTextsQuery, - addressablesHighlightToursQuery, - addressablesPagesQuery, - addressablesProjectsQuery, - addressablesSeasonsQuery, - addressablesVisualStoriesQuery, -} from './../graph-queries/addressables'; -import { createPrismicClient } from './../services/prismic'; + allowedTypes, + getGraphQuery, +} from '@weco/content-pipeline/src/helpers/getGraphQuery'; +import { createPrismicClient } from '@weco/content-pipeline/src/services/prismic'; const { type, isDetailed, id } = yargs(process.argv.slice(2)) .usage('Usage: $0 --type [string] --isDetailed [boolean] --id [string]') @@ -30,21 +16,6 @@ const { type, isDetailed, id } = yargs(process.argv.slice(2)) }) .parseSync(); -const allowedTypes = [ - 'article', - 'webcomic', - 'event', - 'venue', - 'exhibition', - 'book', - 'page', - 'exhibition-text', - 'highlight-tour', - 'visual-story', - 'project', - 'season', -]; - async function main() { if (!type) { console.error( @@ -53,130 +24,91 @@ async function main() { process.exit(1); } - let graphQueryName; - const query = () => { + const client = createPrismicClient(); + + const getGraphInfo = ({ + type, + isDetailed, + id, + }: { + type: (typeof allowedTypes)[number]; + isDetailed?: boolean; + id?: string; + }) => { switch (type) { case 'article': - graphQueryName = isDetailed - ? 'articlesQuery' - : 'addressablesArticlesQuery'; - return { - graphQuery: `{ - ${isDetailed ? articlesQuery : addressablesArticlesQuery} - }`, + graphQueryName: isDetailed + ? 'articlesQuery' + : 'addressablesArticlesQuery', id: id || 'ZdSMbREAACQA3j30', }; case 'webcomic': - graphQueryName = 'webcomicsQuery'; - return { - graphQuery: `{ - ${webcomicsQuery} - }`, + graphQueryName: 'webcomicsQuery', id: id || 'XkV9dREAAAPkNP0b', }; case 'event': - graphQueryName = isDetailed - ? 'eventDocumentsQuery' - : 'addressablesEventsQuery'; - return { - graphQuery: isDetailed - ? eventDocumentsQuery - : `{ - ${addressablesEventsQuery} - }`, + graphQueryName: isDetailed + ? 'eventDocumentsQuery' + : 'addressablesEventsQuery', id: id || 'ZfhSyxgAACQAkLPZ', }; case 'venue': - graphQueryName = 'venueQuery'; - return { - graphQuery: venueQuery, + graphQueryName: 'venueQuery', id: id || 'Wsttgx8AAJeSNmJ4', }; case 'exhibition': - graphQueryName = 'addressablesExhibitionsQuery'; - return { - graphQuery: `{ - ${addressablesExhibitionsQuery} - }`, + graphQueryName: 'addressablesExhibitionsQuery', id: id || 'Yzv9ChEAABfUrkVp', }; case 'book': - graphQueryName = 'addressablesBooksQuery'; - return { - graphQuery: `{ - ${addressablesBooksQuery} - }`, + graphQueryName: 'addressablesBooksQuery', id: id || 'ZijgihEAACMAtL-k', }; case 'page': - graphQueryName = 'addressablesPagesQuery'; - return { - graphQuery: `{ - ${addressablesPagesQuery} - }`, + graphQueryName: 'addressablesPagesQuery', id: id || 'YdXSvhAAAIAW7YXQ', }; case 'visual-story': - graphQueryName = 'addressablesVisualStoriesQuery'; - return { - graphQuery: `{ - ${addressablesVisualStoriesQuery} - }`, + graphQueryName: 'addressablesVisualStoriesQuery', id: id || 'Zs8EuRAAAB4APxrA', }; case 'exhibition-text': - graphQueryName = 'addressablesExhibitionTextsQuery'; - return { - graphQuery: `{ - ${addressablesExhibitionTextsQuery} - }`, + graphQueryName: 'addressablesExhibitionTextsQuery', id: id || 'Zs8mohAAAB4AP4sc', }; case 'highlight-tour': - graphQueryName = 'addressablesHighlightToursQuery'; - return { - graphQuery: `{ - ${addressablesHighlightToursQuery} - }`, + graphQueryName: 'addressablesHighlightToursQuery', id: id || 'ZthrZRIAACQALvCC', }; case 'project': - graphQueryName = 'addressablesProjectsQuery'; - return { - graphQuery: `{ - ${addressablesProjectsQuery} - }`, + graphQueryName: 'addressablesProjectsQuery', id: id || 'Ys1-OxEAACEAguyS', }; case 'season': - graphQueryName = 'addressablesSeasonsQuery'; - return { - graphQuery: `{ - ${addressablesSeasonsQuery} - }`, + graphQueryName: 'addressablesSeasonsQuery', id: id || 'X84FvhIAACUAqiqp', }; @@ -186,23 +118,27 @@ async function main() { } }; - const client = createPrismicClient(); - - const queryResult = query(); + const graphInfo = getGraphInfo({ type, isDetailed, id }); + const graphQuery = getGraphQuery({ type, isDetailed }); - if (!queryResult) { - console.error('Something went wrong with queryResult', queryResult); + if (!graphInfo || graphQuery) { + console.error('Something went wrong with queryResult', { + graphInfo, + graphQuery, + }); process.exit(1); } - const doc = await client.getByID(queryResult.id, { - graphQuery: queryResult.graphQuery.replace(/\n(\s+)/g, '\n'), + const doc = await client.getByID(graphInfo.id, { + graphQuery: graphQuery.replace(/\n(\s+)/g, '\n'), }); console.log( util.inspect(doc, { showHidden: false, depth: null, colors: true }) ); - console.log(`\n\x1b[4mThis is the result from ${graphQueryName}.\x1b[0m\n`); + console.log( + `\n\x1b[4mThis is the result from ${graphInfo.graphQueryName}.\x1b[0m\n` + ); } main(); diff --git a/pipeline/test/prismic-snapshots/WXInvioAABlsbLHu.articles.json b/pipeline/test/prismic-snapshots/WXInvioAABlsbLHu.articles.json index eb7fe9d1..e4a718da 100644 --- a/pipeline/test/prismic-snapshots/WXInvioAABlsbLHu.articles.json +++ b/pipeline/test/prismic-snapshots/WXInvioAABlsbLHu.articles.json @@ -3,10 +3,10 @@ "uid": "ken-s-ten--looking-back-at-ten-years-of-wellcome-collection", "url": null, "type": "articles", - "href": "https://wellcomecollection.cdn.prismic.io/api/v2/documents/search?ref=ZwQMYRAAAJvKPfl1&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22WXInvioAABlsbLHu%22%29+%5D%5D", + "href": "https://wellcomecollection.cdn.prismic.io/api/v2/documents/search?ref=Z0RloBAAAB8ADKKG&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22WXInvioAABlsbLHu%22%29+%5D%5D", "tags": ["delist"], "first_publication_date": "2024-05-07T15:46:28+0000", - "last_publication_date": "2024-07-22T15:39:27+0000", + "last_publication_date": "2024-10-23T14:49:47+0000", "slugs": ["kens-ten-looking-back-at-ten-years-of-wellcome-collection"], "linked_documents": [], "lang": "en-gb", diff --git a/pipeline/test/prismic-snapshots/WcvPmSsAAG5B5-ox.articles.json b/pipeline/test/prismic-snapshots/WcvPmSsAAG5B5-ox.articles.json index c31e6d97..0e2986fa 100644 --- a/pipeline/test/prismic-snapshots/WcvPmSsAAG5B5-ox.articles.json +++ b/pipeline/test/prismic-snapshots/WcvPmSsAAG5B5-ox.articles.json @@ -3,10 +3,10 @@ "uid": "the-key-to-memory--follow-your-nose", "url": null, "type": "articles", - "href": "https://wellcomecollection.cdn.prismic.io/api/v2/documents/search?ref=ZwQMYRAAAJvKPfl1&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22WcvPmSsAAG5B5-ox%22%29+%5D%5D", + "href": "https://wellcomecollection.cdn.prismic.io/api/v2/documents/search?ref=Z0RloBAAAB8ADKKG&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22WcvPmSsAAG5B5-ox%22%29+%5D%5D", "tags": [], "first_publication_date": "2017-10-11T08:30:00+0000", - "last_publication_date": "2024-07-22T16:13:04+0000", + "last_publication_date": "2024-10-23T14:36:08+0000", "slugs": ["the-key-to-memory-follow-your-nose"], "linked_documents": [], "lang": "en-gb", @@ -585,7 +585,7 @@ "lang": "en-gb", "slug": "memory-objects", "first_publication_date": "2017-10-02T13:40:48+0000", - "last_publication_date": "2024-09-24T13:27:17+0000", + "last_publication_date": "2024-10-23T08:50:24+0000", "uid": "memory-objects", "data": { "title": [ diff --git a/pipeline/test/prismic-snapshots/Wn3Q3SoAACsAIeFI.event-formats.json b/pipeline/test/prismic-snapshots/Wn3Q3SoAACsAIeFI.event-formats.json index 3c41509a..0b99dfba 100644 --- a/pipeline/test/prismic-snapshots/Wn3Q3SoAACsAIeFI.event-formats.json +++ b/pipeline/test/prismic-snapshots/Wn3Q3SoAACsAIeFI.event-formats.json @@ -3,7 +3,7 @@ "uid": null, "url": null, "type": "event-formats", - "href": "https://wellcomecollection.cdn.prismic.io/api/v2/documents/search?ref=ZwQMYRAAAJvKPfl1&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22Wn3Q3SoAACsAIeFI%22%29+%5D%5D", + "href": "https://wellcomecollection.cdn.prismic.io/api/v2/documents/search?ref=Z0RloBAAAB8ADKKG&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22Wn3Q3SoAACsAIeFI%22%29+%5D%5D", "tags": [], "first_publication_date": "2018-02-09T16:48:32+0000", "last_publication_date": "2019-10-22T09:37:37+0000", diff --git a/pipeline/test/prismic-snapshots/WsuS_R8AACS1Nwlx.collection-venue.json b/pipeline/test/prismic-snapshots/WsuS_R8AACS1Nwlx.collection-venue.json index 7594d910..f361a858 100644 --- a/pipeline/test/prismic-snapshots/WsuS_R8AACS1Nwlx.collection-venue.json +++ b/pipeline/test/prismic-snapshots/WsuS_R8AACS1Nwlx.collection-venue.json @@ -3,10 +3,10 @@ "uid": null, "url": null, "type": "collection-venue", - "href": "https://wellcomecollection.cdn.prismic.io/api/v2/documents/search?ref=ZwQMYRAAAJvKPfl1&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22WsuS_R8AACS1Nwlx%22%29+%5D%5D", + "href": "https://wellcomecollection.cdn.prismic.io/api/v2/documents/search?ref=Z0RloBAAAB8ADKKG&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22WsuS_R8AACS1Nwlx%22%29+%5D%5D", "tags": ["ShortNoticeClosure"], "first_publication_date": "2018-04-09T16:21:23+0000", - "last_publication_date": "2024-07-19T17:18:20+0000", + "last_publication_date": "2024-11-14T16:09:03+0000", "slugs": ["library"], "linked_documents": [], "lang": "en-gb", @@ -57,62 +57,62 @@ ], "modifiedDayOpeningTimes": [ { - "overrideDate": "2024-05-03T23:00:00+0000", - "type": "Bank holiday", + "overrideDate": "2024-12-21T00:00:00+0000", + "type": "Christmas and New Year", "startDateTime": null, "endDateTime": null }, { - "overrideDate": "2024-05-05T23:00:00+0000", - "type": "Bank holiday", + "overrideDate": "2024-12-23T00:00:00+0000", + "type": "Christmas and New Year", "startDateTime": null, "endDateTime": null }, { - "overrideDate": "2024-05-24T23:00:00+0000", - "type": "Bank holiday", + "overrideDate": "2024-12-24T00:00:00+0000", + "type": "Christmas and New Year", "startDateTime": null, "endDateTime": null }, { - "overrideDate": "2024-05-26T23:00:00+0000", - "type": "Bank holiday", + "overrideDate": "2024-12-25T00:00:00+0000", + "type": "Christmas and New Year", "startDateTime": null, "endDateTime": null }, { - "overrideDate": "2024-08-23T23:00:00+0000", - "type": "Bank holiday", + "overrideDate": "2024-12-26T00:00:00+0000", + "type": "Christmas and New Year", "startDateTime": null, "endDateTime": null }, { - "overrideDate": "2024-08-25T23:00:00+0000", - "type": "Bank holiday", + "overrideDate": "2024-12-27T00:00:00+0000", + "type": "Christmas and New Year", "startDateTime": null, "endDateTime": null }, { - "overrideDate": "2024-12-23T00:00:00+0000", + "overrideDate": "2024-12-28T00:00:00+0000", "type": "Christmas and New Year", "startDateTime": null, "endDateTime": null }, { - "overrideDate": "2024-12-24T00:00:00+0000", + "overrideDate": "2024-12-30T00:00:00+0000", "type": "Christmas and New Year", "startDateTime": null, "endDateTime": null }, { - "overrideDate": "2024-12-30T00:00:00+0000", + "overrideDate": "2024-12-31T00:00:00+0000", "type": "Christmas and New Year", "startDateTime": null, "endDateTime": null }, { - "overrideDate": "2024-11-04T00:00:00+0000", - "type": "other", + "overrideDate": "2025-01-01T00:00:00+0000", + "type": "Christmas and New Year", "startDateTime": null, "endDateTime": null } diff --git a/pipeline/test/prismic-snapshots/WwVK3CAAAHm5Exxr.books.json b/pipeline/test/prismic-snapshots/WwVK3CAAAHm5Exxr.books.json new file mode 100644 index 00000000..0e274740 --- /dev/null +++ b/pipeline/test/prismic-snapshots/WwVK3CAAAHm5Exxr.books.json @@ -0,0 +1,116 @@ +{ + "id": "WwVK3CAAAHm5Exxr", + "uid": "brains", + "url": null, + "type": "books", + "href": "https://wellcomecollection.cdn.prismic.io/api/v2/documents/search?ref=Z0RloBAAAB8ADKKG&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22WwVK3CAAAHm5Exxr%22%29+%5D%5D", + "tags": [], + "first_publication_date": "2018-05-24T13:12:21+0000", + "last_publication_date": "2024-07-22T11:06:39+0000", + "slugs": ["brains"], + "linked_documents": [], + "lang": "en-gb", + "alternate_languages": [], + "data": { + "title": [ + { + "type": "heading1", + "text": "Brains", + "spans": [] + } + ], + "subtitle": [ + { + "type": "paragraph", + "text": "The mind as matter", + "spans": [] + } + ], + "body": [ + { + "variation": "default", + "version": "initial", + "items": [], + "primary": { + "text": [ + { + "type": "paragraph", + "text": "'Brains' asks not what brains do to us, but what we have done to brains, focusing on the bodily presence of the organ rather than investigating the neuroscience of the mind.", + "spans": [] + }, + { + "type": "paragraph", + "text": "This fully illustrated and fascinating exploration of the brain has been published to accompany Wellcome Collection's ‘Brains’ exhibition. The brain is a unique and enigmatic organ. It cannot be transplanted, and is one of the most complex entities in the known universe. ‘Brains’ explores the ways that we have sought to understand and classify the brain over the centuries.", + "spans": [ + { + "start": 120, + "end": 126, + "type": "hyperlink", + "data": { + "link_type": "Web", + "url": "https://wellcomecollection.org/exhibitions/brains-mind-matter" + } + } + ] + } + ] + }, + "id": "text$38dcd490-f123-4760-afed-561087451d54", + "slice_type": "text", + "slice_label": null + } + ], + "contributors": [ + { + "contributor": { + "id": "W4ejax4AACEAg6MZ", + "type": "people", + "tags": [], + "lang": "en-gb", + "slug": "marius-kwint", + "first_publication_date": "2018-08-30T07:57:36+0000", + "last_publication_date": "2019-01-16T16:17:51+0000", + "data": { + "name": "Marius Kwint" + }, + "link_type": "Document", + "isBroken": false + } + }, + { + "contributor": { + "id": "W4ejSB4AAB8Ag6J9", + "type": "people", + "tags": [], + "lang": "en-gb", + "slug": "richard-wingate", + "first_publication_date": "2018-08-30T07:57:03+0000", + "last_publication_date": "2019-01-16T16:17:51+0000", + "data": { + "name": "Richard Wingate" + }, + "link_type": "Document", + "isBroken": false + } + } + ], + "promo": [ + { + "primary": { + "caption": [ + { + "type": "paragraph", + "text": "A fully illustrated and fascinating exploration of the brain.", + "spans": [] + } + ], + "link": null + }, + "items": [], + "id": "editorialImage$2b8ee605-c969-4597-91d3-065434f851f9", + "slice_type": "editorialImage", + "slice_label": null + } + ] + } +} diff --git a/pipeline/test/prismic-snapshots/XK9p2RIAAO1vQn__.webcomics.json b/pipeline/test/prismic-snapshots/XK9p2RIAAO1vQn__.webcomics.json index 093f265e..3a46f187 100644 --- a/pipeline/test/prismic-snapshots/XK9p2RIAAO1vQn__.webcomics.json +++ b/pipeline/test/prismic-snapshots/XK9p2RIAAO1vQn__.webcomics.json @@ -3,10 +3,10 @@ "uid": "groan", "url": null, "type": "webcomics", - "href": "https://wellcomecollection.cdn.prismic.io/api/v2/documents/search?ref=ZwQMYRAAAJvKPfl1&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22XK9p2RIAAO1vQn__%22%29+%5D%5D", + "href": "https://wellcomecollection.cdn.prismic.io/api/v2/documents/search?ref=Z0RloBAAAB8ADKKG&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22XK9p2RIAAO1vQn__%22%29+%5D%5D", "tags": [], "first_publication_date": "2019-04-12T09:00:00+0000", - "last_publication_date": "2024-07-22T13:24:58+0000", + "last_publication_date": "2024-10-23T10:21:31+0000", "slugs": ["groan"], "linked_documents": [], "lang": "en-gb", @@ -109,7 +109,7 @@ }, "alt": "Groan comic by Rob Bidder (detail)", "copyright": "Groan|Rob Bidder|||CC-BY-NC|Rob Bidder| ", - "url": "https://images.prismic.io/wellcomecollection%2F6c8b776e-7f41-41eb-82e7-3b6dfb3eedee_groan_promo.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection%2F6c8b776e-7f41-41eb-82e7-3b6dfb3eedee_groan_promo.jpg?auto=compress,format&rect=0,75,1600,750&w=3200&h=1500", "id": "XK9ofhIAAOA9QnrN", "edit": { "x": 0, @@ -125,7 +125,7 @@ }, "alt": "Groan comic by Rob Bidder (detail)", "copyright": "Groan|Rob Bidder|||CC-BY-NC|Rob Bidder| ", - "url": "https://images.prismic.io/wellcomecollection%2F6c8b776e-7f41-41eb-82e7-3b6dfb3eedee_groan_promo.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection%2F6c8b776e-7f41-41eb-82e7-3b6dfb3eedee_groan_promo.jpg?auto=compress,format&rect=0,0,1600,900&w=3200&h=1800", "id": "XK9ofhIAAOA9QnrN", "edit": { "x": 0, @@ -141,7 +141,7 @@ }, "alt": "Groan comic by Rob Bidder (detail)", "copyright": "Groan|Rob Bidder|||CC-BY-NC|Rob Bidder| ", - "url": "https://images.prismic.io/wellcomecollection%2F6c8b776e-7f41-41eb-82e7-3b6dfb3eedee_groan_promo.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection%2F6c8b776e-7f41-41eb-82e7-3b6dfb3eedee_groan_promo.jpg?auto=compress,format&rect=350,0,900,900&w=3200&h=3200", "id": "XK9ofhIAAOA9QnrN", "edit": { "x": -1244, diff --git a/pipeline/test/prismic-snapshots/XUGruhEAACYASyJh.webcomics.json b/pipeline/test/prismic-snapshots/XUGruhEAACYASyJh.webcomics.json index f6b51cda..5e1dea37 100644 --- a/pipeline/test/prismic-snapshots/XUGruhEAACYASyJh.webcomics.json +++ b/pipeline/test/prismic-snapshots/XUGruhEAACYASyJh.webcomics.json @@ -3,10 +3,10 @@ "uid": "footpath", "url": null, "type": "webcomics", - "href": "https://wellcomecollection.cdn.prismic.io/api/v2/documents/search?ref=ZwQMYRAAAJvKPfl1&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22XUGruhEAACYASyJh%22%29+%5D%5D", + "href": "https://wellcomecollection.cdn.prismic.io/api/v2/documents/search?ref=Z0RloBAAAB8ADKKG&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22XUGruhEAACYASyJh%22%29+%5D%5D", "tags": [], "first_publication_date": "2019-08-02T09:00:00+0000", - "last_publication_date": "2024-07-22T13:25:01+0000", + "last_publication_date": "2024-10-23T10:21:33+0000", "slugs": ["footpath"], "linked_documents": [], "lang": "en-gb", @@ -109,7 +109,7 @@ }, "alt": "Footpath comic by Rob Bidder (detail)", "copyright": "Footpath, Rob Bidder | | | | CC-BY-NC | Rob Bidder |", - "url": "https://images.prismic.io/wellcomecollection%2Fe427f062-73a8-43a0-b7c4-92e36528df8e_footpathpromo.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection%2Fe427f062-73a8-43a0-b7c4-92e36528df8e_footpathpromo.jpg?auto=compress,format&rect=0,75,1600,750&w=3200&h=1500", "id": "XUP2ahEAACAAtd4J", "edit": { "x": 0, @@ -125,7 +125,7 @@ }, "alt": "Footpath comic by Rob Bidder (detail)", "copyright": "Footpath, Rob Bidder | | | | CC-BY-NC | Rob Bidder |", - "url": "https://images.prismic.io/wellcomecollection%2Fe427f062-73a8-43a0-b7c4-92e36528df8e_footpathpromo.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection%2Fe427f062-73a8-43a0-b7c4-92e36528df8e_footpathpromo.jpg?auto=compress,format&rect=0,0,1600,900&w=3200&h=1800", "id": "XUP2ahEAACAAtd4J", "edit": { "x": 0, @@ -141,7 +141,7 @@ }, "alt": "Footpath comic by Rob Bidder (detail)", "copyright": "Footpath, Rob Bidder | | | | CC-BY-NC | Rob Bidder |", - "url": "https://images.prismic.io/wellcomecollection%2Fe427f062-73a8-43a0-b7c4-92e36528df8e_footpathpromo.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection%2Fe427f062-73a8-43a0-b7c4-92e36528df8e_footpathpromo.jpg?auto=compress,format&rect=350,0,900,900&w=3200&h=3200", "id": "XUP2ahEAACAAtd4J", "edit": { "x": -1244, diff --git a/pipeline/test/prismic-snapshots/Y0U4GBEAAA__16h6.articles.json b/pipeline/test/prismic-snapshots/Y0U4GBEAAA__16h6.articles.json index 114764d7..3dd6b6de 100644 --- a/pipeline/test/prismic-snapshots/Y0U4GBEAAA__16h6.articles.json +++ b/pipeline/test/prismic-snapshots/Y0U4GBEAAA__16h6.articles.json @@ -3,10 +3,10 @@ "uid": "tracing-the-roots-of-our-fears-and-fixations", "url": null, "type": "articles", - "href": "https://wellcomecollection.cdn.prismic.io/api/v2/documents/search?ref=ZwQMYRAAAJvKPfl1&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22Y0U4GBEAAA__16h6%22%29+%5D%5D", + "href": "https://wellcomecollection.cdn.prismic.io/api/v2/documents/search?ref=Z0RloBAAAB8ADKKG&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22Y0U4GBEAAA__16h6%22%29+%5D%5D", "tags": [], "first_publication_date": "2022-10-18T09:00:00+0000", - "last_publication_date": "2024-09-25T10:38:16+0000", + "last_publication_date": "2024-10-23T14:38:42+0000", "slugs": ["tracing-the-roots-of-our-fears-and-fixations"], "linked_documents": [], "lang": "en-gb", @@ -709,7 +709,7 @@ }, "alt": "Digital montage artwork made up of archive illustrations, photographs and graphical shapes. The overall hues of the artwork are reds, yellows and blacks. There are a number of references across the artwork, some cut out, others framed in regular shapes, but all touching on the theme of phobias. There's a large spider, an aeroplane flying upside-down, a large crowd, a man trapped in a small box, a dog with a dashed white sightline coming from its head and an image of the grim reaper standing behind a man. ", "copyright": "Phobias | | | | | Tim Robinson for Wellcome Collection |", - "url": "https://images.prismic.io/wellcomecollection/e40a5234-98be-4bae-a9fb-0d0f0d0de8fd_Phobias-WellcomeCollection-TRart9-29-22.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/e40a5234-98be-4bae-a9fb-0d0f0d0de8fd_Phobias-WellcomeCollection-TRart9-29-22.jpg?auto=compress,format&rect=0,0,4000,1875&w=3200&h=1500", "id": "Y0WZMhEAAImM2WpE", "edit": { "x": 0, @@ -725,7 +725,7 @@ }, "alt": "Digital montage artwork made up of archive illustrations, photographs and graphical shapes. The overall hues of the artwork are reds, yellows and blacks. There are a number of references across the artwork, some cut out, others framed in regular shapes, but all touching on the theme of phobias. There's a large spider, an aeroplane flying upside-down, a large crowd, a man trapped in a small box, a dog with a dashed white sightline coming from its head and an image of the grim reaper standing behind a man. ", "copyright": "Phobias | | | | | Tim Robinson for Wellcome Collection |", - "url": "https://images.prismic.io/wellcomecollection/e40a5234-98be-4bae-a9fb-0d0f0d0de8fd_Phobias-WellcomeCollection-TRart9-29-22.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/e40a5234-98be-4bae-a9fb-0d0f0d0de8fd_Phobias-WellcomeCollection-TRart9-29-22.jpg?auto=compress,format&rect=0,0,4000,2250&w=3200&h=1800", "id": "Y0WZMhEAAImM2WpE", "edit": { "x": 0, @@ -741,7 +741,7 @@ }, "alt": "Digital montage artwork made up of archive illustrations, photographs and graphical shapes. The overall hues of the artwork are reds, yellows and blacks. There are a number of references across the artwork, some cut out, others framed in regular shapes, but all touching on the theme of phobias. There's a large spider, an aeroplane flying upside-down, a large crowd, a man trapped in a small box, a dog with a dashed white sightline coming from its head and an image of the grim reaper standing behind a man. ", "copyright": "Phobias | | | | | Tim Robinson for Wellcome Collection |", - "url": "https://images.prismic.io/wellcomecollection/e40a5234-98be-4bae-a9fb-0d0f0d0de8fd_Phobias-WellcomeCollection-TRart9-29-22.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/e40a5234-98be-4bae-a9fb-0d0f0d0de8fd_Phobias-WellcomeCollection-TRart9-29-22.jpg?auto=compress,format&rect=0,0,2250,2250&w=3200&h=3200", "id": "Y0WZMhEAAImM2WpE", "edit": { "x": 0, @@ -768,7 +768,7 @@ "lang": "en-gb", "slug": "inside-our-books", "first_publication_date": "2018-12-17T11:45:08+0000", - "last_publication_date": "2024-09-24T13:28:57+0000", + "last_publication_date": "2024-10-23T08:50:28+0000", "uid": "inside-our-books", "data": { "title": [ diff --git a/pipeline/test/prismic-snapshots/YbjAThEAACEAcPYF.articles.json b/pipeline/test/prismic-snapshots/YbjAThEAACEAcPYF.articles.json index fa4d885f..2e9b3b35 100644 --- a/pipeline/test/prismic-snapshots/YbjAThEAACEAcPYF.articles.json +++ b/pipeline/test/prismic-snapshots/YbjAThEAACEAcPYF.articles.json @@ -3,10 +3,10 @@ "uid": "the-enigma-of-the-medieval-folding-almanac", "url": null, "type": "articles", - "href": "https://wellcomecollection.cdn.prismic.io/api/v2/documents/search?ref=ZwQMYRAAAJvKPfl1&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22YbjAThEAACEAcPYF%22%29+%5D%5D", + "href": "https://wellcomecollection.cdn.prismic.io/api/v2/documents/search?ref=Z0RloBAAAB8ADKKG&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22YbjAThEAACEAcPYF%22%29+%5D%5D", "tags": [], "first_publication_date": "2022-01-10T10:59:43+0000", - "last_publication_date": "2024-07-22T16:21:57+0000", + "last_publication_date": "2024-10-23T14:35:21+0000", "slugs": ["the-enigma-of-the-medieval-folding-almanac"], "linked_documents": [], "lang": "en-gb", @@ -367,7 +367,7 @@ }, "alt": "Photograph of a fragile folding almanac from the 15th century. The almanac is spotlit on a black background. It has an intricate woven green and pink fabric cover and folded internal pages. It is rectangular in shape, but with a triangular taper on the left short end.", "copyright": "English folding almanac in Latin, 1415-20 | Photo: Benjamin Gilbert | Wellcome Collection | https://wellcomecollection.org/works/a2y8zd6x | CC-BY | |", - "url": "https://images.prismic.io/wellcomecollection/51e7fe3d-6fb6-45b6-979c-9d1e0c20abd0_default09-2.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/51e7fe3d-6fb6-45b6-979c-9d1e0c20abd0_default09-2.jpg?auto=compress,format&rect=0,672,4000,1875&w=3200&h=1500", "id": "YbtigREAACIAfIIl", "edit": { "x": 0, @@ -383,7 +383,7 @@ }, "alt": "Photograph of a fragile folding almanac from the 15th century. The almanac is spotlit on a black background. It has an intricate woven green and pink fabric cover and folded internal pages. It is rectangular in shape, but with a triangular taper on the left short end.", "copyright": "English folding almanac in Latin, 1415-20 | Photo: Benjamin Gilbert | Wellcome Collection | https://wellcomecollection.org/works/a2y8zd6x | CC-BY | |", - "url": "https://images.prismic.io/wellcomecollection/51e7fe3d-6fb6-45b6-979c-9d1e0c20abd0_default09-2.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/51e7fe3d-6fb6-45b6-979c-9d1e0c20abd0_default09-2.jpg?auto=compress,format&rect=0,507,4000,2250&w=3200&h=1800", "id": "YbtigREAACIAfIIl", "edit": { "x": 0, @@ -399,7 +399,7 @@ }, "alt": "Photograph of a fragile folding almanac from the 15th century. The almanac is spotlit on a black background. It has an intricate woven green and pink fabric cover and folded internal pages. It is rectangular in shape, but with a triangular taper on the left short end.", "copyright": "English folding almanac in Latin, 1415-20 | Photo: Benjamin Gilbert | Wellcome Collection | https://wellcomecollection.org/works/a2y8zd6x | CC-BY | |", - "url": "https://images.prismic.io/wellcomecollection/51e7fe3d-6fb6-45b6-979c-9d1e0c20abd0_default09-2.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/51e7fe3d-6fb6-45b6-979c-9d1e0c20abd0_default09-2.jpg?auto=compress,format&rect=447,0,3105,3105&w=3200&h=3200", "id": "YbtigREAACIAfIIl", "edit": { "x": -460, @@ -426,7 +426,7 @@ "lang": "en-gb", "slug": "modern-encounters-with-a-medieval-almanac", "first_publication_date": "2021-12-14T15:50:39+0000", - "last_publication_date": "2024-09-24T13:28:16+0000", + "last_publication_date": "2024-10-23T08:50:24+0000", "uid": "modern-encounters-with-a-medieval-almanac", "data": { "title": [ @@ -468,7 +468,7 @@ "lang": "en-gb", "slug": "inside-our-collections", "first_publication_date": "2018-04-04T09:02:43+0000", - "last_publication_date": "2024-09-24T13:46:18+0000", + "last_publication_date": "2024-10-23T08:50:30+0000", "uid": "inside-our-collections", "data": { "title": [ diff --git a/pipeline/test/prismic-snapshots/YvtXgxAAACMA9j5d.people.json b/pipeline/test/prismic-snapshots/YvtXgxAAACMA9j5d.people.json index 830372e4..5d0eddae 100644 --- a/pipeline/test/prismic-snapshots/YvtXgxAAACMA9j5d.people.json +++ b/pipeline/test/prismic-snapshots/YvtXgxAAACMA9j5d.people.json @@ -3,7 +3,7 @@ "uid": null, "url": null, "type": "people", - "href": "https://wellcomecollection.cdn.prismic.io/api/v2/documents/search?ref=ZwQMYRAAAJvKPfl1&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22YvtXgxAAACMA9j5d%22%29+%5D%5D", + "href": "https://wellcomecollection.cdn.prismic.io/api/v2/documents/search?ref=Z0RloBAAAB8ADKKG&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22YvtXgxAAACMA9j5d%22%29+%5D%5D", "tags": [], "first_publication_date": "2022-08-16T08:39:34+0000", "last_publication_date": "2022-10-04T10:37:30+0000", diff --git a/pipeline/test/prismic-snapshots/ZFt0WhQAAHnPEH7P.events.json b/pipeline/test/prismic-snapshots/ZFt0WhQAAHnPEH7P.events.json index 1cd8d5de..fd71ebfb 100644 --- a/pipeline/test/prismic-snapshots/ZFt0WhQAAHnPEH7P.events.json +++ b/pipeline/test/prismic-snapshots/ZFt0WhQAAHnPEH7P.events.json @@ -3,10 +3,10 @@ "uid": "land-body-ecologies-festival-day-two", "url": null, "type": "events", - "href": "https://wellcomecollection.cdn.prismic.io/api/v2/documents/search?ref=ZwQMYRAAAJvKPfl1&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22ZFt0WhQAAHnPEH7P%22%29+%5D%5D", + "href": "https://wellcomecollection.cdn.prismic.io/api/v2/documents/search?ref=Z0RloBAAAB8ADKKG&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22ZFt0WhQAAHnPEH7P%22%29+%5D%5D", "tags": ["LBEF"], "first_publication_date": "2023-05-25T15:00:01+0000", - "last_publication_date": "2024-07-22T15:00:30+0000", + "last_publication_date": "2024-10-23T12:52:01+0000", "slugs": ["land-body-ecologies-festival-day-two"], "linked_documents": [], "lang": "en-gb", @@ -96,7 +96,7 @@ "lang": "en-gb", "slug": "boalno", "first_publication_date": "2023-05-10T10:15:04+0000", - "last_publication_date": "2024-07-22T13:38:08+0000", + "last_publication_date": "2024-10-23T12:50:13+0000", "uid": "boalno", "data": { "title": [ @@ -130,7 +130,7 @@ "lang": "en-gb", "slug": "communal-meitophi", "first_publication_date": "2023-05-10T09:05:18+0000", - "last_publication_date": "2024-07-22T14:48:28+0000", + "last_publication_date": "2024-10-23T12:52:28+0000", "uid": "communal-meitophi", "data": { "title": [ @@ -160,7 +160,7 @@ "lang": "en-gb", "slug": "stories-as-evidence", "first_publication_date": "2023-05-10T13:59:11+0000", - "last_publication_date": "2024-07-22T15:18:37+0000", + "last_publication_date": "2024-10-23T12:52:08+0000", "uid": "stories-as-evidence", "data": { "title": [ @@ -190,7 +190,7 @@ "lang": "en-gb", "slug": "weaving-land-and-health", "first_publication_date": "2023-05-10T08:39:05+0000", - "last_publication_date": "2024-07-22T14:26:08+0000", + "last_publication_date": "2024-10-23T12:49:47+0000", "uid": "weaving-land-and-health", "data": { "title": [ @@ -220,7 +220,7 @@ "lang": "en-gb", "slug": "meitau-making", "first_publication_date": "2023-05-10T09:04:05+0000", - "last_publication_date": "2024-07-22T14:13:46+0000", + "last_publication_date": "2024-10-23T12:50:39+0000", "uid": "meitau-making", "data": { "title": [ @@ -250,7 +250,7 @@ "lang": "en-gb", "slug": "reimagining-conservation-policy", "first_publication_date": "2023-05-10T08:43:14+0000", - "last_publication_date": "2024-07-22T14:48:28+0000", + "last_publication_date": "2024-10-23T12:52:29+0000", "uid": "reimagining-conservation-policy", "data": { "title": [ @@ -280,7 +280,7 @@ "lang": "en-gb", "slug": "in-the-end-of-this-world", "first_publication_date": "2023-05-17T15:17:50+0000", - "last_publication_date": "2024-07-22T15:18:37+0000", + "last_publication_date": "2024-10-23T12:52:42+0000", "uid": "in-the-end-of-this-world", "data": { "title": [ @@ -310,7 +310,7 @@ "lang": "en-gb", "slug": "microtonal", "first_publication_date": "2023-05-10T10:08:54+0000", - "last_publication_date": "2024-07-23T10:51:56+0000", + "last_publication_date": "2024-10-23T12:53:21+0000", "uid": "microtonal-23", "data": { "title": [ @@ -340,7 +340,7 @@ "lang": "en-gb", "slug": "stories-of-entanglement", "first_publication_date": "2023-05-10T10:03:27+0000", - "last_publication_date": "2024-07-23T11:01:15+0000", + "last_publication_date": "2024-10-23T12:53:19+0000", "uid": "stories-of-entanglement-23", "data": { "title": [ @@ -370,7 +370,7 @@ "lang": "en-gb", "slug": "asking-the-salmon-to-return", "first_publication_date": "2023-05-10T10:11:06+0000", - "last_publication_date": "2024-07-23T09:30:38+0000", + "last_publication_date": "2024-10-23T12:52:53+0000", "uid": "asking-the-salmon-to-return-23-10", "data": { "title": [ @@ -400,7 +400,7 @@ "lang": "en-gb", "slug": "virran-mukana", "first_publication_date": "2023-05-10T10:07:07+0000", - "last_publication_date": "2024-07-23T09:28:43+0000", + "last_publication_date": "2024-10-23T12:53:06+0000", "uid": "virran-mukana-23-10", "data": { "title": [ @@ -430,7 +430,7 @@ "lang": "en-gb", "slug": "ovdavazzit--forewalkers", "first_publication_date": "2023-05-10T10:05:28+0000", - "last_publication_date": "2024-07-23T09:07:32+0000", + "last_publication_date": "2024-10-23T12:53:16+0000", "uid": "ovdavazzit--forewalkers", "data": { "title": [ @@ -460,7 +460,7 @@ "lang": "en-gb", "slug": "chill-out-room", "first_publication_date": "2023-05-10T13:54:03+0000", - "last_publication_date": "2024-07-23T10:58:10+0000", + "last_publication_date": "2024-10-23T12:53:28+0000", "uid": "chill-out-room-23", "data": { "title": [ @@ -601,7 +601,7 @@ }, "alt": "Photograph of a farmer getting ready to harvest his organic crop of native Ragi in Kariyappanadoddi, India. Behind him are hills and a small single storey building. Interwoven into the scene is a graphic element made up of thin red drawn circular lines, which create a larger organic pattern behind the farmer.", "copyright": "Farmer Basavaraj in Kariyappanadoddi inspects his ragi crop before harvesting near Bannerghatta, India\n | | | | | Quicksand |", - "url": "https://images.prismic.io/wellcomecollection/0793d963-8807-4525-a3d7-e77fa4435baa_LBE+Key+Image+04.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/0793d963-8807-4525-a3d7-e77fa4435baa_LBE+Key+Image+04.jpg?auto=compress,format&rect=0,232,4000,1875&w=3200&h=1500", "id": "ZGYrjxQAADxsO9nG", "edit": { "x": 0, @@ -617,7 +617,7 @@ }, "alt": "Photograph of a farmer getting ready to harvest his organic crop of native Ragi in Kariyappanadoddi, India. Behind him are hills and a small single storey building. Interwoven into the scene is a graphic element made up of thin red drawn circular lines, which create a larger organic pattern behind the farmer.", "copyright": "Farmer Basavaraj in Kariyappanadoddi inspects his ragi crop before harvesting near Bannerghatta, India\n | | | | | Quicksand |", - "url": "https://images.prismic.io/wellcomecollection/0793d963-8807-4525-a3d7-e77fa4435baa_LBE+Key+Image+04.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/0793d963-8807-4525-a3d7-e77fa4435baa_LBE+Key+Image+04.jpg?auto=compress,format&rect=0,0,4000,2250&w=3200&h=1800", "id": "ZGYrjxQAADxsO9nG", "edit": { "x": 0, @@ -633,7 +633,7 @@ }, "alt": "Photograph of a farmer getting ready to harvest his organic crop of native Ragi in Kariyappanadoddi, India. Behind him are hills and a small single storey building. Interwoven into the scene is a graphic element made up of thin red drawn circular lines, which create a larger organic pattern behind the farmer.", "copyright": "Farmer Basavaraj in Kariyappanadoddi inspects his ragi crop before harvesting near Bannerghatta, India\n | | | | | Quicksand |", - "url": "https://images.prismic.io/wellcomecollection/0793d963-8807-4525-a3d7-e77fa4435baa_LBE+Key+Image+04.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/0793d963-8807-4525-a3d7-e77fa4435baa_LBE+Key+Image+04.jpg?auto=compress,format&rect=1202,0,2250,2250&w=3200&h=3200", "id": "ZGYrjxQAADxsO9nG", "edit": { "x": -1709, @@ -660,7 +660,7 @@ "lang": "en-gb", "slug": "land-body-ecologies-festival", "first_publication_date": "2023-05-16T14:46:48+0000", - "last_publication_date": "2024-07-22T10:35:58+0000", + "last_publication_date": "2024-10-22T15:55:08+0000", "uid": "land-body-ecologies-festival", "data": { "title": [ diff --git a/pipeline/test/prismic-snapshots/ZJLZoRAAACIARz42.events.json b/pipeline/test/prismic-snapshots/ZJLZoRAAACIARz42.events.json index 1b4eddc1..af4f6210 100644 --- a/pipeline/test/prismic-snapshots/ZJLZoRAAACIARz42.events.json +++ b/pipeline/test/prismic-snapshots/ZJLZoRAAACIARz42.events.json @@ -3,10 +3,10 @@ "uid": "perspective-tour-with-jess-dobkin", "url": null, "type": "events", - "href": "https://wellcomecollection.cdn.prismic.io/api/v2/documents/search?ref=ZwQMYRAAAJvKPfl1&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22ZJLZoRAAACIARz42%22%29+%5D%5D", + "href": "https://wellcomecollection.cdn.prismic.io/api/v2/documents/search?ref=Z0RloBAAAB8ADKKG&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22ZJLZoRAAACIARz42%22%29+%5D%5D", "tags": [], "first_publication_date": "2023-07-27T15:00:00+0000", - "last_publication_date": "2024-07-22T15:13:26+0000", + "last_publication_date": "2024-10-23T12:52:14+0000", "slugs": ["perspective-tour-with-jess-dobkin"], "linked_documents": [], "lang": "en-gb", @@ -182,7 +182,7 @@ }, "alt": "Photograph of an art installation in gallery space. It's a dark space with black glossy floors and walls. A large parachute suspended from the ceiling which is lit with vibrant pink and orange light. Two visitors are looking at the instillation.", "copyright": "From the Collection: For What It’s Worth, 2023. Jess Dobkin | Gallery photo: Steven Pocock | | | CC-BY-NC | |", - "url": "https://images.prismic.io/wellcomecollection/3e1ef5ca-cf7f-40e5-b1dc-0730a5e11225_EP_002225_007-full.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/3e1ef5ca-cf7f-40e5-b1dc-0730a5e11225_EP_002225_007-full.jpg?auto=compress,format&rect=0,188,4000,1875&w=3200&h=1500", "id": "ZKgZeBAAACEAfpCr", "edit": { "x": 0, @@ -198,7 +198,7 @@ }, "alt": "Photograph of an art installation in gallery space. It's a dark space with black glossy floors and walls. A large parachute suspended from the ceiling which is lit with vibrant pink and orange light. Two visitors are looking at the instillation.", "copyright": "From the Collection: For What It’s Worth, 2023. Jess Dobkin | Gallery photo: Steven Pocock | | | CC-BY-NC | |", - "url": "https://images.prismic.io/wellcomecollection/3e1ef5ca-cf7f-40e5-b1dc-0730a5e11225_EP_002225_007-full.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/3e1ef5ca-cf7f-40e5-b1dc-0730a5e11225_EP_002225_007-full.jpg?auto=compress,format&rect=0,0,4000,2250&w=3200&h=1800", "id": "ZKgZeBAAACEAfpCr", "edit": { "x": 0, @@ -214,7 +214,7 @@ }, "alt": "Photograph of an art installation in gallery space. It's a dark space with black glossy floors and walls. A large parachute suspended from the ceiling which is lit with vibrant pink and orange light. Two visitors are looking at the instillation.", "copyright": "From the Collection: For What It’s Worth, 2023. Jess Dobkin | Gallery photo: Steven Pocock | | | CC-BY-NC | |", - "url": "https://images.prismic.io/wellcomecollection/3e1ef5ca-cf7f-40e5-b1dc-0730a5e11225_EP_002225_007-full.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/3e1ef5ca-cf7f-40e5-b1dc-0730a5e11225_EP_002225_007-full.jpg?auto=compress,format&rect=1361,0,2250,2250&w=3200&h=3200", "id": "ZKgZeBAAACEAfpCr", "edit": { "x": -1935, @@ -241,7 +241,7 @@ "lang": "en-gb", "slug": "perspective-tours", "first_publication_date": "2018-01-10T13:24:40+0000", - "last_publication_date": "2024-07-22T10:36:00+0000", + "last_publication_date": "2024-10-22T15:55:09+0000", "uid": "perspective-tours", "data": { "title": [ diff --git a/pipeline/test/prismic-snapshots/ZQgdkREAAAbr6cRR.events.json b/pipeline/test/prismic-snapshots/ZQgdkREAAAbr6cRR.events.json index 310fa3ec..3417b009 100644 --- a/pipeline/test/prismic-snapshots/ZQgdkREAAAbr6cRR.events.json +++ b/pipeline/test/prismic-snapshots/ZQgdkREAAAbr6cRR.events.json @@ -3,10 +3,10 @@ "uid": "lights-up-on-the-cult-of-beauty-11", "url": null, "type": "events", - "href": "https://wellcomecollection.cdn.prismic.io/api/v2/documents/search?ref=ZwQMYRAAAJvKPfl1&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22ZQgdkREAAAbr6cRR%22%29+%5D%5D", + "href": "https://wellcomecollection.cdn.prismic.io/api/v2/documents/search?ref=Z0RloBAAAB8ADKKG&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22ZQgdkREAAAbr6cRR%22%29+%5D%5D", "tags": ["LightsUpBeauty"], "first_publication_date": "2023-10-26T15:00:00+0000", - "last_publication_date": "2024-09-10T15:32:56+0000", + "last_publication_date": "2024-10-23T12:53:39+0000", "slugs": ["lights-up-on-the-cult-of-beauty"], "linked_documents": [], "lang": "en-gb", @@ -79,7 +79,7 @@ "lang": "en-gb", "slug": "lights-up-on-the-cult-of-beauty", "first_publication_date": "2023-09-18T10:19:01+0000", - "last_publication_date": "2024-07-23T11:03:58+0000", + "last_publication_date": "2024-10-23T12:53:18+0000", "uid": "lights-up-on-the-cult-of-beauty-23", "data": { "title": [ @@ -109,7 +109,7 @@ "lang": "en-gb", "slug": "ad-tour-of-the-cult-of-beauty", "first_publication_date": "2024-09-10T15:32:30+0000", - "last_publication_date": "2024-09-10T15:32:30+0000", + "last_publication_date": "2024-10-23T12:53:39+0000", "uid": "ad-tour-of-beauty-23-november", "data": { "title": [ @@ -139,7 +139,7 @@ "lang": "en-gb", "slug": "lights-up-on-the-cult-of-beauty", "first_publication_date": "2023-09-18T10:20:01+0000", - "last_publication_date": "2024-07-22T14:03:45+0000", + "last_publication_date": "2024-10-23T12:50:24+0000", "uid": "lights-up-on-the-cult-of-beauty", "data": { "title": [ @@ -169,7 +169,7 @@ "lang": "en-gb", "slug": "ad-tour-of-the-cult-of-beauty", "first_publication_date": "2023-09-18T10:12:27+0000", - "last_publication_date": "2024-07-23T09:16:32+0000", + "last_publication_date": "2024-10-23T12:52:51+0000", "uid": "ad-tour-of-the-cult-of-beauty-16-1130", "data": { "title": [ @@ -199,7 +199,7 @@ "lang": "en-gb", "slug": "lights-up-on-the-cult-of-beauty", "first_publication_date": "2023-12-13T12:49:41+0000", - "last_publication_date": "2024-09-10T10:53:28+0000", + "last_publication_date": "2024-10-23T12:53:41+0000", "uid": "lights-up-on-the-cult-of-beauty-9-2", "data": { "title": [ @@ -229,7 +229,7 @@ "lang": "en-gb", "slug": "ad-tour-of-the-cult-of-beauty", "first_publication_date": "2023-12-14T12:04:29+0000", - "last_publication_date": "2024-07-23T08:30:48+0000", + "last_publication_date": "2024-10-23T12:52:50+0000", "uid": "ad-tour-of-the-cult-of-beauty-330", "data": { "title": [ @@ -259,7 +259,7 @@ "lang": "en-gb", "slug": "lights-up-on-the-cult-of-beauty", "first_publication_date": "2023-12-13T12:49:33+0000", - "last_publication_date": "2024-07-23T09:38:22+0000", + "last_publication_date": "2024-10-23T12:53:02+0000", "uid": "lights-up-on-the-cult-of-beauty-1", "data": { "title": [ @@ -289,7 +289,7 @@ "lang": "en-gb", "slug": "ad-tour-of-the-cult-of-beauty", "first_publication_date": "2023-12-14T12:04:33+0000", - "last_publication_date": "2024-07-22T13:48:32+0000", + "last_publication_date": "2024-10-23T12:50:31+0000", "uid": "ad-tour-of-the-cult-of-beauty-1730", "data": { "title": [ @@ -319,7 +319,7 @@ "lang": "en-gb", "slug": "lights-up-on-the-cult-of-beauty", "first_publication_date": "2023-12-13T12:49:27+0000", - "last_publication_date": "2024-07-23T09:37:19+0000", + "last_publication_date": "2024-10-23T12:53:03+0000", "uid": "lights-up-on-the-cult-of-beauty-24", "data": { "title": [ @@ -349,7 +349,7 @@ "lang": "en-gb", "slug": "ad-tour-of-the-cult-of-beauty", "first_publication_date": "2023-12-14T12:04:36+0000", - "last_publication_date": "2024-07-23T09:08:42+0000", + "last_publication_date": "2024-10-23T12:53:15+0000", "uid": "ad-tour-of-the-cult-of-beauty-24-1130", "data": { "title": [ @@ -379,7 +379,7 @@ "lang": "en-gb", "slug": "lights-up-on-the-cult-of-beauty", "first_publication_date": "2023-12-13T12:49:21+0000", - "last_publication_date": "2024-07-23T09:31:56+0000", + "last_publication_date": "2024-10-23T12:53:04+0000", "uid": "lights-up-on-the-cult-of-beauty-19-2", "data": { "title": [ @@ -409,7 +409,7 @@ "lang": "en-gb", "slug": "ad-tour-of-the-cult-of-beauty", "first_publication_date": "2023-12-14T12:04:40+0000", - "last_publication_date": "2024-07-23T09:09:37+0000", + "last_publication_date": "2024-10-23T12:53:15+0000", "uid": "ad-tour-of-the-cult-of-beauty-19-330", "data": { "title": [ @@ -439,7 +439,7 @@ "lang": "en-gb", "slug": "lights-up-on-the-cult-of-beauty", "first_publication_date": "2023-12-13T12:49:15+0000", - "last_publication_date": "2024-07-23T10:49:29+0000", + "last_publication_date": "2024-10-23T12:53:24+0000", "uid": "lights-up-on-the-cult-of-beauty-114", "data": { "title": [ @@ -469,7 +469,7 @@ "lang": "en-gb", "slug": "ad-tour-of-the-cult-of-beauty", "first_publication_date": "2023-12-14T12:04:44+0000", - "last_publication_date": "2024-07-22T13:45:48+0000", + "last_publication_date": "2024-10-23T12:50:28+0000", "uid": "ad-tour-of-the-cult-of-beauty-530", "data": { "title": [ diff --git a/pipeline/test/prismic-snapshots/ZRrijRIAAJNSARgG.events.json b/pipeline/test/prismic-snapshots/ZRrijRIAAJNSARgG.events.json index ae494361..d7d1879b 100644 --- a/pipeline/test/prismic-snapshots/ZRrijRIAAJNSARgG.events.json +++ b/pipeline/test/prismic-snapshots/ZRrijRIAAJNSARgG.events.json @@ -3,10 +3,10 @@ "uid": "standards--my-right-to-beauty", "url": null, "type": "events", - "href": "https://wellcomecollection.cdn.prismic.io/api/v2/documents/search?ref=ZwQMYRAAAJvKPfl1&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22ZRrijRIAAJNSARgG%22%29+%5D%5D", + "href": "https://wellcomecollection.cdn.prismic.io/api/v2/documents/search?ref=Z0RloBAAAB8ADKKG&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22ZRrijRIAAJNSARgG%22%29+%5D%5D", "tags": [], "first_publication_date": "2023-10-19T15:00:00+0000", - "last_publication_date": "2024-07-22T14:03:38+0000", + "last_publication_date": "2024-10-23T12:49:51+0000", "slugs": ["standards-my-right-to-beauty"], "linked_documents": [], "lang": "en-gb", @@ -262,7 +262,7 @@ }, "alt": "A group of young performers on stage posing for a group portrait. ", "copyright": " | | | | | Photo by Sharne Fairchild |", - "url": "https://images.prismic.io/wellcomecollection/a37c1539-a43a-490f-9f98-8c282d016a46_Group+shot+by+Sharne+Fairchild.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/a37c1539-a43a-490f-9f98-8c282d016a46_Group+shot+by+Sharne+Fairchild.jpg?auto=compress,format&rect=0,0,4000,1875&w=3200&h=1500", "id": "ZVNa_hIAACcAarUk", "edit": { "x": 0, @@ -278,7 +278,7 @@ }, "alt": "A group of young performers on stage posing for a group portrait. ", "copyright": " | | | | | Photo by Sharne Fairchild |", - "url": "https://images.prismic.io/wellcomecollection/a37c1539-a43a-490f-9f98-8c282d016a46_Group+shot+by+Sharne+Fairchild.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/a37c1539-a43a-490f-9f98-8c282d016a46_Group+shot+by+Sharne+Fairchild.jpg?auto=compress,format&rect=0,0,4000,2250&w=3200&h=1800", "id": "ZVNa_hIAACcAarUk", "edit": { "x": 0, @@ -294,7 +294,7 @@ }, "alt": "A group of young performers on stage posing for a group portrait. ", "copyright": " | | | | | Photo by Sharne Fairchild |", - "url": "https://images.prismic.io/wellcomecollection/a37c1539-a43a-490f-9f98-8c282d016a46_Group+shot+by+Sharne+Fairchild.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/a37c1539-a43a-490f-9f98-8c282d016a46_Group+shot+by+Sharne+Fairchild.jpg?auto=compress,format&rect=875,0,2250,2250&w=3200&h=3200", "id": "ZVNa_hIAACcAarUk", "edit": { "x": -1244.4444444444446, diff --git a/pipeline/test/prismic-snapshots/ZSPXJBAAACIAiERm.events.json b/pipeline/test/prismic-snapshots/ZSPXJBAAACIAiERm.events.json index c8ade287..84bf5995 100644 --- a/pipeline/test/prismic-snapshots/ZSPXJBAAACIAiERm.events.json +++ b/pipeline/test/prismic-snapshots/ZSPXJBAAACIAiERm.events.json @@ -3,10 +3,10 @@ "uid": "recipes-for-early-modern-beauty", "url": null, "type": "events", - "href": "https://wellcomecollection.cdn.prismic.io/api/v2/documents/search?ref=ZwQMYRAAAJvKPfl1&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22ZSPXJBAAACIAiERm%22%29+%5D%5D", + "href": "https://wellcomecollection.cdn.prismic.io/api/v2/documents/search?ref=Z0RloBAAAB8ADKKG&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22ZSPXJBAAACIAiERm%22%29+%5D%5D", "tags": [], "first_publication_date": "2023-10-12T15:00:00+0000", - "last_publication_date": "2024-09-17T14:29:34+0000", + "last_publication_date": "2024-10-23T12:53:49+0000", "slugs": ["recipes-for-early-modern-beauty"], "linked_documents": [], "lang": "en-gb", @@ -66,7 +66,7 @@ "lang": "en-gb", "slug": "auto-captioned", "first_publication_date": "2020-09-23T10:36:41+0000", - "last_publication_date": "2023-10-02T10:33:32+0000", + "last_publication_date": "2024-10-10T15:57:41+0000", "data": { "title": [ { @@ -274,7 +274,7 @@ }, "alt": "An laptop sitting on a desk, on the laptop screen is an etching from a 17th-century book where a woman is applying cream to her face while looking at a mirror.", "copyright": "Exploring Research Seminar | Photo: Kathleen Arundell. Image on screen: from the frontispiece to The Accomplished Ladies Delight, Hannah Woolley, 1675| Wellcome Collection | | CC-BY | |", - "url": "https://images.prismic.io/wellcomecollection/48caaf01-f243-4117-a4af-36c386acd345_EP_002514_001.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/48caaf01-f243-4117-a4af-36c386acd345_EP_002514_001.jpg?auto=compress,format&rect=0,120,2560,1200&w=3200&h=1500", "id": "ZSamWhAAACAAlKe0", "edit": { "x": 0, @@ -290,7 +290,7 @@ }, "alt": "An laptop sitting on a desk, on the laptop screen is an etching from a 17th-century book where a woman is applying cream to her face while looking at a mirror.", "copyright": "Exploring Research Seminar | Photo: Kathleen Arundell. Image on screen: from the frontispiece to The Accomplished Ladies Delight, Hannah Woolley, 1675| Wellcome Collection | | CC-BY | |", - "url": "https://images.prismic.io/wellcomecollection/48caaf01-f243-4117-a4af-36c386acd345_EP_002514_001.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/48caaf01-f243-4117-a4af-36c386acd345_EP_002514_001.jpg?auto=compress,format&rect=0,0,2560,1440&w=3200&h=1800", "id": "ZSamWhAAACAAlKe0", "edit": { "x": 0, @@ -306,7 +306,7 @@ }, "alt": "An laptop sitting on a desk, on the laptop screen is an etching from a 17th-century book where a woman is applying cream to her face while looking at a mirror.", "copyright": "Exploring Research Seminar | Photo: Kathleen Arundell. Image on screen: from the frontispiece to The Accomplished Ladies Delight, Hannah Woolley, 1675| Wellcome Collection | | CC-BY | |", - "url": "https://images.prismic.io/wellcomecollection/48caaf01-f243-4117-a4af-36c386acd345_EP_002514_001.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/48caaf01-f243-4117-a4af-36c386acd345_EP_002514_001.jpg?auto=compress,format&rect=560,0,1440,1440&w=3200&h=3200", "id": "ZSamWhAAACAAlKe0", "edit": { "x": -1244, @@ -333,7 +333,7 @@ "lang": "en-gb", "slug": "exploring-research", "first_publication_date": "2018-09-13T14:08:30+0000", - "last_publication_date": "2024-09-17T14:29:50+0000", + "last_publication_date": "2024-10-22T15:55:15+0000", "uid": "exploring-research", "data": { "title": [ diff --git a/pipeline/test/prismic-snapshots/ZTevFxAAACQAyHEk.events.json b/pipeline/test/prismic-snapshots/ZTevFxAAACQAyHEk.events.json index 846a988d..fdf0bd86 100644 --- a/pipeline/test/prismic-snapshots/ZTevFxAAACQAyHEk.events.json +++ b/pipeline/test/prismic-snapshots/ZTevFxAAACQAyHEk.events.json @@ -3,10 +3,10 @@ "uid": "sexing-up-the-internet", "url": null, "type": "events", - "href": "https://wellcomecollection.cdn.prismic.io/api/v2/documents/search?ref=ZwQMYRAAAJvKPfl1&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22ZTevFxAAACQAyHEk%22%29+%5D%5D", + "href": "https://wellcomecollection.cdn.prismic.io/api/v2/documents/search?ref=Z0RloBAAAB8ADKKG&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22ZTevFxAAACQAyHEk%22%29+%5D%5D", "tags": [], "first_publication_date": "2023-10-26T15:04:01+0000", - "last_publication_date": "2024-07-22T14:30:39+0000", + "last_publication_date": "2024-10-23T12:51:41+0000", "slugs": ["sexing-up-the-internet"], "linked_documents": [], "lang": "en-gb", @@ -237,7 +237,7 @@ }, "alt": "People sitting around a table with laptops editing Wikipedia pages and listening to a facilitator.", "copyright": "Wikithon Event | Photo: Thomas S. G. Farnetti | Wellcome Collection | | CC-BY-NC ", - "url": "https://images.prismic.io/wellcomecollection/89a8299e-a07e-40b6-8b02-020e29442b70_EP_000607_088+16x9+4K.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/89a8299e-a07e-40b6-8b02-020e29442b70_EP_000607_088+16x9+4K.jpg?auto=compress,format&rect=0,163,3475,1629&w=3200&h=1500", "id": "ZTfEHxAAACQAyNMD", "edit": { "x": 0, @@ -253,7 +253,7 @@ }, "alt": "People sitting around a table with laptops editing Wikipedia pages and listening to a facilitator.", "copyright": "Wikithon Event | Photo: Thomas S. G. Farnetti | Wellcome Collection | | CC-BY-NC ", - "url": "https://images.prismic.io/wellcomecollection/89a8299e-a07e-40b6-8b02-020e29442b70_EP_000607_088+16x9+4K.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/89a8299e-a07e-40b6-8b02-020e29442b70_EP_000607_088+16x9+4K.jpg?auto=compress,format&rect=0,0,3475,1955&w=3200&h=1800", "id": "ZTfEHxAAACQAyNMD", "edit": { "x": 0, @@ -269,7 +269,7 @@ }, "alt": "People sitting around a table with laptops editing Wikipedia pages and listening to a facilitator.", "copyright": "Wikithon Event | Photo: Thomas S. G. Farnetti | Wellcome Collection | | CC-BY-NC ", - "url": "https://images.prismic.io/wellcomecollection/89a8299e-a07e-40b6-8b02-020e29442b70_EP_000607_088+16x9+4K.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/89a8299e-a07e-40b6-8b02-020e29442b70_EP_000607_088+16x9+4K.jpg?auto=compress,format&rect=760,0,1955,1955&w=3200&h=3200", "id": "ZTfEHxAAACQAyNMD", "edit": { "x": -1243, diff --git a/pipeline/test/prismic-snapshots/Zs8EuRAAAB4APxrA.visual-stories.json b/pipeline/test/prismic-snapshots/Zs8EuRAAAB4APxrA.visual-stories.json new file mode 100644 index 00000000..ac6a9171 --- /dev/null +++ b/pipeline/test/prismic-snapshots/Zs8EuRAAAB4APxrA.visual-stories.json @@ -0,0 +1,43 @@ +{ + "id": "Zs8EuRAAAB4APxrA", + "uid": "hard-graft", + "url": null, + "type": "visual-stories", + "href": "https://wellcomecollection.cdn.prismic.io/api/v2/documents/search?ref=Z0RloBAAAB8ADKKG&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22Zs8EuRAAAB4APxrA%22%29+%5D%5D", + "tags": ["hard-graft"], + "first_publication_date": "2024-10-23T11:49:18+0000", + "last_publication_date": "2024-11-15T09:44:44+0000", + "slugs": ["hard-graft-work-health-and-rights-visual-story"], + "linked_documents": [], + "lang": "en-gb", + "alternate_languages": [], + "data": { + "title": [ + { + "type": "heading1", + "text": "Hard Graft: Work, Health and Rights visual story", + "spans": [], + "direction": "ltr" + } + ], + "promo": [ + { + "primary": { + "caption": [ + { + "type": "paragraph", + "text": "Information to help you plan and prepare for your visit to 'Hard Graft'.", + "spans": [], + "direction": "ltr" + } + ], + "link": null + }, + "items": [], + "id": "editorialImage$8b933c9c-8c4b-4da2-a5f6-2f6b1318f091", + "slice_type": "editorialImage", + "slice_label": null + } + ] + } +} diff --git a/pipeline/test/transformers/__snapshots__/addressables.test.ts.snap b/pipeline/test/transformers/__snapshots__/addressables.test.ts.snap new file mode 100644 index 00000000..cec3b3d8 --- /dev/null +++ b/pipeline/test/transformers/__snapshots__/addressables.test.ts.snap @@ -0,0 +1,42 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`addressables transformer transforms books from Prismic to the expected format (document: books/WwVK3CAAAHm5Exxr) 1`] = ` +{ + "display": { + "contributors": "Marius Kwint, Richard Wingate", + "description": "A fully illustrated and fascinating exploration of the brain.", + "id": "WwVK3CAAAHm5Exxr", + "title": "Brains: The mind as matter", + "type": "Book", + "uid": "brains", + }, + "id": "WwVK3CAAAHm5Exxr", + "query": { + "body": "'Brains' asks not what brains do to us, but what we have done to brains, focusing on the bodily presence of the organ rather than investigating the neuroscience of the mind. This fully illustrated and fascinating exploration of the brain has been published to accompany Wellcome Collection's ‘Brains’ exhibition. The brain is a unique and enigmatic organ. It cannot be transplanted, and is one of the most complex entities in the known universe. ‘Brains’ explores the ways that we have sought to understand and classify the brain over the centuries.", + "contributors": "Marius Kwint, Richard Wingate", + "description": "A fully illustrated and fascinating exploration of the brain.", + "title": "Brains: The mind as matter", + "type": "Book", + }, + "uid": "brains", +} +`; + +exports[`addressables transformer transforms visual stories from Prismic to the expected format (document: visual-stories/Zs8EuRAAAB4APxrA) 1`] = ` +{ + "display": { + "description": "Information to help you plan and prepare for your visit to 'Hard Graft'.", + "id": "Zs8EuRAAAB4APxrA", + "title": "Hard Graft: Work, Health and Rights visual story", + "type": "Visual story", + "uid": "hard-graft", + }, + "id": "Zs8EuRAAAB4APxrA", + "query": { + "description": "Information to help you plan and prepare for your visit to 'Hard Graft'.", + "title": "Hard Graft: Work, Health and Rights visual story", + "type": "Visual story", + }, + "uid": "hard-graft", +} +`; diff --git a/pipeline/test/transformers/__snapshots__/article.test.ts.snap b/pipeline/test/transformers/__snapshots__/article.test.ts.snap index 61f2d24e..df761a3a 100644 --- a/pipeline/test/transformers/__snapshots__/article.test.ts.snap +++ b/pipeline/test/transformers/__snapshots__/article.test.ts.snap @@ -46,7 +46,7 @@ exports[`article transformer also works for webcomics (document: webcomics/XK9p2 "zoom": 2, }, "id": "XK9ofhIAAOA9QnrN", - "url": "https://images.prismic.io/wellcomecollection%2F6c8b776e-7f41-41eb-82e7-3b6dfb3eedee_groan_promo.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection%2F6c8b776e-7f41-41eb-82e7-3b6dfb3eedee_groan_promo.jpg?auto=compress,format&rect=0,0,1600,900&w=3200&h=1800", }, "32:15": { "alt": "Groan comic by Rob Bidder (detail)", @@ -62,7 +62,7 @@ exports[`article transformer also works for webcomics (document: webcomics/XK9p2 "zoom": 2, }, "id": "XK9ofhIAAOA9QnrN", - "url": "https://images.prismic.io/wellcomecollection%2F6c8b776e-7f41-41eb-82e7-3b6dfb3eedee_groan_promo.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection%2F6c8b776e-7f41-41eb-82e7-3b6dfb3eedee_groan_promo.jpg?auto=compress,format&rect=0,75,1600,750&w=3200&h=1500", }, "alt": "Groan comic by Rob Bidder (detail)", "copyright": "Groan|Rob Bidder|||CC-BY-NC|Rob Bidder| ", @@ -91,7 +91,7 @@ exports[`article transformer also works for webcomics (document: webcomics/XK9p2 "zoom": 3.555555582046509, }, "id": "XK9ofhIAAOA9QnrN", - "url": "https://images.prismic.io/wellcomecollection%2F6c8b776e-7f41-41eb-82e7-3b6dfb3eedee_groan_promo.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection%2F6c8b776e-7f41-41eb-82e7-3b6dfb3eedee_groan_promo.jpg?auto=compress,format&rect=350,0,900,900&w=3200&h=3200", }, "type": "PrismicImage", "url": "https://images.prismic.io/wellcomecollection%2F6c8b776e-7f41-41eb-82e7-3b6dfb3eedee_groan_promo.jpg?auto=format,compress", @@ -183,7 +183,7 @@ exports[`article transformer also works for webcomics (document: webcomics/XUGru "zoom": 2, }, "id": "XUP2ahEAACAAtd4J", - "url": "https://images.prismic.io/wellcomecollection%2Fe427f062-73a8-43a0-b7c4-92e36528df8e_footpathpromo.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection%2Fe427f062-73a8-43a0-b7c4-92e36528df8e_footpathpromo.jpg?auto=compress,format&rect=0,0,1600,900&w=3200&h=1800", }, "32:15": { "alt": "Footpath comic by Rob Bidder (detail)", @@ -199,7 +199,7 @@ exports[`article transformer also works for webcomics (document: webcomics/XUGru "zoom": 2, }, "id": "XUP2ahEAACAAtd4J", - "url": "https://images.prismic.io/wellcomecollection%2Fe427f062-73a8-43a0-b7c4-92e36528df8e_footpathpromo.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection%2Fe427f062-73a8-43a0-b7c4-92e36528df8e_footpathpromo.jpg?auto=compress,format&rect=0,75,1600,750&w=3200&h=1500", }, "alt": "Footpath comic by Rob Bidder (detail)", "copyright": "Footpath, Rob Bidder | | | | CC-BY-NC | Rob Bidder |", @@ -228,7 +228,7 @@ exports[`article transformer also works for webcomics (document: webcomics/XUGru "zoom": 3.555555582046509, }, "id": "XUP2ahEAACAAtd4J", - "url": "https://images.prismic.io/wellcomecollection%2Fe427f062-73a8-43a0-b7c4-92e36528df8e_footpathpromo.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection%2Fe427f062-73a8-43a0-b7c4-92e36528df8e_footpathpromo.jpg?auto=compress,format&rect=350,0,900,900&w=3200&h=3200", }, "type": "PrismicImage", "url": "https://images.prismic.io/wellcomecollection%2Fe427f062-73a8-43a0-b7c4-92e36528df8e_footpathpromo.jpg?auto=format,compress", @@ -638,7 +638,7 @@ exports[`article transformer transforms articles from Prismic to the expected fo "zoom": 0.8, }, "id": "Y0WZMhEAAImM2WpE", - "url": "https://images.prismic.io/wellcomecollection/e40a5234-98be-4bae-a9fb-0d0f0d0de8fd_Phobias-WellcomeCollection-TRart9-29-22.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/e40a5234-98be-4bae-a9fb-0d0f0d0de8fd_Phobias-WellcomeCollection-TRart9-29-22.jpg?auto=compress,format&rect=0,0,4000,2250&w=3200&h=1800", }, "32:15": { "alt": "Digital montage artwork made up of archive illustrations, photographs and graphical shapes. The overall hues of the artwork are reds, yellows and blacks. There are a number of references across the artwork, some cut out, others framed in regular shapes, but all touching on the theme of phobias. There's a large spider, an aeroplane flying upside-down, a large crowd, a man trapped in a small box, a dog with a dashed white sightline coming from its head and an image of the grim reaper standing behind a man. ", @@ -654,7 +654,7 @@ exports[`article transformer transforms articles from Prismic to the expected fo "zoom": 0.8, }, "id": "Y0WZMhEAAImM2WpE", - "url": "https://images.prismic.io/wellcomecollection/e40a5234-98be-4bae-a9fb-0d0f0d0de8fd_Phobias-WellcomeCollection-TRart9-29-22.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/e40a5234-98be-4bae-a9fb-0d0f0d0de8fd_Phobias-WellcomeCollection-TRart9-29-22.jpg?auto=compress,format&rect=0,0,4000,1875&w=3200&h=1500", }, "alt": "Digital montage artwork made up of archive illustrations, photographs and graphical shapes. The overall hues of the artwork are reds, yellows and blacks. There are a number of references across the artwork, some cut out, others framed in regular shapes, but all touching on the theme of phobias. There's a large spider, an aeroplane flying upside-down, a large crowd, a man trapped in a small box, a dog with a dashed white sightline coming from its head and an image of the grim reaper standing behind a man. ", "copyright": "Phobias | | | | | Tim Robinson for Wellcome Collection |", @@ -683,7 +683,7 @@ exports[`article transformer transforms articles from Prismic to the expected fo "zoom": 1.4222222222222223, }, "id": "Y0WZMhEAAImM2WpE", - "url": "https://images.prismic.io/wellcomecollection/e40a5234-98be-4bae-a9fb-0d0f0d0de8fd_Phobias-WellcomeCollection-TRart9-29-22.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/e40a5234-98be-4bae-a9fb-0d0f0d0de8fd_Phobias-WellcomeCollection-TRart9-29-22.jpg?auto=compress,format&rect=0,0,2250,2250&w=3200&h=3200", }, "type": "PrismicImage", "url": "https://images.prismic.io/wellcomecollection/e40a5234-98be-4bae-a9fb-0d0f0d0de8fd_Phobias-WellcomeCollection-TRart9-29-22.jpg?auto=format,compress", @@ -812,7 +812,7 @@ exports[`article transformer transforms articles from Prismic to the expected fo "zoom": 0.8, }, "id": "YbtigREAACIAfIIl", - "url": "https://images.prismic.io/wellcomecollection/51e7fe3d-6fb6-45b6-979c-9d1e0c20abd0_default09-2.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/51e7fe3d-6fb6-45b6-979c-9d1e0c20abd0_default09-2.jpg?auto=compress,format&rect=0,507,4000,2250&w=3200&h=1800", }, "32:15": { "alt": "Photograph of a fragile folding almanac from the 15th century. The almanac is spotlit on a black background. It has an intricate woven green and pink fabric cover and folded internal pages. It is rectangular in shape, but with a triangular taper on the left short end.", @@ -828,7 +828,7 @@ exports[`article transformer transforms articles from Prismic to the expected fo "zoom": 0.8, }, "id": "YbtigREAACIAfIIl", - "url": "https://images.prismic.io/wellcomecollection/51e7fe3d-6fb6-45b6-979c-9d1e0c20abd0_default09-2.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/51e7fe3d-6fb6-45b6-979c-9d1e0c20abd0_default09-2.jpg?auto=compress,format&rect=0,672,4000,1875&w=3200&h=1500", }, "alt": "Photograph of a fragile folding almanac from the 15th century. The almanac is spotlit on a black background. It has an intricate woven green and pink fabric cover and folded internal pages. It is rectangular in shape, but with a triangular taper on the left short end.", "copyright": "English folding almanac in Latin, 1415-20 | Photo: Benjamin Gilbert | Wellcome Collection | https://wellcomecollection.org/works/a2y8zd6x | CC-BY | |", @@ -857,7 +857,7 @@ exports[`article transformer transforms articles from Prismic to the expected fo "zoom": 1.0305958132045085, }, "id": "YbtigREAACIAfIIl", - "url": "https://images.prismic.io/wellcomecollection/51e7fe3d-6fb6-45b6-979c-9d1e0c20abd0_default09-2.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/51e7fe3d-6fb6-45b6-979c-9d1e0c20abd0_default09-2.jpg?auto=compress,format&rect=447,0,3105,3105&w=3200&h=3200", }, "type": "PrismicImage", "url": "https://images.prismic.io/wellcomecollection/51e7fe3d-6fb6-45b6-979c-9d1e0c20abd0_default09-2.jpg?auto=format,compress", diff --git a/pipeline/test/transformers/__snapshots__/eventDocument.test.ts.snap b/pipeline/test/transformers/__snapshots__/eventDocument.test.ts.snap index 57f88098..58ecd0cc 100644 --- a/pipeline/test/transformers/__snapshots__/eventDocument.test.ts.snap +++ b/pipeline/test/transformers/__snapshots__/eventDocument.test.ts.snap @@ -36,7 +36,7 @@ exports[`eventDocument transformer transforms events from Prismic to the expecte "zoom": 0.8, }, "id": "ZGYrjxQAADxsO9nG", - "url": "https://images.prismic.io/wellcomecollection/0793d963-8807-4525-a3d7-e77fa4435baa_LBE+Key+Image+04.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/0793d963-8807-4525-a3d7-e77fa4435baa_LBE+Key+Image+04.jpg?auto=compress,format&rect=0,0,4000,2250&w=3200&h=1800", }, "32:15": { "alt": "Photograph of a farmer getting ready to harvest his organic crop of native Ragi in Kariyappanadoddi, India. Behind him are hills and a small single storey building. Interwoven into the scene is a graphic element made up of thin red drawn circular lines, which create a larger organic pattern behind the farmer.", @@ -53,7 +53,7 @@ exports[`eventDocument transformer transforms events from Prismic to the expecte "zoom": 0.8, }, "id": "ZGYrjxQAADxsO9nG", - "url": "https://images.prismic.io/wellcomecollection/0793d963-8807-4525-a3d7-e77fa4435baa_LBE+Key+Image+04.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/0793d963-8807-4525-a3d7-e77fa4435baa_LBE+Key+Image+04.jpg?auto=compress,format&rect=0,232,4000,1875&w=3200&h=1500", }, "alt": "Photograph of a farmer getting ready to harvest his organic crop of native Ragi in Kariyappanadoddi, India. Behind him are hills and a small single storey building. Interwoven into the scene is a graphic element made up of thin red drawn circular lines, which create a larger organic pattern behind the farmer.", "copyright": "Farmer Basavaraj in Kariyappanadoddi inspects his ragi crop before harvesting near Bannerghatta, India @@ -84,7 +84,7 @@ exports[`eventDocument transformer transforms events from Prismic to the expecte "zoom": 1.4222222222222223, }, "id": "ZGYrjxQAADxsO9nG", - "url": "https://images.prismic.io/wellcomecollection/0793d963-8807-4525-a3d7-e77fa4435baa_LBE+Key+Image+04.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/0793d963-8807-4525-a3d7-e77fa4435baa_LBE+Key+Image+04.jpg?auto=compress,format&rect=1202,0,2250,2250&w=3200&h=3200", }, "type": "PrismicImage", "url": "https://images.prismic.io/wellcomecollection/0793d963-8807-4525-a3d7-e77fa4435baa_LBE+Key+Image+04.jpg?auto=format,compress", @@ -229,7 +229,7 @@ exports[`eventDocument transformer transforms events from Prismic to the expecte "zoom": 0.8, }, "id": "ZKgZeBAAACEAfpCr", - "url": "https://images.prismic.io/wellcomecollection/3e1ef5ca-cf7f-40e5-b1dc-0730a5e11225_EP_002225_007-full.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/3e1ef5ca-cf7f-40e5-b1dc-0730a5e11225_EP_002225_007-full.jpg?auto=compress,format&rect=0,0,4000,2250&w=3200&h=1800", }, "32:15": { "alt": "Photograph of an art installation in gallery space. It's a dark space with black glossy floors and walls. A large parachute suspended from the ceiling which is lit with vibrant pink and orange light. Two visitors are looking at the instillation.", @@ -245,7 +245,7 @@ exports[`eventDocument transformer transforms events from Prismic to the expecte "zoom": 0.8, }, "id": "ZKgZeBAAACEAfpCr", - "url": "https://images.prismic.io/wellcomecollection/3e1ef5ca-cf7f-40e5-b1dc-0730a5e11225_EP_002225_007-full.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/3e1ef5ca-cf7f-40e5-b1dc-0730a5e11225_EP_002225_007-full.jpg?auto=compress,format&rect=0,188,4000,1875&w=3200&h=1500", }, "alt": "Photograph of an art installation in gallery space. It's a dark space with black glossy floors and walls. A large parachute suspended from the ceiling which is lit with vibrant pink and orange light. Two visitors are looking at the instillation.", "copyright": "From the Collection: For What It’s Worth, 2023. Jess Dobkin | Gallery photo: Steven Pocock | | | CC-BY-NC | |", @@ -274,7 +274,7 @@ exports[`eventDocument transformer transforms events from Prismic to the expecte "zoom": 1.4222222222222223, }, "id": "ZKgZeBAAACEAfpCr", - "url": "https://images.prismic.io/wellcomecollection/3e1ef5ca-cf7f-40e5-b1dc-0730a5e11225_EP_002225_007-full.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/3e1ef5ca-cf7f-40e5-b1dc-0730a5e11225_EP_002225_007-full.jpg?auto=compress,format&rect=1361,0,2250,2250&w=3200&h=3200", }, "type": "PrismicImage", "url": "https://images.prismic.io/wellcomecollection/3e1ef5ca-cf7f-40e5-b1dc-0730a5e11225_EP_002225_007-full.jpg?auto=format,compress", @@ -571,7 +571,7 @@ exports[`eventDocument transformer transforms events from Prismic to the expecte "zoom": 0.8, }, "id": "ZVNa_hIAACcAarUk", - "url": "https://images.prismic.io/wellcomecollection/a37c1539-a43a-490f-9f98-8c282d016a46_Group+shot+by+Sharne+Fairchild.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/a37c1539-a43a-490f-9f98-8c282d016a46_Group+shot+by+Sharne+Fairchild.jpg?auto=compress,format&rect=0,0,4000,2250&w=3200&h=1800", }, "32:15": { "alt": "A group of young performers on stage posing for a group portrait. ", @@ -587,7 +587,7 @@ exports[`eventDocument transformer transforms events from Prismic to the expecte "zoom": 0.8, }, "id": "ZVNa_hIAACcAarUk", - "url": "https://images.prismic.io/wellcomecollection/a37c1539-a43a-490f-9f98-8c282d016a46_Group+shot+by+Sharne+Fairchild.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/a37c1539-a43a-490f-9f98-8c282d016a46_Group+shot+by+Sharne+Fairchild.jpg?auto=compress,format&rect=0,0,4000,1875&w=3200&h=1500", }, "alt": "A group of young performers on stage posing for a group portrait. ", "copyright": " | | | | | Photo by Sharne Fairchild |", @@ -616,7 +616,7 @@ exports[`eventDocument transformer transforms events from Prismic to the expecte "zoom": 1.4222222222222223, }, "id": "ZVNa_hIAACcAarUk", - "url": "https://images.prismic.io/wellcomecollection/a37c1539-a43a-490f-9f98-8c282d016a46_Group+shot+by+Sharne+Fairchild.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/a37c1539-a43a-490f-9f98-8c282d016a46_Group+shot+by+Sharne+Fairchild.jpg?auto=compress,format&rect=875,0,2250,2250&w=3200&h=3200", }, "type": "PrismicImage", "url": "https://images.prismic.io/wellcomecollection/a37c1539-a43a-490f-9f98-8c282d016a46_Group+shot+by+Sharne+Fairchild.jpg?auto=format,compress", @@ -742,7 +742,7 @@ exports[`eventDocument transformer transforms events from Prismic to the expecte "zoom": 1.25, }, "id": "ZSamWhAAACAAlKe0", - "url": "https://images.prismic.io/wellcomecollection/48caaf01-f243-4117-a4af-36c386acd345_EP_002514_001.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/48caaf01-f243-4117-a4af-36c386acd345_EP_002514_001.jpg?auto=compress,format&rect=0,0,2560,1440&w=3200&h=1800", }, "32:15": { "alt": "An laptop sitting on a desk, on the laptop screen is an etching from a 17th-century book where a woman is applying cream to her face while looking at a mirror.", @@ -758,7 +758,7 @@ exports[`eventDocument transformer transforms events from Prismic to the expecte "zoom": 1.25, }, "id": "ZSamWhAAACAAlKe0", - "url": "https://images.prismic.io/wellcomecollection/48caaf01-f243-4117-a4af-36c386acd345_EP_002514_001.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/48caaf01-f243-4117-a4af-36c386acd345_EP_002514_001.jpg?auto=compress,format&rect=0,120,2560,1200&w=3200&h=1500", }, "alt": "An laptop sitting on a desk, on the laptop screen is an etching from a 17th-century book where a woman is applying cream to her face while looking at a mirror.", "copyright": "Exploring Research Seminar | Photo: Kathleen Arundell. Image on screen: from the frontispiece to The Accomplished Ladies Delight, Hannah Woolley, 1675| Wellcome Collection | | CC-BY | |", @@ -787,7 +787,7 @@ exports[`eventDocument transformer transforms events from Prismic to the expecte "zoom": 2.2222222222222223, }, "id": "ZSamWhAAACAAlKe0", - "url": "https://images.prismic.io/wellcomecollection/48caaf01-f243-4117-a4af-36c386acd345_EP_002514_001.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/48caaf01-f243-4117-a4af-36c386acd345_EP_002514_001.jpg?auto=compress,format&rect=560,0,1440,1440&w=3200&h=3200", }, "type": "PrismicImage", "url": "https://images.prismic.io/wellcomecollection/48caaf01-f243-4117-a4af-36c386acd345_EP_002514_001.jpg?auto=format,compress", @@ -910,7 +910,7 @@ exports[`eventDocument transformer transforms events from Prismic to the expecte "zoom": 0.920863309352518, }, "id": "ZTfEHxAAACQAyNMD", - "url": "https://images.prismic.io/wellcomecollection/89a8299e-a07e-40b6-8b02-020e29442b70_EP_000607_088+16x9+4K.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/89a8299e-a07e-40b6-8b02-020e29442b70_EP_000607_088+16x9+4K.jpg?auto=compress,format&rect=0,0,3475,1955&w=3200&h=1800", }, "32:15": { "alt": "People sitting around a table with laptops editing Wikipedia pages and listening to a facilitator.", @@ -926,7 +926,7 @@ exports[`eventDocument transformer transforms events from Prismic to the expecte "zoom": 0.920863309352518, }, "id": "ZTfEHxAAACQAyNMD", - "url": "https://images.prismic.io/wellcomecollection/89a8299e-a07e-40b6-8b02-020e29442b70_EP_000607_088+16x9+4K.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/89a8299e-a07e-40b6-8b02-020e29442b70_EP_000607_088+16x9+4K.jpg?auto=compress,format&rect=0,163,3475,1629&w=3200&h=1500", }, "alt": "People sitting around a table with laptops editing Wikipedia pages and listening to a facilitator.", "copyright": "Wikithon Event | Photo: Thomas S. G. Farnetti | Wellcome Collection | | CC-BY-NC ", @@ -955,7 +955,7 @@ exports[`eventDocument transformer transforms events from Prismic to the expecte "zoom": 1.6368286445012787, }, "id": "ZTfEHxAAACQAyNMD", - "url": "https://images.prismic.io/wellcomecollection/89a8299e-a07e-40b6-8b02-020e29442b70_EP_000607_088+16x9+4K.jpg?auto=format,compress", + "url": "https://images.prismic.io/wellcomecollection/89a8299e-a07e-40b6-8b02-020e29442b70_EP_000607_088+16x9+4K.jpg?auto=compress,format&rect=760,0,1955,1955&w=3200&h=3200", }, "type": "PrismicImage", "url": "https://images.prismic.io/wellcomecollection/89a8299e-a07e-40b6-8b02-020e29442b70_EP_000607_088+16x9+4K.jpg?auto=format,compress", diff --git a/pipeline/test/transformers/__snapshots__/venues.test.ts.snap b/pipeline/test/transformers/__snapshots__/venues.test.ts.snap index e5051844..a8f614df 100644 --- a/pipeline/test/transformers/__snapshots__/venues.test.ts.snap +++ b/pipeline/test/transformers/__snapshots__/venues.test.ts.snap @@ -6,63 +6,63 @@ exports[`eventDocument transformer transforms venues from Prismic to the expecte "exceptionalClosedDays": [ { "endDateTime": "00:00", - "overrideDate": "2024-05-03T23:00:00.000Z", + "overrideDate": "2024-12-21T00:00:00.000Z", "startDateTime": "00:00", - "type": "Bank holiday", + "type": "Christmas and New Year", }, { "endDateTime": "00:00", - "overrideDate": "2024-05-05T23:00:00.000Z", + "overrideDate": "2024-12-23T00:00:00.000Z", "startDateTime": "00:00", - "type": "Bank holiday", + "type": "Christmas and New Year", }, { "endDateTime": "00:00", - "overrideDate": "2024-05-24T23:00:00.000Z", + "overrideDate": "2024-12-24T00:00:00.000Z", "startDateTime": "00:00", - "type": "Bank holiday", + "type": "Christmas and New Year", }, { "endDateTime": "00:00", - "overrideDate": "2024-05-26T23:00:00.000Z", + "overrideDate": "2024-12-25T00:00:00.000Z", "startDateTime": "00:00", - "type": "Bank holiday", + "type": "Christmas and New Year", }, { "endDateTime": "00:00", - "overrideDate": "2024-08-23T23:00:00.000Z", + "overrideDate": "2024-12-26T00:00:00.000Z", "startDateTime": "00:00", - "type": "Bank holiday", + "type": "Christmas and New Year", }, { "endDateTime": "00:00", - "overrideDate": "2024-08-25T23:00:00.000Z", + "overrideDate": "2024-12-27T00:00:00.000Z", "startDateTime": "00:00", - "type": "Bank holiday", + "type": "Christmas and New Year", }, { "endDateTime": "00:00", - "overrideDate": "2024-12-23T00:00:00.000Z", + "overrideDate": "2024-12-28T00:00:00.000Z", "startDateTime": "00:00", "type": "Christmas and New Year", }, { "endDateTime": "00:00", - "overrideDate": "2024-12-24T00:00:00.000Z", + "overrideDate": "2024-12-30T00:00:00.000Z", "startDateTime": "00:00", "type": "Christmas and New Year", }, { "endDateTime": "00:00", - "overrideDate": "2024-12-30T00:00:00.000Z", + "overrideDate": "2024-12-31T00:00:00.000Z", "startDateTime": "00:00", "type": "Christmas and New Year", }, { "endDateTime": "00:00", - "overrideDate": "2024-11-04T00:00:00.000Z", + "overrideDate": "2025-01-01T00:00:00.000Z", "startDateTime": "00:00", - "type": "other", + "type": "Christmas and New Year", }, ], "regularOpeningDays": [ @@ -114,63 +114,63 @@ exports[`eventDocument transformer transforms venues from Prismic to the expecte "exceptionalClosedDays": [ { "endDateTime": "00:00", - "overrideDate": "2024-05-03T23:00:00.000Z", + "overrideDate": "2024-12-21T00:00:00.000Z", "startDateTime": "00:00", - "type": "Bank holiday", + "type": "Christmas and New Year", }, { "endDateTime": "00:00", - "overrideDate": "2024-05-05T23:00:00.000Z", + "overrideDate": "2024-12-23T00:00:00.000Z", "startDateTime": "00:00", - "type": "Bank holiday", + "type": "Christmas and New Year", }, { "endDateTime": "00:00", - "overrideDate": "2024-05-24T23:00:00.000Z", + "overrideDate": "2024-12-24T00:00:00.000Z", "startDateTime": "00:00", - "type": "Bank holiday", + "type": "Christmas and New Year", }, { "endDateTime": "00:00", - "overrideDate": "2024-05-26T23:00:00.000Z", + "overrideDate": "2024-12-25T00:00:00.000Z", "startDateTime": "00:00", - "type": "Bank holiday", + "type": "Christmas and New Year", }, { "endDateTime": "00:00", - "overrideDate": "2024-08-23T23:00:00.000Z", + "overrideDate": "2024-12-26T00:00:00.000Z", "startDateTime": "00:00", - "type": "Bank holiday", + "type": "Christmas and New Year", }, { "endDateTime": "00:00", - "overrideDate": "2024-08-25T23:00:00.000Z", + "overrideDate": "2024-12-27T00:00:00.000Z", "startDateTime": "00:00", - "type": "Bank holiday", + "type": "Christmas and New Year", }, { "endDateTime": "00:00", - "overrideDate": "2024-12-23T00:00:00.000Z", + "overrideDate": "2024-12-28T00:00:00.000Z", "startDateTime": "00:00", "type": "Christmas and New Year", }, { "endDateTime": "00:00", - "overrideDate": "2024-12-24T00:00:00.000Z", + "overrideDate": "2024-12-30T00:00:00.000Z", "startDateTime": "00:00", "type": "Christmas and New Year", }, { "endDateTime": "00:00", - "overrideDate": "2024-12-30T00:00:00.000Z", + "overrideDate": "2024-12-31T00:00:00.000Z", "startDateTime": "00:00", "type": "Christmas and New Year", }, { "endDateTime": "00:00", - "overrideDate": "2024-11-04T00:00:00.000Z", + "overrideDate": "2025-01-01T00:00:00.000Z", "startDateTime": "00:00", - "type": "other", + "type": "Christmas and New Year", }, ], "id": "WsuS_R8AACS1Nwlx", diff --git a/pipeline/test/transformers/addressables.test.ts b/pipeline/test/transformers/addressables.test.ts new file mode 100644 index 00000000..20cb0c25 --- /dev/null +++ b/pipeline/test/transformers/addressables.test.ts @@ -0,0 +1,28 @@ +import { transformAddressable } from '@weco/content-pipeline/src/transformers/addressables'; +import { + BookPrismicDocument, + VisualStoryPrismicDocument, +} from '@weco/content-pipeline/src/types/prismic'; +import { forEachPrismicSnapshot } from '@weco/content-pipeline/test/fixtures/prismic-snapshots'; + +describe('addressables transformer', () => { + forEachPrismicSnapshot('books')( + 'transforms books from Prismic to the expected format', + prismicDocument => { + const transformed = transformAddressable(prismicDocument); + // Unsure why it errors, it _is_ in a test() function, see `forEachPrismicSnapshot` + // eslint-disable-next-line jest/no-standalone-expect + expect(transformed).toMatchSnapshot(); + } + ); + + forEachPrismicSnapshot('visual-stories')( + 'transforms visual stories from Prismic to the expected format', + prismicDocument => { + const transformed = transformAddressable(prismicDocument); + // Unsure why it errors, it _is_ in a test() function, see `forEachPrismicSnapshot` + // eslint-disable-next-line jest/no-standalone-expect + expect(transformed).toMatchSnapshot(); + } + ); +}); diff --git a/pipeline/test/update-prismic-snapshots.ts b/pipeline/test/update-prismic-snapshots.ts index a8be4f13..6c38c639 100644 --- a/pipeline/test/update-prismic-snapshots.ts +++ b/pipeline/test/update-prismic-snapshots.ts @@ -11,6 +11,7 @@ import { webcomicsQuery, wrapQueries, } from '@weco/content-pipeline/src/graph-queries'; +import { getGraphQuery } from '@weco/content-pipeline/src/helpers/getGraphQuery'; import { asText, asTitle, @@ -43,6 +44,11 @@ const venueIds = [ 'WsuS_R8AACS1Nwlx', // collection-venue - Library ]; +const addressableIds = { + 'visual-story': 'Zs8EuRAAAB4APxrA', // Hard Graft: Work, Health and Rights visual story + book: 'WwVK3CAAAHm5Exxr', // Brains: The mind as matter +}; + const updateArticleSnapshots = async (client: Client) => { console.log('Updating prismic snapshots for the following articles:'); console.log(articleDocumentIds.join('\n')); @@ -100,6 +106,39 @@ const updateVenueSnapshots = async (client: Client) => { return docs; }; +const updateAddressablesSnapshots = async (client: Client) => { + console.log('Updating prismic snapshots for the following addressables:'); + console.log( + Object.entries(addressableIds) + .map(([key, value]) => `${key}: ${value}`) + .join('\n') + ); + + const docs = await Promise.all( + Object.entries(addressableIds).map(async ([key, value]) => { + const graphQuery = getGraphQuery({ type: key }); + + const newDoc = await client.getByID(value, { + graphQuery: graphQuery.replace(/\n(\s+)/g, '\n'), + }); + + return newDoc; + }) + ); + + await Promise.all( + docs.map(doc => { + const docJson = JSON.stringify(doc, null, 2); + return fs.writeFile( + path.resolve(dataDir, `${doc.id}.${doc.type}.json`), + docJson + ); + }) + ); + + return docs; +}; + const lineWriter = (stream: Writable) => (line: string) => new Promise(resolve => stream.write(line + EOL, 'utf-8', resolve)); @@ -152,11 +191,17 @@ const main = async () => { const articleDocs = await updateArticleSnapshots(client); const eventDocs = await updateEventDocumentSnapshots(client); const venueDocs = await updateVenueSnapshots(client); + const addressableDocs = await updateAddressablesSnapshots(client); console.log('Done saving snapshots.'); console.log('Adding comments to update script...'); - await addCommentsToUpdateScript([...articleDocs, ...eventDocs, ...venueDocs]); + await addCommentsToUpdateScript([ + ...articleDocs, + ...eventDocs, + ...venueDocs, + ...addressableDocs, + ]); console.log('Done.'); };