diff --git a/ghost/core/test/e2e-api/admin/__snapshots__/settings.test.js.snap b/ghost/core/test/e2e-api/admin/__snapshots__/settings.test.js.snap index 4d9d0d20af..521e088a9c 100644 --- a/ghost/core/test/e2e-api/admin/__snapshots__/settings.test.js.snap +++ b/ghost/core/test/e2e-api/admin/__snapshots__/settings.test.js.snap @@ -619,7 +619,7 @@ exports[`Settings API Edit Can edit a setting 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": "3365", + "content-length": "3387", "content-type": "application/json; charset=utf-8", "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, "vary": "Origin, Accept-Encoding", @@ -908,7 +908,7 @@ exports[`Settings API Edit cannot edit uneditable settings 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": "3432", + "content-length": StringMatching /\\\\d\\+/, "content-type": "application/json; charset=utf-8", "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, "vary": "Origin, Accept-Encoding", @@ -1196,7 +1196,7 @@ exports[`Settings API Edit does not trigger email verification flow if members_s 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": "3444", + "content-length": StringMatching /\\\\d\\+/, "content-type": "application/json; charset=utf-8", "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, "vary": "Origin, Accept-Encoding", @@ -1489,7 +1489,7 @@ exports[`Settings API Edit editing members_support_address triggers email verifi 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": "3485", + "content-length": StringMatching /\\\\d\\+/, "content-type": "application/json; charset=utf-8", "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, "vary": "Origin, Accept-Encoding", @@ -1777,7 +1777,7 @@ exports[`Settings API Edit removes image size prefixes when setting the icon 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": "3432", + "content-length": StringMatching /\\\\d\\+/, "content-type": "application/json; charset=utf-8", "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, "vary": "Origin, Accept-Encoding", @@ -2128,7 +2128,7 @@ exports[`Settings API verify key update can update members_support_address via t 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": "3444", + "content-length": StringMatching /\\\\d\\+/, "content-type": "application/json; charset=utf-8", "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, "vary": "Origin, Accept-Encoding", diff --git a/ghost/core/test/e2e-api/admin/settings.test.js b/ghost/core/test/e2e-api/admin/settings.test.js index d4705e12a8..c69e42c06f 100644 --- a/ghost/core/test/e2e-api/admin/settings.test.js +++ b/ghost/core/test/e2e-api/admin/settings.test.js @@ -199,7 +199,9 @@ describe('Settings API', function () { settings: matchSettingsArray(CURRENT_SETTINGS_COUNT) }) .matchHeaderSnapshot({ - etag: anyEtag + etag: anyEtag, + // Special rule for this test, as the labs setting changes a lot + 'content-length': anyStringNumber }); // Check returned WITH prefix @@ -224,7 +226,9 @@ describe('Settings API', function () { settings: matchSettingsArray(CURRENT_SETTINGS_COUNT) }) .matchHeaderSnapshot({ - etag: anyEtag + etag: anyEtag, + // Special rule for this test, as the labs setting changes a lot + 'content-length': anyStringNumber }) .expect(({body}) => { const emailVerificationRequired = body.settings.find(setting => setting.key === 'email_verification_required'); @@ -243,7 +247,9 @@ describe('Settings API', function () { settings: matchSettingsArray(CURRENT_SETTINGS_COUNT) }) .matchHeaderSnapshot({ - etag: anyEtag + etag: anyEtag, + // Special rule for this test, as the labs setting changes a lot + 'content-length': anyStringNumber }) .expect(({body}) => { const membersSupportAddress = body.settings.find(setting => setting.key === 'members_support_address'); @@ -276,7 +282,9 @@ describe('Settings API', function () { settings: matchSettingsArray(CURRENT_SETTINGS_COUNT) }) .matchHeaderSnapshot({ - etag: anyEtag + etag: anyEtag, + // Special rule for this test, as the labs setting changes a lot + 'content-length': anyStringNumber }) .expect(({body}) => { const membersSupportAddress = body.settings.find(setting => setting.key === 'members_support_address'); @@ -301,12 +309,15 @@ describe('Settings API', function () { settings: matchSettingsArray(CURRENT_SETTINGS_COUNT) }) .matchHeaderSnapshot({ - etag: anyEtag + etag: anyEtag, + // Special rule for this test, as the labs setting changes a lot + 'content-length': anyStringNumber }) .expect(({body}) => { const membersSupportAddress = body.settings.find(setting => setting.key === 'members_support_address'); assert.strictEqual(membersSupportAddress.value, 'support@example.com'); }); + mockManager.assert.sentEmailCount(0); });