From b82a93beac40f9f7e074a6356455c3193388affc Mon Sep 17 00:00:00 2001 From: Simon Backx Date: Fri, 22 Sep 2023 17:35:55 +0200 Subject: [PATCH] Added recommendation_notifications column to users table (#18304) fixes https://github.com/TryGhost/Product/issues/3939 --- apps/admin-x-settings/src/api/users.ts | 1 + .../settings/general/UserDetailModal.tsx | 10 ++++++ .../test/utils/responses/me.json | 1 + .../test/utils/responses/users.json | 5 +++ .../utils/serializers/output/utils/clean.js | 1 + ...add-recommendation-notifications-column.js | 7 ++++ ghost/core/core/server/data/schema/schema.js | 1 + ghost/core/core/server/models/user.js | 3 ++ .../__snapshots__/collections.test.js.snap | 8 ++--- .../admin/__snapshots__/members.test.js.snap | 2 +- .../admin/__snapshots__/pages.test.js.snap | 10 +++--- .../admin/__snapshots__/posts.test.js.snap | 36 +++++++++---------- .../admin/__snapshots__/session.test.js.snap | 3 +- .../__snapshots__/pages.test.js.snap | 21 +++++++++++ .../__snapshots__/posts.test.js.snap | 21 +++++++++++ .../__snapshots__/authentication.test.js.snap | 9 +++-- .../unit/server/data/schema/integrity.test.js | 2 +- ghost/core/test/utils/fixtures/fixtures.json | 2 ++ 18 files changed, 110 insertions(+), 33 deletions(-) create mode 100644 ghost/core/core/server/data/migrations/versions/5.66/2023-09-22-14-15-add-recommendation-notifications-column.js diff --git a/apps/admin-x-settings/src/api/users.ts b/apps/admin-x-settings/src/api/users.ts index 095d08006c..9ea4b43ecb 100644 --- a/apps/admin-x-settings/src/api/users.ts +++ b/apps/admin-x-settings/src/api/users.ts @@ -28,6 +28,7 @@ export type User = { paid_subscription_canceled_notification: boolean; paid_subscription_started_notification: boolean; mention_notifications: boolean; + recommendation_notifications: boolean; milestone_notifications: boolean; roles: UserRole[]; url: string; diff --git a/apps/admin-x-settings/src/components/settings/general/UserDetailModal.tsx b/apps/admin-x-settings/src/components/settings/general/UserDetailModal.tsx index e0c4c2590f..5468aacb59 100644 --- a/apps/admin-x-settings/src/components/settings/general/UserDetailModal.tsx +++ b/apps/admin-x-settings/src/components/settings/general/UserDetailModal.tsx @@ -178,6 +178,7 @@ const Details: React.FC = ({errors, validators, user, setUserDa const EmailNotificationsInputs: React.FC = ({user, setUserData}) => { const hasWebmentions = useFeatureFlag('webmentions'); + const hasRecommendations = useFeatureFlag('recommendations'); const {currentUser} = useGlobalData(); return ( @@ -201,6 +202,15 @@ const EmailNotificationsInputs: React.FC = ({user, setUserData} setUserData?.({...user, mention_notifications: e.target.checked}); }} />} + {hasRecommendations && { + setUserData?.({...user, recommendation_notifications: e.target.checked}); + }} + />} { delete attrs.paid_subscription_started_notification; delete attrs.paid_subscription_canceled_notification; delete attrs.mention_notifications; + delete attrs.recommendation_notifications; delete attrs.milestone_notifications; delete attrs.donation_notifications; diff --git a/ghost/core/core/server/data/migrations/versions/5.66/2023-09-22-14-15-add-recommendation-notifications-column.js b/ghost/core/core/server/data/migrations/versions/5.66/2023-09-22-14-15-add-recommendation-notifications-column.js new file mode 100644 index 0000000000..b20b7742f0 --- /dev/null +++ b/ghost/core/core/server/data/migrations/versions/5.66/2023-09-22-14-15-add-recommendation-notifications-column.js @@ -0,0 +1,7 @@ +const {createAddColumnMigration} = require('../../utils'); + +module.exports = createAddColumnMigration('users', 'recommendation_notifications', { + type: 'boolean', + nullable: false, + defaultTo: true +}); diff --git a/ghost/core/core/server/data/schema/schema.js b/ghost/core/core/server/data/schema/schema.js index ee5af85b39..00fa091be5 100644 --- a/ghost/core/core/server/data/schema/schema.js +++ b/ghost/core/core/server/data/schema/schema.js @@ -163,6 +163,7 @@ module.exports = { paid_subscription_started_notification: {type: 'boolean', nullable: false, defaultTo: true}, paid_subscription_canceled_notification: {type: 'boolean', nullable: false, defaultTo: false}, mention_notifications: {type: 'boolean', nullable: false, defaultTo: true}, + recommendation_notifications: {type: 'boolean', nullable: false, defaultTo: true}, milestone_notifications: {type: 'boolean', nullable: false, defaultTo: true}, donation_notifications: {type: 'boolean', nullable: false, defaultTo: true}, created_at: {type: 'dateTime', nullable: false}, diff --git a/ghost/core/core/server/models/user.js b/ghost/core/core/server/models/user.js index 171da1ba24..893ba22c35 100644 --- a/ghost/core/core/server/models/user.js +++ b/ghost/core/core/server/models/user.js @@ -69,6 +69,7 @@ User = ghostBookshelf.Model.extend({ paid_subscription_started_notification: true, paid_subscription_canceled_notification: false, mention_notifications: true, + recommendation_notifications: true, milestone_notifications: true, donation_notifications: true }; @@ -512,6 +513,8 @@ User = ghostBookshelf.Model.extend({ filter += '+milestone_notifications:true'; } else if (type === 'donation') { filter += '+donation_notifications:true'; + } else if (type === 'recommendation-received') { + filter += '+recommendation_notifications:true'; } const updatedOptions = _.merge({}, options, {filter, withRelated: ['roles']}); return this.findAll(updatedOptions).then((users) => { diff --git a/ghost/core/test/e2e-api/admin/__snapshots__/collections.test.js.snap b/ghost/core/test/e2e-api/admin/__snapshots__/collections.test.js.snap index bb5f963fc3..faa6d4164e 100644 --- a/ghost/core/test/e2e-api/admin/__snapshots__/collections.test.js.snap +++ b/ghost/core/test/e2e-api/admin/__snapshots__/collections.test.js.snap @@ -207,7 +207,7 @@ exports[`Collections API Automatic Collection Filtering Creates an automatic Col Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "12483", + "content-length": "12663", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -728,7 +728,7 @@ exports[`Collections API Automatic Collection Filtering Creates an automatic Col Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "77925", + "content-length": "78609", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -987,7 +987,7 @@ exports[`Collections API Automatic Collection Filtering Creates an automatic Col Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "14293", + "content-length": "14437", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -1246,7 +1246,7 @@ exports[`Collections API Automatic Collection Filtering Creates an automatic Col Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "14293", + "content-length": "14437", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, diff --git a/ghost/core/test/e2e-api/admin/__snapshots__/members.test.js.snap b/ghost/core/test/e2e-api/admin/__snapshots__/members.test.js.snap index 8f7adf6a23..5f8ebe3b5e 100644 --- a/ghost/core/test/e2e-api/admin/__snapshots__/members.test.js.snap +++ b/ghost/core/test/e2e-api/admin/__snapshots__/members.test.js.snap @@ -381,7 +381,7 @@ exports[`Members API - member attribution Returns sign up attributions of all ty Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "9568", + "content-length": "9604", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, diff --git a/ghost/core/test/e2e-api/admin/__snapshots__/pages.test.js.snap b/ghost/core/test/e2e-api/admin/__snapshots__/pages.test.js.snap index 15990bc99c..1c0445b339 100644 --- a/ghost/core/test/e2e-api/admin/__snapshots__/pages.test.js.snap +++ b/ghost/core/test/e2e-api/admin/__snapshots__/pages.test.js.snap @@ -654,7 +654,7 @@ exports[`Pages API Convert can convert a mobiledoc page to lexical 2: [headers] Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "4013", + "content-length": "4085", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -851,7 +851,7 @@ exports[`Pages API Copy Can copy a page 3: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "3727", + "content-length": "3799", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -958,7 +958,7 @@ exports[`Pages API Create Can create a page with html (labs.lexicalEditor) 2: [h Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "5420", + "content-length": "5528", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -1065,7 +1065,7 @@ exports[`Pages API Create Can create a page with html 2: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "3815", + "content-length": "3887", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -1479,7 +1479,7 @@ exports[`Pages API Update Can modify show_title_and_feature_image property 2: [h Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "3728", + "content-length": "3800", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, diff --git a/ghost/core/test/e2e-api/admin/__snapshots__/posts.test.js.snap b/ghost/core/test/e2e-api/admin/__snapshots__/posts.test.js.snap index dfe7f6503f..1cf028d97c 100644 --- a/ghost/core/test/e2e-api/admin/__snapshots__/posts.test.js.snap +++ b/ghost/core/test/e2e-api/admin/__snapshots__/posts.test.js.snap @@ -197,7 +197,7 @@ exports[`Posts API Can browse 2: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "10602", + "content-length": "10746", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -421,7 +421,7 @@ exports[`Posts API Can browse filtering by a collection 2: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "11597", + "content-length": "11741", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -538,7 +538,7 @@ exports[`Posts API Can browse filtering by collection using paging parameters 2: Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "8750", + "content-length": "8822", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -768,7 +768,7 @@ exports[`Posts API Can browse with formats 2: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "13430", + "content-length": "13574", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -877,7 +877,7 @@ exports[`Posts API Convert can convert a mobiledoc post to lexical 2: [headers] Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "4050", + "content-length": "4122", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -985,7 +985,7 @@ exports[`Posts API Copy Can copy a post 2: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "3762", + "content-length": "3834", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -1095,7 +1095,7 @@ exports[`Posts API Create Can create a post with html (labs.lexicalEditor) 2: [h Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "5455", + "content-length": "5563", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -1205,7 +1205,7 @@ exports[`Posts API Create Can create a post with html 2: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "3850", + "content-length": "3922", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -1315,7 +1315,7 @@ exports[`Posts API Create Can create a post with lexical 2: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "5486", + "content-length": "5594", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -1425,7 +1425,7 @@ exports[`Posts API Create Can create a post with mobiledoc 2: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "3900", + "content-length": "3972", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -1712,7 +1712,7 @@ exports[`Posts API Delete Can delete posts belonging to a collection and returns Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "11597", + "content-length": "11741", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -1995,7 +1995,7 @@ exports[`Posts API Update Can add and remove collections 2: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "3761", + "content-length": "3833", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -2222,7 +2222,7 @@ exports[`Posts API Update Can add and remove collections 4: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "5407", + "content-length": "5479", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -2449,7 +2449,7 @@ exports[`Posts API Update Can add and remove collections 6: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "5401", + "content-length": "5473", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -2559,7 +2559,7 @@ exports[`Posts API Update Can update a post with lexical 2: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "5423", + "content-length": "5531", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -2669,7 +2669,7 @@ exports[`Posts API Update Can update a post with lexical 4: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "6805", + "content-length": "6949", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -2779,7 +2779,7 @@ exports[`Posts API Update Can update a post with mobiledoc 2: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "3845", + "content-length": "3917", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -2889,7 +2889,7 @@ exports[`Posts API Update Can update a post with mobiledoc 4: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "3842", + "content-length": "3914", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, diff --git a/ghost/core/test/e2e-api/admin/__snapshots__/session.test.js.snap b/ghost/core/test/e2e-api/admin/__snapshots__/session.test.js.snap index b215b21169..7a43819c7a 100644 --- a/ghost/core/test/e2e-api/admin/__snapshots__/session.test.js.snap +++ b/ghost/core/test/e2e-api/admin/__snapshots__/session.test.js.snap @@ -51,6 +51,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "slug": "joe-bloggs", "status": "active", "tour": null, @@ -66,7 +67,7 @@ exports[`Sessions API can read session now the owner is logged in 2: [headers] 1 Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "767", + "content-length": "803", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, diff --git a/ghost/core/test/e2e-webhooks/__snapshots__/pages.test.js.snap b/ghost/core/test/e2e-webhooks/__snapshots__/pages.test.js.snap index a1a27d1a8e..b81b3ffa3a 100644 --- a/ghost/core/test/e2e-webhooks/__snapshots__/pages.test.js.snap +++ b/ghost/core/test/e2e-webhooks/__snapshots__/pages.test.js.snap @@ -36,6 +36,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "slug": "joe-bloggs", "status": "active", "tour": null, @@ -87,6 +88,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "slug": "joe-bloggs", "status": "active", "tour": null, @@ -190,6 +192,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -269,6 +272,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -336,6 +340,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -489,6 +494,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -556,6 +562,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -709,6 +716,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -776,6 +784,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -928,6 +937,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -995,6 +1005,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -1147,6 +1158,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -1214,6 +1226,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -1367,6 +1380,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -1434,6 +1448,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -1631,6 +1646,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -1698,6 +1714,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -1835,6 +1852,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -1902,6 +1920,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -2054,6 +2073,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -2121,6 +2141,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, diff --git a/ghost/core/test/e2e-webhooks/__snapshots__/posts.test.js.snap b/ghost/core/test/e2e-webhooks/__snapshots__/posts.test.js.snap index 70a57830a0..fee6302556 100644 --- a/ghost/core/test/e2e-webhooks/__snapshots__/posts.test.js.snap +++ b/ghost/core/test/e2e-webhooks/__snapshots__/posts.test.js.snap @@ -36,6 +36,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "slug": "joe-bloggs", "status": "active", "tour": null, @@ -90,6 +91,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "slug": "joe-bloggs", "status": "active", "tour": null, @@ -192,6 +194,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -270,6 +273,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -339,6 +343,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -490,6 +495,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -580,6 +586,7 @@ Header Level 3 "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -733,6 +740,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -802,6 +810,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -953,6 +962,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -1022,6 +1032,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -1173,6 +1184,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -1242,6 +1254,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -1394,6 +1407,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -1484,6 +1498,7 @@ Header Level 3 "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -1681,6 +1696,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -1771,6 +1787,7 @@ Header Level 3 "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -1908,6 +1925,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -1998,6 +2016,7 @@ Header Level 3 "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -2150,6 +2169,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, @@ -2219,6 +2239,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "roles": Array [ Object { "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, diff --git a/ghost/core/test/regression/api/admin/__snapshots__/authentication.test.js.snap b/ghost/core/test/regression/api/admin/__snapshots__/authentication.test.js.snap index 79fa30a62a..e7dfc2ce93 100644 --- a/ghost/core/test/regression/api/admin/__snapshots__/authentication.test.js.snap +++ b/ghost/core/test/regression/api/admin/__snapshots__/authentication.test.js.snap @@ -24,6 +24,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": null, + "recommendation_notifications": true, "slug": "test", "status": "active", "tour": null, @@ -40,7 +41,7 @@ exports[`Authentication API Blog setup complete setup 2: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "686", + "content-length": "722", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -298,6 +299,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": null, + "recommendation_notifications": true, "slug": "test", "status": "active", "tour": null, @@ -314,7 +316,7 @@ exports[`Authentication API Blog setup complete setup with default theme 2: [hea Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "686", + "content-length": "722", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -587,6 +589,7 @@ Object { "paid_subscription_canceled_notification": false, "paid_subscription_started_notification": true, "profile_image": "https://example.com/super_photo.jpg", + "recommendation_notifications": true, "slug": "test", "status": "active", "tour": null, @@ -603,7 +606,7 @@ exports[`Authentication API Blog setup update setup 2: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "758", + "content-length": "794", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, diff --git a/ghost/core/test/unit/server/data/schema/integrity.test.js b/ghost/core/test/unit/server/data/schema/integrity.test.js index 8fb2709d9e..c8d77cd410 100644 --- a/ghost/core/test/unit/server/data/schema/integrity.test.js +++ b/ghost/core/test/unit/server/data/schema/integrity.test.js @@ -35,7 +35,7 @@ const validateRouteSettings = require('../../../../../core/server/services/route */ describe('DB version integrity', function () { // Only these variables should need updating - const currentSchemaHash = '38fa7cfe8d74659ec75a5963b13cb4eb'; + const currentSchemaHash = '1b75aae9befefea53b17c9c1991c8a1d'; const currentFixturesHash = '4db87173699ad9c9d8a67ccab96dfd2d'; const currentSettingsHash = '3a7ca0aa6a06cba47e3e898aef7029c2'; const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01'; diff --git a/ghost/core/test/utils/fixtures/fixtures.json b/ghost/core/test/utils/fixtures/fixtures.json index f8ca181b44..6218bdf218 100644 --- a/ghost/core/test/utils/fixtures/fixtures.json +++ b/ghost/core/test/utils/fixtures/fixtures.json @@ -725,6 +725,7 @@ "paid_subscription_started_notificaton": true, "paid_subscription_canceled_notification": false, "mention_notifications": true, + "recommendation_notifications": true, "milestone_notifications": true, "donation_notifications": true, "status": "inactive", @@ -742,6 +743,7 @@ "paid_subscription_started_notification": true, "paid_subscription_canceled_notification": false, "mention_notifications": true, + "recommendation_notifications": true, "milestone_notifications": true, "donation_notifications": true, "location": "The Internet",