Skip to content

Commit dceba95

Browse files
fix(home): mail readiness warning states the consequence (#3861)
With the admin layout banner removed on the UI side, the readiness 'mail' row is the single signal for an unconfigured mailer — its warning message now carries the consequence wording (users register without email verification) instead of relying on a separate banner. The ok-branch message and the category order are unchanged. refs pierreb-devkit/Vue#4297
1 parent 7d4f605 commit dceba95

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

modules/home/services/home.service.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ const getReadinessStatus = () => {
9999
checks.push({
100100
category: 'mail',
101101
status: mailConfigured ? 'ok' : 'warning',
102-
message: mailConfigured ? 'Mail provider configured' : 'No mail provider configured',
102+
message: mailConfigured ? 'Mail provider configured' : 'No mail provider configured — users register without email verification',
103103
});
104104

105105
// billing — Stripe

modules/home/tests/home.service.unit.tests.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,25 @@ describe('HomeService.getReadinessStatus unit tests:', () => {
5454
expect(categories).not.toContain('monitoring');
5555
});
5656

57+
describe('mail row', () => {
58+
test('warning message states the consequence when no mail provider is configured', async () => {
59+
const HomeService = await withConfig({});
60+
const checks = HomeService.getReadinessStatus();
61+
const row = checks.find((c) => c.category === 'mail');
62+
expect(row.status).toBe('warning');
63+
expect(row.message).toBe('No mail provider configured — users register without email verification');
64+
});
65+
66+
test('ok message is unchanged when a mail provider is configured', async () => {
67+
mockMailerIsConfigured.mockReturnValue(true);
68+
const HomeService = await withConfig({});
69+
const checks = HomeService.getReadinessStatus();
70+
const row = checks.find((c) => c.category === 'mail');
71+
expect(row.status).toBe('ok');
72+
expect(row.message).toBe('Mail provider configured');
73+
});
74+
});
75+
5776
describe('errorTracking row', () => {
5877
test('ok when analytics.posthog.key is set AND errorTracking=true', async () => {
5978
const HomeService = await withConfig({

0 commit comments

Comments
 (0)