@things-factory/notification 10.1.247 → 10.1.248

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/notification",
3
- "version": "10.1.247",
3
+ "version": "10.1.248",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "things-factory": true,
@@ -42,5 +42,5 @@
42
42
  "google": "^2.1.0",
43
43
  "marked": "^15.0.0"
44
44
  },
45
- "gitHead": "3c672029b2ef4a09f3370d37e5d225392856a602"
45
+ "gitHead": "ca390a4b791d6e8630388167d3da6031034b5a5e"
46
46
  }
@@ -365,6 +365,19 @@ describe('whose mail it is', () => {
365
365
  expect(plain).toContain(`background-color:${DEFAULT_BRAND.color}`)
366
366
  })
367
367
 
368
+ test('the colours hold where a mail program drops styles: each sits on its table cell as bgcolor, the mail says it is light, the tagline has its own cell', () => {
369
+ const brand = { name: 'operato office', tagline: 'Reimagining Business.', color: '#059669' }
370
+ const html = noticeEmailForm({ lang: 'ko', words, link: 'https://x.example/a', brand })
371
+
372
+ expect(html).toContain('<meta name="color-scheme" content="light" />')
373
+ expect(html.match(/<td bgcolor="#059669"/g)).toHaveLength(2)
374
+ expect(html).toContain('<td bgcolor="#3d5874"')
375
+ expect(html).toContain('<td bgcolor="#ffffff"')
376
+ expect(html).toMatch(/operato office<\/td>\s*<td[^>]*>&nbsp;Reimagining Business\.<\/td>/)
377
+ expect(html).not.toMatch(/margin-left/)
378
+ expect(html).not.toMatch(/<div style="background-color/)
379
+ })
380
+
368
381
  test('the real channels carry the brand to the mail', async () => {
369
382
  const { channels, calls } = fakeChannels({ [NOTICE_EMAIL]: 'on' }, { brand: { name: 'Brand X', tagline: 'Tag Y', color: '#1d4ed8' } })
370
383
  await deliverNotice(notice(), channels)