Add sessionHolding template, unique 8-digit codes, reason slot for sessionCancelled, and disable unused notifications

This commit is contained in:
2026-08-21 10:44:51 +03:30
parent 5328f36f06
commit 091e519280
28 changed files with 2180 additions and 280 deletions
+16
View File
@@ -76,4 +76,20 @@ describe('SMS template variables', () => {
assert.ok(slots.includes('username'));
assert.ok(slots.includes('password'));
});
it('exposes reason slot on the sessionCancelled template', () => {
const def = SMS_TEMPLATE_DEFS.find((item) => item.key === 'sessionCancelled');
const slots = (def?.slots || []).map((slot) => slot.key);
assert.ok(slots.includes('reason'));
});
it('defines the sessionHolding template with all expected slots', () => {
const def = SMS_TEMPLATE_DEFS.find((item) => item.key === 'sessionHolding');
assert.ok(def, 'sessionHolding template definition missing');
const slots = (def.slots || []).map((slot) => slot.key);
const expected = ['fullName', 'topic', 'className', 'sessionDate', 'classTime'];
for (const slot of expected) {
assert.ok(slots.includes(slot), `sessionHolding is missing slot ${slot}`);
}
});
});