Show player-facing processing feedback
Build and publish frontend / publish (push) Successful in 47s
Build and publish frontend / publish (push) Successful in 47s
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
const assert = require('node:assert/strict');
|
||||
const fs = require('node:fs');
|
||||
const path = require('node:path');
|
||||
const test = require('node:test');
|
||||
|
||||
const source = fs.readFileSync(path.join(__dirname, '..', 'index.html'), 'utf8');
|
||||
|
||||
test('player sees an accessible live activity line during world and character proposals', () => {
|
||||
assert.match(source, /function setActivityStatus\(message\)/);
|
||||
assert.match(source, /setAttribute\('aria-live', 'polite'\)/);
|
||||
assert.match(source, /AI ta fram ett förslag på startvärld och en plats/);
|
||||
assert.match(source, /AI skapa eller uppdatera ett biografiförslag/);
|
||||
});
|
||||
|
||||
test('dialogue processing explains that scene, place, or person establishment is being considered', () => {
|
||||
assert.match(source, /Berättaren arbetar med din avsikt\. Den avgör om en plats, scen eller person behöver etableras/);
|
||||
});
|
||||
|
||||
test('local AI activity is shown separately from general narrator processing', () => {
|
||||
assert.match(source, /detail\.type === 'activity' \? 'data-local-ai-activity'/);
|
||||
assert.match(source, /Lokal AI: \$\{detail\.text \|\| ''\}/);
|
||||
assert.match(source, /clearActivityStatus\(\);/);
|
||||
});
|
||||
@@ -6,7 +6,7 @@ const test = require('node:test');
|
||||
const page = fs.readFileSync(path.join(__dirname, '..', 'index.html'), 'utf8');
|
||||
|
||||
test('local AI adapter comes from the static service and starts after authenticated game entry', () => {
|
||||
assert.match(page, /<script src="\/static\/wllama-gemma3-v1\/local-ai\.js"><\/script>/);
|
||||
assert.match(page, /<script src="\/static\/wllama-gemma3-v2\/local-ai\.js"><\/script>/);
|
||||
assert.match(page, /showPlay\(\);\s*if \(!currentAccount\.is_admin\) window\.localGameAI\?\.start\(currentAccount\.id\)/);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user