From 7d86c2ce9ce2d1dcf6ba9db30a6709af6d071dfb Mon Sep 17 00:00:00 2001 From: Ronald Langeveld Date: Thu, 12 Sep 2024 18:18:57 +0900 Subject: [PATCH] Added labs props to Content Settings API (#20965) ref PLG-229 - Added Labs properties to the Content Settings API endpoint to be reachable in Portal and Comments UI app. --- ghost/core/core/shared/settings-cache/public.js | 3 ++- .../test/e2e-api/content/__snapshots__/settings.test.js.snap | 1 + ghost/core/test/e2e-api/content/settings.test.js | 3 ++- .../test/e2e-api/shared/__snapshots__/version.test.js.snap | 2 ++ ghost/core/test/e2e-api/shared/version.test.js | 5 +++-- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ghost/core/core/shared/settings-cache/public.js b/ghost/core/core/shared/settings-cache/public.js index 30fe80f346..fa6b7766e6 100644 --- a/ghost/core/core/shared/settings-cache/public.js +++ b/ghost/core/core/shared/settings-cache/public.js @@ -46,5 +46,6 @@ module.exports = { outbound_link_tagging: 'outbound_link_tagging', default_email_address: 'default_email_address', support_email_address: 'support_email_address', - editor_default_email_recipients: 'editor_default_email_recipients' + editor_default_email_recipients: 'editor_default_email_recipients', + labs: 'labs' }; diff --git a/ghost/core/test/e2e-api/content/__snapshots__/settings.test.js.snap b/ghost/core/test/e2e-api/content/__snapshots__/settings.test.js.snap index c61c0a5f86..5a42415e6c 100644 --- a/ghost/core/test/e2e-api/content/__snapshots__/settings.test.js.snap +++ b/ghost/core/test/e2e-api/content/__snapshots__/settings.test.js.snap @@ -16,6 +16,7 @@ Object { "facebook": "ghost", "firstpromoter_account": null, "icon": null, + "labs": Any, "lang": "en", "locale": "en", "logo": null, diff --git a/ghost/core/test/e2e-api/content/settings.test.js b/ghost/core/test/e2e-api/content/settings.test.js index 8f83a933c8..bc3e558d1a 100644 --- a/ghost/core/test/e2e-api/content/settings.test.js +++ b/ghost/core/test/e2e-api/content/settings.test.js @@ -2,7 +2,8 @@ const {agentProvider, fixtureManager, matchers} = require('../../utils/e2e-frame const {anyEtag, anyContentLength, anyContentVersion} = matchers; const settingsMatcher = { - version: matchers.anyString + version: matchers.anyString, + labs: matchers.anyObject }; describe('Settings Content API', function () { diff --git a/ghost/core/test/e2e-api/shared/__snapshots__/version.test.js.snap b/ghost/core/test/e2e-api/shared/__snapshots__/version.test.js.snap index d2d688d07a..d129ca9aab 100644 --- a/ghost/core/test/e2e-api/shared/__snapshots__/version.test.js.snap +++ b/ghost/core/test/e2e-api/shared/__snapshots__/version.test.js.snap @@ -1368,6 +1368,7 @@ Object { "facebook": "ghost", "firstpromoter_account": null, "icon": null, + "labs": Any, "lang": "en", "locale": "en", "logo": null, @@ -1471,6 +1472,7 @@ Object { "facebook": "ghost", "firstpromoter_account": null, "icon": null, + "labs": Any, "lang": "en", "locale": "en", "logo": null, diff --git a/ghost/core/test/e2e-api/shared/version.test.js b/ghost/core/test/e2e-api/shared/version.test.js index add373cfcb..3718f61e6e 100644 --- a/ghost/core/test/e2e-api/shared/version.test.js +++ b/ghost/core/test/e2e-api/shared/version.test.js @@ -1,10 +1,11 @@ const {agentProvider, fixtureManager, matchers, regexes, mockManager} = require('../../utils/e2e-framework'); -const {anyErrorId, stringMatching, anyObjectId, anyLocationFor, anyISODateTime, anyEtag, anyString, anyContentLength, anyContentVersion} = matchers; +const {anyErrorId, stringMatching, anyObjectId, anyLocationFor, anyISODateTime, anyEtag, anyString, anyContentLength, anyContentVersion, anyObject} = matchers; const {anyMajorMinorVersion} = regexes; const settingsMatcher = { settings: { - version: anyString + version: anyString, + labs: anyObject } };