Add account conversation tracing to admin UI
Build and publish frontend / publish (push) Successful in 55s
Build and publish frontend / publish (push) Successful in 55s
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
const test = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
const fs = require('node:fs');
|
||||
|
||||
const page = fs.readFileSync(new URL('../index.html', `file://${__filename}`), 'utf8');
|
||||
|
||||
test('admin can select a searched account before opening its conversations', () => {
|
||||
assert.match(page, /Välj konto att följa/);
|
||||
assert.match(page, /chooserSelect\.value\);/);
|
||||
assert.match(page, /\/api\/admin\/players\?q=/);
|
||||
});
|
||||
|
||||
test('conversation transcript exposes player and narrator messages as expandable replies', () => {
|
||||
assert.match(page, /function renderAdminConversations/);
|
||||
assert.match(page, /payload\.player_message/);
|
||||
assert.match(page, /payload\.reply \|\| payload\.npc_reply/);
|
||||
assert.match(page, /aria-expanded/);
|
||||
assert.match(page, /renderDecisionProvenance\(group, event, detail\)/);
|
||||
});
|
||||
|
||||
test('selected replies reveal AI, Luau and Rust provenance without injecting HTML', () => {
|
||||
assert.match(page, /function renderDecisionProvenance/);
|
||||
assert.match(page, /interaction\.prompt_yaml/);
|
||||
assert.match(page, /interaction\.external_call/);
|
||||
assert.match(page, /details\.luau_trace/);
|
||||
assert.match(page, /details\.rust_validation/);
|
||||
assert.match(page, /element\.textContent = text/);
|
||||
});
|
||||
|
||||
test('account trace can be paged until all stored turns are loaded', () => {
|
||||
assert.match(page, /Visa äldre samtalsturer/);
|
||||
assert.match(page, /\?limit=\$\{trace\.limit \|\| 200\}&offset=\$\{adminTraceOffset\}/);
|
||||
});
|
||||
Reference in New Issue
Block a user