Hustler-Stufe: Keller und Bot-Leads erst ab Stufe 6 (Seite, Keller-Etage, Spur-Links, Abruf von /botleads)
WorkersPage: ?tab=botleads (auch mit &bot=) und unbekannte Werte fallen unterhalb von Stufe 6 auf das Hochhaus zurück, BotLeadList wird nie eingehängt; die Weiterleitungen /leads und /workers bleiben. HochhausWelt: die Keller-Etage ist dann ein Knopf wie jede andere (zoomt heran) statt eines Links; Arne bleibt klickbar, die Zahl Bot-Leads in der Kopfzeile bleibt Text. HustlerDialog: Spur-Links in den Keller bleiben Text. workersApi.botleads ruft unterhalb von Stufe 6 nichts ab (kein JWT, keine Anfrage), sondern liefert 404 mit deutschem Satz. Bestehende Keller-Tests laufen ausdrücklich auf Stufe 6; neue Tests prüfen Stufe 1, 3 und 5 (gesperrt) und 6 bis 9 (offen). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5e48fbf264
commit
32f4f1d941
10 files changed
+262
-21
No files matched your search
@@ -385,6 +385,38 @@ test('Spur-Links: unsichere (javascript:, //host, /\\host, data:) bleiben Text;
|
||||
})
|
||||
})
|
||||
|
||||
// Stufen-Sperre (hustlerStufe.js): unterhalb der Keller-Stufe (6) führt auch kein Spur-Link in den Keller; der Eintrag bleibt als Text stehen
|
||||
test('Spur-Links in den Keller (?tab=botleads, auch über /workers und /leads) sind auf Stufe 3 Text und ab Stufe 6 Router-Links; alle anderen Links bleiben', async () => {
|
||||
const events = [
|
||||
{ id: '1', ts: '2026-10-22T09:00:00Z', text: 'Keller', link: '/hustler?tab=botleads&bot=abc123' },
|
||||
{ id: '2', ts: '2026-10-22T08:59:00Z', text: 'Alt', link: '/workers?tab=botleads&bot=abc123' },
|
||||
{ id: '3', ts: '2026-10-22T08:58:00Z', text: 'Leads', link: '/leads?tab=botleads' },
|
||||
{ id: '4', ts: '2026-10-22T08:57:00Z', text: 'Pult', link: '/hustler?tab=freigabe' },
|
||||
{ id: '5', ts: '2026-10-22T08:56:00Z', text: 'Ticket', link: '/tickets/100001' },
|
||||
{ id: '6', ts: '2026-10-22T08:55:00Z', text: 'Extern', link: 'https://example.org/hustler?tab=botleads' },
|
||||
]
|
||||
const ziele = (li) => nodes(li, (n) => n.tag === 'a' || n.tag === 'router-link')
|
||||
for (const stufe of [1, 3, 5]) {
|
||||
await lauf({ props: { workerId: 'lea', stufe }, trace: { trace: { events }, loading: false, error: null } }, (ui) => {
|
||||
const zeilen = ui.spurZeilen(); const byText = (t) => zeilen.find((z) => z.text === t)
|
||||
assert.equal(zeilen.length, 6)
|
||||
for (const t of ['Keller', 'Alt', 'Leads']) assert.equal(ziele(byText(t).li).length, 0, `Stufe ${stufe}: ${t} bleibt Text`)
|
||||
assert.deepEqual(ziele(byText('Pult').li).map((n) => n.props.to), ['/hustler?tab=freigabe'])
|
||||
assert.deepEqual(ziele(byText('Ticket').li).map((n) => n.props.to), ['/tickets/100001'])
|
||||
assert.deepEqual(ziele(byText('Extern').li).map((n) => n.props.href), ['https://example.org/hustler?tab=botleads'])
|
||||
assert.ok(!JSON.stringify(ui.find((x) => x.tag === 'a' || x.tag === 'router-link').map((n) => n.props)).includes('botleads&bot'))
|
||||
})
|
||||
}
|
||||
for (const stufe of [6, 9]) {
|
||||
await lauf({ props: { workerId: 'lea', stufe }, trace: { trace: { events }, loading: false, error: null } }, (ui) => {
|
||||
const zeilen = ui.spurZeilen(); const byText = (t) => zeilen.find((z) => z.text === t)
|
||||
assert.deepEqual(ziele(byText('Keller').li).map((n) => n.props.to), ['/hustler?tab=botleads&bot=abc123'])
|
||||
assert.deepEqual(ziele(byText('Alt').li).map((n) => n.props.to), ['/workers?tab=botleads&bot=abc123'])
|
||||
assert.deepEqual(ziele(byText('Leads').li).map((n) => n.props.to), ['/leads?tab=botleads'])
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
// ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Tasten, Blättern, Hintergrund
|
||||
|
||||
|
||||
Reference in new issue
Block a user