Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: clean up and refactor Contentful unit tests #34584

Merged
merged 11 commits into from
Feb 1, 2022
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ exports.contentTypeItems = () => [
type: `Link`,
linkType: `Space`,
id: `uzfinxahlog0`,
contentful_id: `uzfinxahlog0`,
},
},
id: `person`,
Expand All @@ -21,7 +20,6 @@ exports.contentTypeItems = () => [
},
},
revision: 1,
contentful_id: `person`,
},
displayField: `name`,
name: `Person`,
Expand Down Expand Up @@ -127,7 +125,6 @@ exports.contentTypeItems = () => [
type: `Link`,
linkType: `Space`,
id: `uzfinxahlog0`,
contentful_id: `uzfinxahlog0`,
},
},
id: `blogPost`,
Expand All @@ -142,7 +139,6 @@ exports.contentTypeItems = () => [
},
},
revision: 1,
contentful_id: `blogPost`,
},
displayField: `title`,
name: `Blog Post`,
Expand Down Expand Up @@ -241,7 +237,6 @@ exports.initialSync = () => {
type: `Link`,
linkType: `Space`,
id: `uzfinxahlog0`,
contentful_id: `uzfinxahlog0`,
},
},
id: `31TNnjHlfaGUoMOwU0M2og`,
Expand All @@ -261,10 +256,8 @@ exports.initialSync = () => {
type: `Link`,
linkType: `ContentType`,
id: `blogPost`,
contentful_id: `blogPost`,
},
},
contentful_id: `31TNnjHlfaGUoMOwU0M2og`,
},
fields: {
title: { "en-US": `Automate with webhooks` },
Expand All @@ -275,7 +268,6 @@ exports.initialSync = () => {
type: `Link`,
linkType: `Asset`,
id: `4shwYI3POEGkw0Eg6kcyaQ`,
contentful_id: `4shwYI3POEGkw0Eg6kcyaQ`,
},
},
},
Expand All @@ -291,7 +283,6 @@ exports.initialSync = () => {
type: `Link`,
linkType: `Entry`,
id: `15jwOBqpxqSAOy2eOO4S0m`,
contentful_id: `15jwOBqpxqSAOy2eOO4S0m`,
},
},
},
Expand All @@ -306,7 +297,6 @@ exports.initialSync = () => {
type: `Link`,
linkType: `Space`,
id: `uzfinxahlog0`,
contentful_id: `uzfinxahlog0`,
},
},
id: `3K9b0esdy0q0yGqgW2g6Ke`,
Expand All @@ -326,10 +316,8 @@ exports.initialSync = () => {
type: `Link`,
linkType: `ContentType`,
id: `blogPost`,
contentful_id: `blogPost`,
},
},
contentful_id: `3K9b0esdy0q0yGqgW2g6Ke`,
},
fields: {
title: { "en-US": `Hello world` },
Expand All @@ -340,7 +328,6 @@ exports.initialSync = () => {
type: `Link`,
linkType: `Asset`,
id: `6Od9v3wzLOysiMum0Wkmme`,
contentful_id: `6Od9v3wzLOysiMum0Wkmme`,
},
},
},
Expand All @@ -356,7 +343,6 @@ exports.initialSync = () => {
type: `Link`,
linkType: `Entry`,
id: `15jwOBqpxqSAOy2eOO4S0m`,
contentful_id: `15jwOBqpxqSAOy2eOO4S0m`,
},
},
},
Expand All @@ -371,7 +357,6 @@ exports.initialSync = () => {
type: `Link`,
linkType: `Space`,
id: `uzfinxahlog0`,
contentful_id: `uzfinxahlog0`,
},
},
id: `2PtC9h1YqIA6kaUaIsWEQ0`,
Expand All @@ -391,10 +376,8 @@ exports.initialSync = () => {
type: `Link`,
linkType: `ContentType`,
id: `blogPost`,
contentful_id: `blogPost`,
},
},
contentful_id: `2PtC9h1YqIA6kaUaIsWEQ0`,
},
fields: {
title: { "en-US": `Static sites are great` },
Expand All @@ -405,7 +388,6 @@ exports.initialSync = () => {
type: `Link`,
linkType: `Asset`,
id: `4NzwDSDlGECGIiokKomsyI`,
contentful_id: `4NzwDSDlGECGIiokKomsyI`,
},
},
},
Expand All @@ -421,7 +403,6 @@ exports.initialSync = () => {
type: `Link`,
linkType: `Entry`,
id: `15jwOBqpxqSAOy2eOO4S0m`,
contentful_id: `15jwOBqpxqSAOy2eOO4S0m`,
},
},
},
Expand All @@ -436,7 +417,6 @@ exports.initialSync = () => {
type: `Link`,
linkType: `Space`,
id: `uzfinxahlog0`,
contentful_id: `uzfinxahlog0`,
},
},
id: `15jwOBqpxqSAOy2eOO4S0m`,
Expand All @@ -456,10 +436,8 @@ exports.initialSync = () => {
type: `Link`,
linkType: `ContentType`,
id: `person`,
contentful_id: `person`,
},
},
contentful_id: `15jwOBqpxqSAOy2eOO4S0m`,
},
fields: {
name: { "en-US": `John Doe` },
Expand All @@ -479,7 +457,6 @@ exports.initialSync = () => {
type: `Link`,
linkType: `Asset`,
id: `7orLdboQQowIUs22KAW4U`,
contentful_id: `7orLdboQQowIUs22KAW4U`,
},
},
},
Expand All @@ -494,7 +471,6 @@ exports.initialSync = () => {
type: `Link`,
linkType: `Space`,
id: `uzfinxahlog0`,
contentful_id: `uzfinxahlog0`,
},
},
id: `6Od9v3wzLOysiMum0Wkmme`,
Expand All @@ -509,7 +485,6 @@ exports.initialSync = () => {
},
},
revision: 1,
contentful_id: `6Od9v3wzLOysiMum0Wkmme`,
},
fields: {
title: { "en-US": `Woman with black hat` },
Expand All @@ -526,6 +501,7 @@ exports.initialSync = () => {
},
},
},
metadata: { tags: [] },
},
{
sys: {
Expand All @@ -534,7 +510,6 @@ exports.initialSync = () => {
type: `Link`,
linkType: `Space`,
id: `uzfinxahlog0`,
contentful_id: `uzfinxahlog0`,
},
},
id: `4NzwDSDlGECGIiokKomsyI`,
Expand All @@ -549,7 +524,6 @@ exports.initialSync = () => {
},
},
revision: 1,
contentful_id: `4NzwDSDlGECGIiokKomsyI`,
},
fields: {
title: { "en-US": `City` },
Expand All @@ -566,6 +540,7 @@ exports.initialSync = () => {
},
},
},
metadata: { tags: [] },
},
{
sys: {
Expand All @@ -574,7 +549,6 @@ exports.initialSync = () => {
type: `Link`,
linkType: `Space`,
id: `uzfinxahlog0`,
contentful_id: `uzfinxahlog0`,
},
},
id: `4shwYI3POEGkw0Eg6kcyaQ`,
Expand All @@ -589,7 +563,6 @@ exports.initialSync = () => {
},
},
revision: 1,
contentful_id: `4shwYI3POEGkw0Eg6kcyaQ`,
},
fields: {
title: { "en-US": `Man in the fields` },
Expand All @@ -606,6 +579,7 @@ exports.initialSync = () => {
},
},
},
metadata: { tags: [] },
},
{
sys: {
Expand All @@ -614,7 +588,6 @@ exports.initialSync = () => {
type: `Link`,
linkType: `Space`,
id: `uzfinxahlog0`,
contentful_id: `uzfinxahlog0`,
},
},
id: `7orLdboQQowIUs22KAW4U`,
Expand All @@ -629,7 +602,6 @@ exports.initialSync = () => {
},
},
revision: 1,
contentful_id: `7orLdboQQowIUs22KAW4U`,
},
fields: {
title: { "en-US": `Sparkler` },
Expand All @@ -646,6 +618,7 @@ exports.initialSync = () => {
},
},
},
metadata: { tags: [] },
},
],
deletedEntries: [],
Expand Down Expand Up @@ -710,7 +683,6 @@ exports.createBlogPost = () => {
type: `Link`,
linkType: `Space`,
id: `uzfinxahlog0`,
contentful_id: `uzfinxahlog0`,
},
},
id: `1dHS3UzOqupJZY7AyeDc6s`,
Expand All @@ -730,10 +702,8 @@ exports.createBlogPost = () => {
type: `Link`,
linkType: `ContentType`,
id: `blogPost`,
contentful_id: `blogPost`,
},
},
contentful_id: `1dHS3UzOqupJZY7AyeDc6s`,
},
fields: {
title: { "en-US": `Integration tests` },
Expand All @@ -744,7 +714,6 @@ exports.createBlogPost = () => {
type: `Link`,
linkType: `Asset`,
id: `1aaRo2sQbdfWnG8iNvnkH3`,
contentful_id: `1aaRo2sQbdfWnG8iNvnkH3`,
},
},
},
Expand All @@ -760,7 +729,6 @@ exports.createBlogPost = () => {
type: `Link`,
linkType: `Entry`,
id: `15jwOBqpxqSAOy2eOO4S0m`,
contentful_id: `15jwOBqpxqSAOy2eOO4S0m`,
},
},
},
Expand All @@ -776,7 +744,6 @@ exports.createBlogPost = () => {
type: `Link`,
linkType: `Space`,
id: `uzfinxahlog0`,
contentful_id: `uzfinxahlog0`,
},
},
id: `1aaRo2sQbdfWnG8iNvnkH3`,
Expand All @@ -791,7 +758,6 @@ exports.createBlogPost = () => {
},
},
revision: 1,
contentful_id: `1aaRo2sQbdfWnG8iNvnkH3`,
},
fields: {
title: { "en-US": `Dummy image` },
Expand All @@ -805,6 +771,7 @@ exports.createBlogPost = () => {
},
},
},
metadata: { tags: [] },
},
],
deletedEntries: [],
Expand Down Expand Up @@ -869,7 +836,6 @@ exports.updateBlogPost = () => {
type: `Link`,
linkType: `Space`,
id: `uzfinxahlog0`,
contentful_id: `uzfinxahlog0`,
},
},
id: `1dHS3UzOqupJZY7AyeDc6s`,
Expand All @@ -889,10 +855,8 @@ exports.updateBlogPost = () => {
type: `Link`,
linkType: `ContentType`,
id: `blogPost`,
contentful_id: `blogPost`,
},
},
contentful_id: `1dHS3UzOqupJZY7AyeDc6s`,
},
fields: {
title: { "en-US": `Hello world 1234` },
Expand All @@ -903,7 +867,6 @@ exports.updateBlogPost = () => {
type: `Link`,
linkType: `Asset`,
id: `1aaRo2sQbdfWnG8iNvnkH3`,
contentful_id: `1aaRo2sQbdfWnG8iNvnkH3`,
},
},
},
Expand All @@ -919,7 +882,6 @@ exports.updateBlogPost = () => {
type: `Link`,
linkType: `Entry`,
id: `15jwOBqpxqSAOy2eOO4S0m`,
contentful_id: `15jwOBqpxqSAOy2eOO4S0m`,
},
},
},
Expand Down Expand Up @@ -994,7 +956,6 @@ exports.removeBlogPost = () => {
type: `Link`,
linkType: `Space`,
id: `uzfinxahlog0`,
contentful_id: `uzfinxahlog0`,
},
},
environment: {
Expand All @@ -1008,7 +969,6 @@ exports.removeBlogPost = () => {
createdAt: `2020-06-03T14:28:24.828Z`,
updatedAt: `2020-06-03T14:28:24.828Z`,
deletedAt: `2020-06-03T14:28:24.828Z`,
contentful_id: `1dHS3UzOqupJZY7AyeDc6s`,
},
},
],
Expand Down Expand Up @@ -1078,7 +1038,6 @@ exports.removeAsset = () => {
type: `Link`,
linkType: `Space`,
id: `uzfinxahlog0`,
contentful_id: `uzfinxahlog0`,
},
},
environment: {
Expand All @@ -1092,7 +1051,6 @@ exports.removeAsset = () => {
createdAt: `2020-06-03T14:28:57.237Z`,
updatedAt: `2020-06-03T14:28:57.237Z`,
deletedAt: `2020-06-03T14:28:57.237Z`,
contentful_id: `1aaRo2sQbdfWnG8iNvnkH3`,
},
},
],
Expand Down
Loading