diff --git a/ghost/core/test/integration/services/email-service/__snapshots__/batch-sending.test.js.snap b/ghost/core/test/integration/services/email-service/__snapshots__/batch-sending.test.js.snap index b191c72045..50aa724125 100644 --- a/ghost/core/test/integration/services/email-service/__snapshots__/batch-sending.test.js.snap +++ b/ghost/core/test/integration/services/email-service/__snapshots__/batch-sending.test.js.snap @@ -877,43 +877,13 @@ table.body figcaption a { - - - - - -
- - \\"More - - - - \\"Less - -
- - - -
- - \\"More -

More like this

-
-
- - \\"Less -

Less like this

-
-
- - - + @@ -1037,49 +1007,7 @@ Hello world - -http://127.0.0.1:2369/#/feedback/post-id/1/?uuid=member-uuid - - - -http://127.0.0.1:2369/#/feedback/post-id/0/?uuid=member-uuid - - - - - - - - - - - -More like this - - -[http://127.0.0.1:2369/#/feedback/post-id/1/?uuid=member-uuid] - - - - - -Less like this - - -[http://127.0.0.1:2369/#/feedback/post-id/0/?uuid=member-uuid] - - - - - - - - - - - - -Ghost © 2023 – Unsubscribe [http://127.0.0.1:2369/unsubscribe/?uuid=member-uuid&newsletter=requested-newsletter-uuid] +Ghost © 2023 – Unsubscribe [unsubscribe_url] @@ -1458,43 +1386,13 @@ table.body figcaption a { - - -
Ghost © 2023 – UnsubscribeGhost © 2023 – Unsubscribe
- - - -
- - \\"More - - - - \\"Less - -
- - - -
- - \\"More -

More like this

-
-
- - \\"Less -

Less like this

-
-
-
- + @@ -1618,49 +1516,7 @@ Hello world - -http://127.0.0.1:2369/this-is-a-test-post-title-6/#/feedback/post-id/1/?uuid=member-uuid - - - -http://127.0.0.1:2369/this-is-a-test-post-title-6/#/feedback/post-id/0/?uuid=member-uuid - - - - - - - - - - - -More like this - - -[http://127.0.0.1:2369/this-is-a-test-post-title-6/#/feedback/post-id/1/?uuid=member-uuid] - - - - - -Less like this - - -[http://127.0.0.1:2369/this-is-a-test-post-title-6/#/feedback/post-id/0/?uuid=member-uuid] - - - - - - - - - - - - -Ghost © 2023 – Unsubscribe [http://127.0.0.1:2369/unsubscribe/?uuid=member-uuid&newsletter=requested-newsletter-uuid] +Ghost © 2023 – Unsubscribe [unsubscribe_url] @@ -2039,43 +1895,13 @@ table.body figcaption a { - - -
Ghost © 2023 – UnsubscribeGhost © 2023 – Unsubscribe
- - - -
- - \\"More - - - - \\"Less - -
- - - -
- - \\"More -

More like this

-
-
- - \\"Less -

Less like this

-
-
-
- + @@ -2199,49 +2025,7 @@ Hello world - -http://127.0.0.1:2369/this-is-a-test-post-title-7/#/feedback/post-id/1/?uuid=member-uuid - - - -http://127.0.0.1:2369/this-is-a-test-post-title-7/#/feedback/post-id/0/?uuid=member-uuid - - - - - - - - - - - -More like this - - -[http://127.0.0.1:2369/this-is-a-test-post-title-7/#/feedback/post-id/1/?uuid=member-uuid] - - - - - -Less like this - - -[http://127.0.0.1:2369/this-is-a-test-post-title-7/#/feedback/post-id/0/?uuid=member-uuid] - - - - - - - - - - - - -Ghost © 2023 – Unsubscribe [http://127.0.0.1:2369/unsubscribe/?uuid=member-uuid&newsletter=requested-newsletter-uuid] +Ghost © 2023 – Unsubscribe [unsubscribe_url] @@ -4291,6 +4075,1180 @@ http://127.0.0.1:2369/this-is-a-test-post-title-3/#ghost-comments +Ghost © 2023 – Unsubscribe [unsubscribe_url] + + + +https://ghost.org/ + + + + + + + + + + + +  + + + + +", +} +`; + +exports[`Batch sending tests Newsletter settings Shows 3 comment buttons for published posts with feedback enabled 1 1`] = ` +Object { + "html": " + + + + + + This is a test post title + + + + Hello world +
Ghost © 2023 – UnsubscribeGhost © 2023 – Unsubscribe
+ + + + + + + + + +
  +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + +
+
+ This is a test post title +
+ + + + + +
+ By Joe Bloggs • 1 Jan 2023 + + • \\"Comment\\" + + + View in browser +
+
+ +

Hello world

+ + +
+
+ + + +
+ + \\"More + + + + \\"Less + + + + \\"Comment\\" + +
+ + + +
+ + \\"More +

More like this

+
+
+ + \\"Less +

Less like this

+
+
+ + \\"Comment\\" +

Comment

+
+
+
+ + + + + + + + +
Ghost © 2023 – Unsubscribe
\\"Powered
+
+ +
+
 
+ + +", +} +`; + +exports[`Batch sending tests Newsletter settings Shows 3 comment buttons for published posts with feedback enabled 2 1`] = ` +Object { + "html": " +Hello world + + + + + + +  + + + + + + + + + + + + + + + + + + + + + + + + + +Ghost [http://127.0.0.1:2369/] + + +Daily newsletter [http://127.0.0.1:2369/] + + + + + + + + + + +This is a test post title [http://127.0.0.1:2369/this-is-a-test-post-title-4/] + + + + + + + + + +By Joe Bloggs • 1 Jan 2023 + +• +[http://127.0.0.1:2369/this-is-a-test-post-title-4/#ghost-comments] + + +View in browser [http://127.0.0.1:2369/this-is-a-test-post-title-4/] + + + + + + + + + + + +Hello world + + + + + + + + + + + + + + + + + + + +http://127.0.0.1:2369/this-is-a-test-post-title-4/#/feedback/post-id/1/?uuid=member-uuid + + + +http://127.0.0.1:2369/this-is-a-test-post-title-4/#/feedback/post-id/0/?uuid=member-uuid + + + +http://127.0.0.1:2369/this-is-a-test-post-title-4/#ghost-comments + + + + + + + + + + + +More like this + + +[http://127.0.0.1:2369/this-is-a-test-post-title-4/#/feedback/post-id/1/?uuid=member-uuid] + + + + + +Less like this + + +[http://127.0.0.1:2369/this-is-a-test-post-title-4/#/feedback/post-id/0/?uuid=member-uuid] + + + + + +Comment + + +[http://127.0.0.1:2369/this-is-a-test-post-title-4/#ghost-comments] + + + + + + + + + + + + +Ghost © 2023 – Unsubscribe [http://127.0.0.1:2369/unsubscribe/?uuid=member-uuid&newsletter=requested-newsletter-uuid] + + + +https://ghost.org/ + + + + + + + + + + + +  + + + + +", +} +`; + +exports[`Batch sending tests Newsletter settings Shows 3 comment buttons for published posts without feedback enabled 1 1`] = ` +Object { + "html": " + + + + + + This is a test post title + + + + Hello world + + + + + + + + + + +
  +
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + +
+
+ This is a test post title +
+ + + + + +
+ By Joe Bloggs • 1 Jan 2023 + + • \\"Comment\\" + + + View in browser +
+
+ +

Hello world

+ + +
+
+ + + +
+ + \\"Comment\\" + +
+ + + +
+ + \\"Comment\\" +

Comment

+
+
+
+ + + + + + + + +
Ghost © 2023 – Unsubscribe
\\"Powered
+
+ +
+
 
+ + +", +} +`; + +exports[`Batch sending tests Newsletter settings Shows 3 comment buttons for published posts without feedback enabled 2 1`] = ` +Object { + "html": " +Hello world + + + + + + +  + + + + + + + + + + + + + + + + + + + + + + + + + +Ghost [http://127.0.0.1:2369/] + + +Daily newsletter [http://127.0.0.1:2369/] + + + + + + + + + + +This is a test post title [http://127.0.0.1:2369/this-is-a-test-post-title-3/] + + + + + + + + + +By Joe Bloggs • 1 Jan 2023 + +• +[http://127.0.0.1:2369/this-is-a-test-post-title-3/#ghost-comments] + + +View in browser [http://127.0.0.1:2369/this-is-a-test-post-title-3/] + + + + + + + + + + + +Hello world + + + + + + + + + + + + + + + + + + + +http://127.0.0.1:2369/this-is-a-test-post-title-3/#ghost-comments + + + + + + + + + + + +Comment + + +[http://127.0.0.1:2369/this-is-a-test-post-title-3/#ghost-comments] + + + + + + + + + + + + Ghost © 2023 – Unsubscribe [unsubscribe_url] diff --git a/ghost/core/test/integration/services/email-service/batch-sending.test.js b/ghost/core/test/integration/services/email-service/batch-sending.test.js index ac802a316a..330a28c662 100644 --- a/ghost/core/test/integration/services/email-service/batch-sending.test.js +++ b/ghost/core/test/integration/services/email-service/batch-sending.test.js @@ -943,7 +943,7 @@ describe('Batch sending tests', function () { await lastEmailMatchSnapshot(); }); - it('Shows 2 comment buttons for published posts without feedback enabled', async function () { + it('Shows 3 comment buttons for published posts without feedback enabled', async function () { mockSetting('comments_enabled', 'all'); mockSetting('email_track_clicks', false); // Disable link replacement for this test @@ -957,11 +957,11 @@ describe('Batch sending tests', function () { }); // Currently the link is not present in plaintext version (because no text) - assert.equal(html.match(/#ghost-comments/g).length, 2, 'Every email should have two buttons to comments'); + assert.equal(html.match(/#ghost-comments/g).length, 3, 'Every email should have 3 buttons to comments'); await lastEmailMatchSnapshot(); }); - it('Shows 2 comment buttons for published posts with feedback enabled', async function () { + it('Shows 3 comment buttons for published posts with feedback enabled', async function () { mockSetting('comments_enabled', 'all'); mockSetting('email_track_clicks', false); // Disable link replacement for this test @@ -975,7 +975,7 @@ describe('Batch sending tests', function () { }); // Currently the link is not present in plaintext version (because no text) - assert.equal(html.match(/#ghost-comments/g).length, 2, 'Every email should have two buttons to comments'); + assert.equal(html.match(/#ghost-comments/g).length, 3, 'Every email should have 3 buttons to comments'); await lastEmailMatchSnapshot(); // undo