Repository navigation
Dev-only tgui test harness - #524
Merged
Merged
Conversation
Builds compiled with -DUI_HARNESS let local tools click, type, press keys, scroll and read a client's tgui windows through world/Topic from 127.0.0.1. The page fires real DOM events so interfaces' own handlers run, and replies in chunks. Normal builds compile none of the server side, and the page side stays idle unless a harness build enables it.
…d overlapping text
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dev-only tgui test harness
Lets a local test build drive tgui windows in a real client: click, type, scroll, press keys and read back what the window shows. Clicks are real DOM events inside the page, so each interface's own handlers and
ui_actchecks run as they would for a player.How it works
-DUI_HARNESS. A normal build contains none of it; a harness build prints a#warn.voidcrew/modules/ui_harness/ui_harness.dmadds aui_harnesskeyword toworld/Topicthat answers only connections from 127.0.0.1. Commands:list,open,click,type,key,scroll,query. Each waits up to 15 s for the page's reply.tgui/packages/tgui/harness.tsacts only after the server enables it, finds elements by text, selector, placeholder or position, fires the events and returns a short summary of the page./datum/tgui_window, including skin-embedded ones.Safety
Upstream edits (marked
VOIDCREW EDIT)tgui/packages/tgui/index.tsx: one import and one setup call.code/_compile_options.dm: a commented//#define UI_HARNESSline.tgstation.dme: one include.Shown working
Preferences window driven through the harness on a local client: open the Quirks tab, scroll the list, type into the search box.