mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-05 02:14:05 +00:00
fix(email): link notification preferences to settings tab
- Make the “Manage preferences” text in notification emails clickable. - Link directly to `/settings?tab=notifications`. - Preserve the localized link text and existing email styling. - Add a regression test for the generated preferences URL.
This commit is contained in:
@@ -221,6 +221,13 @@ describe('buildEmailHtml', () => {
|
||||
expect(html).toContain('notifications enabled in TREK');
|
||||
});
|
||||
|
||||
it('links notification preferences to the notifications settings tab', () => {
|
||||
const html = buildEmailHtml('Subject', 'Body', 'en');
|
||||
expect(html).toMatch(
|
||||
/<a href="https?:\/\/[^"]+\/settings\?tab=notifications"[^>]*>Manage preferences in Settings<\/a>/,
|
||||
);
|
||||
});
|
||||
|
||||
it('uses German i18n strings for lang=de', () => {
|
||||
const html = buildEmailHtml('Subject', 'Body', 'de');
|
||||
expect(html).toContain('TREK aktiviert');
|
||||
|
||||
Reference in New Issue
Block a user