Team-Mails: Links ins Ticketsystem statt Admin-Bereich
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7c00633db0
commit
95e2807dc7
20 files changed
+132
-28
No files matched your search
@@ -498,3 +498,28 @@ test('T07: Hinweis auf nicht genutzte Arbeitszeit nur im Block wartung', () => {
|
||||
assert.match(h.text, /Gebuchter Zusatzspeicher endet mit dem Abo\./)
|
||||
assert.doesNotMatch(h.text, /Arbeitszeit|Stundenkontingent|Restguthaben/)
|
||||
})
|
||||
|
||||
// Etappe 4: das Admin-Panel ist abgeschaltet, Team-Mails fuehren ins Ticketsystem
|
||||
const TEAM_FOOTER = ['T01', 'T02', 'T03', 'T04', 'T05', 'T06', 'T07', 'T08', 'T09', 'T10', 'T11', 'T12', 'T13', 'T14', 'T16']
|
||||
|
||||
test('keine Vorlage verlinkt admin.html oder nennt den Admin-Bereich', () => {
|
||||
for (const id of EXPECTED) {
|
||||
const source = readFileSync(new URL(loadTemplate(id).file, DIR), 'utf8')
|
||||
assert.ok(!source.includes('admin.html'), `${id}: admin.html`)
|
||||
assert.ok(!source.includes('Admin-Bereich'), `${id}: Admin-Bereich`)
|
||||
}
|
||||
})
|
||||
|
||||
test('Fusszeile der Team-Mails: Ticketsystem', () => {
|
||||
for (const id of TEAM_FOOTER) {
|
||||
const tpl = loadTemplate(id)
|
||||
const mail = renderMail(id, sampleValues(tpl), allBlocks(tpl, true))
|
||||
assert.match(mail.html, /Automatische Benachrichtigung aus dem WEBklar Kundenportal · <a class="mut" href="https:\/\/ticket\.webklar\.com\/customers"[^>]*>Ticketsystem<\/a>/, id)
|
||||
}
|
||||
})
|
||||
|
||||
test('T01: Knopf antwortet im Ticketsystem beim Kunden (team_link)', () => {
|
||||
const mail = renderMail('T01', { kunde_name: 'Berta', nachricht: 'Hallo', team_link: 'https://ticket.webklar.com/customers/chat?kunde=c1' })
|
||||
assert.deepEqual(mail.problems, [])
|
||||
assert.match(mail.html, /<a href="https:\/\/ticket\.webklar\.com\/customers\/chat\?kunde=c1"[^>]*>Im Ticketsystem antworten →<\/a>/)
|
||||
})
|
||||
Reference in new issue
Block a user