mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-01 01:17:13 +00:00
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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user