diff --git a/ghost/core/package.json b/ghost/core/package.json index 141ae61fd9..258e6b67bd 100644 --- a/ghost/core/package.json +++ b/ghost/core/package.json @@ -197,7 +197,7 @@ "jsdom": "22.1.0", "jsonpath": "1.1.1", "jsonwebtoken": "8.5.1", - "juice": "8.1.0", + "juice": "9.1.0", "keypair": "1.0.4", "knex": "2.4.2", "knex-migrator": "5.1.5", 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 d804d48453..109827bb9b 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 @@ -4080,7 +4080,7 @@ table.body figcaption a { - +
@@ -4790,7 +4790,7 @@ table.body figcaption a {
- +
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 aa4753b89b..6f69db08d2 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 @@ -783,17 +783,19 @@ describe('Batch sending tests', function () { assert(defaultNewsletter.get('show_comment_cta'), 'show_comment_cta should be true for this test'); await models.Newsletter.edit({feedback_enabled: true}, {id: defaultNewsletter.id}); - const {html} = await sendEmail(agent, { - title: 'This is a test post title', - mobiledoc: mobileDocExample - }); + try { + const {html} = await sendEmail(agent, { + title: 'This is a test post title', + mobiledoc: mobileDocExample + }); - // Currently the link is not present in plaintext version (because no text) - assert.equal(html.match(/#ghost-comments/g).length, 3, 'Every email should have 3 buttons to comments'); - await matchEmailSnapshot(); - - // undo - await models.Newsletter.edit({feedback_enabled: false}, {id: defaultNewsletter.id}); + // Currently the link is not present in plaintext version (because no text) + assert.equal(html.match(/#ghost-comments/g).length, 3, 'Every email should have 3 buttons to comments'); + await matchEmailSnapshot(); + } finally { + // undo + await models.Newsletter.edit({feedback_enabled: false}, {id: defaultNewsletter.id}); + } }); it('Hides comments button for email only posts', async function () { diff --git a/ghost/email-service/package.json b/ghost/email-service/package.json index 7527b25da1..2605f65d6c 100644 --- a/ghost/email-service/package.json +++ b/ghost/email-service/package.json @@ -36,7 +36,7 @@ "bson-objectid": "2.0.4", "cheerio": "0.22.0", "handlebars": "4.7.7", - "juice": "8.1.0", + "juice": "9.1.0", "moment-timezone": "0.5.23" } } diff --git a/yarn.lock b/yarn.lock index e3901929b6..2e759f03dc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -22101,7 +22101,18 @@ jsprim@^1.2.2: array-includes "^3.1.5" object.assign "^4.1.3" -juice@8.1.0, juice@^8.0.0: +juice@9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/juice/-/juice-9.1.0.tgz#3ef8a12392d44c1cd996022aa977581049a65050" + integrity sha512-odblShmPrUoHUwRuC8EmLji5bPP2MLO1GL+gt4XU3tT2ECmbSrrMjtMQaqg3wgMFP2zvUzdPZGfxc5Trk3Z+fQ== + dependencies: + cheerio "^1.0.0-rc.12" + commander "^6.1.0" + mensch "^0.3.4" + slick "^1.12.2" + web-resource-inliner "^6.0.1" + +juice@^8.0.0: version "8.1.0" resolved "https://registry.yarnpkg.com/juice/-/juice-8.1.0.tgz#4ea23362522fe06418229943237ee3751a4fca70" integrity sha512-FLzurJrx5Iv1e7CfBSZH68dC04EEvXvvVvPYB7Vx1WAuhCp1ZPIMtqxc+WTWxVkpTIC2Ach/GAv0rQbtGf6YMA==