test(dashboard): fail when game text is written into the pages

GameTextJs scans templates, scripts and the routes' strings for the
game's zone, item and character names and currency labels, with an
allowlist for legitimate uses and a self check of the scanner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-29 22:06:37 -05:00
parent 597269b4c5
commit 6230d35518
3 changed files with 147 additions and 0 deletions

View File

@@ -105,6 +105,9 @@ if(NODE_EXECUTABLE)
# Which links the dashboard follows without a reload, and its in-place update rules (static/js/nav.js)
add_test(NAME NavRulesJs COMMAND ${NODE_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/nav.test.mjs"
"${PROJECT_SOURCE_DIR}/dDashboardServer/static/js/nav.js")
# No game text (zone, item names, the game's currencies) written into the pages: it comes from the client's locale
add_test(NAME GameTextJs COMMAND ${NODE_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/game-text.test.mjs"
"${PROJECT_SOURCE_DIR}/dDashboardServer" "${CMAKE_CURRENT_SOURCE_DIR}/game-text-allowlist.json")
# The Network page's diagram model: nodes and links from the traffic summary (static/js/network-graph.js)
add_test(NAME NetworkGraphJs COMMAND ${NODE_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/network-graph.test.mjs"
"${PROJECT_SOURCE_DIR}/dDashboardServer/static/js/network-graph.js")