Skip to content

Commit

Permalink
test: update test publish new notification
Browse files Browse the repository at this point in the history
  • Loading branch information
braianj committed Dec 12, 2024
1 parent 5bdd192 commit c7dec66
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions processor/test/integration/publish-notification-handler.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ test('POST /notifications', function ({ components, stubComponents }) {
metadata: {
url: 'https://decentraland.org/builder/worlds?tab=dcl',
title: 'Worlds available',
description: 'Access to your Worlds has been restored.'
description: 'Access to your Worlds has been restored.',
world: 'el.dcl.eth',
permissions: ['streaming'],
userName: 'Unknown'
},
timestamp: Date.now(),
eventKey: '123'
Expand All @@ -57,11 +60,18 @@ test('POST /notifications', function ({ components, stubComponents }) {

const renderedEmail = {
to: email,
subject: 'Access to Your Worlds Has Been Restored',
content: '<p>Access to your Worlds has been restored.</p>\n',
actionButtonText: 'Manage Worlds',
actionButtonLink: 'https://decentraland.org/builder/worlds?tab=dcl'
subject: 'World Access Restored 🥳',
content:
'<p style="font-size: 16px; font-weight: 700; line-height: 24px; text-align: center; color: #43404A;">\nCongratulations! Access to your World(s) has been restored.\n</p>',
actionButtonText: 'MANAGE WORLDS',
actionButtonLink: 'https://decentraland.org/builder/worlds?tab=dcl',
title: 'Hey there',
titleHighligth: 'Unknown',
bannerUrl:
'http://cdn.mcauto-images-production.sendgrid.net/2322095804444b83/c81be6d3-83e7-409c-a04d-e17f297dca61/1200x480.png',
bannerLabel: 'World access Restored'
}

stubComponents.emailRenderer.renderEmail.withArgs(email, sinon.match(notification)).resolves(renderedEmail)
stubComponents.sendGridClient.sendEmail.withArgs(renderedEmail).resolves()

Expand Down

0 comments on commit c7dec66

Please sign in to comment.