Skip to content

Test run config, tree, graph contract and webview; fix graph node clicks - #39

Merged
ChrisonSimtian merged 4 commits into
developfrom
test-run-config-and-tree
Nov 16, 2026
Merged

ChrisonSimtian merged 4 commits into
developfrom
test-run-config-and-tree

Conversation

@ChrisonSimtian

@ChrisonSimtian ChrisonSimtian commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

More test coverage on top of #38. Closes #37.

Bug fix: clicking a node in the graph posted run for target flowchart. Mermaid 11 prefixes node ids with the render id, so id.split('-')[1] picked the wrong segment. The page now matches the target name explicitly. Found by the new webview test.

  • Unit: RunConfigStore (parameters, secrets kept out of workspace state, args, env), tree sort and relations. Moved out of runConfig.ts / extension.ts into runConfigStore.ts / graph.ts, no behaviour change.
  • Extension-host: goToTarget picks the right file when two types declare the same target (declaredIn).
  • Webview (npm run test:webview): src/graphPage.ts holds the page HTML; playwright-core loads it in installed Chrome or Edge with acquireVsCodeApi stubbed. Covers ready, rendering, solid/dashed/thick edges, default-target styling, click → run, re-render.
  • Contract (npm run test:contract, needs .NET): runs dotnet fallout --plan so Fallout emits a real build-graph.json, then checks the extension's assumptions. Found that description is emitted as null; the type now allows it.
  • Docs updated. CI wiring follows in a separate commit on this PR.

Verified: unit 28, webview 6, extension-host 5, contract 9, all passing locally.

ChrisonSimtian and others added 3 commits November 17, 2026 09:40
…biguation

Move the run-config store and the tree's sort and relation logic out of
vscode-dependent files so they run under plain Node. Add a second fixture
declaring the same target on an interface to exercise goToTarget's tie-break.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G6hKb9Lpz4vBWMgPJS7N6D
The hand-written fixtures can drift from what Fallout writes. The contract
test regenerates build-graph.json with this repo's own build and checks the
extension's assumptions against it. It already caught that `description` is
emitted as null, which the type did not allow.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G6hKb9Lpz4vBWMgPJS7N6D
…wrong target

Move the graph page HTML into a vscode-free module and load it in Chrome or
Edge via Playwright with acquireVsCodeApi stubbed.

The test found that clicking a node posted target "flowchart": Mermaid 11
prefixes node ids with the render id, so splitting on the first dash picked
the wrong segment. The page now matches the target name explicitly.

Closes #37

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G6hKb9Lpz4vBWMgPJS7N6D
@ChrisonSimtian
ChrisonSimtian requested a review from a team as a code owner November 16, 2026 20:54
@ChrisonSimtian ChrisonSimtian added the enhancement New feature or request label Nov 16, 2026
Add ITestVsix to Fallout.Vsce: it runs the extension's npm test scripts, and
wraps the ones that launch VS Code in xvfb-run on a Linux box without a
display. The gate now invokes TestVsix before PackVsix, and caches the
downloaded VS Code.

A test runner script lists test files explicitly, since `node --test <dir>`
differs between Node versions and the generated workflow installs none.

Also make the goToTarget test wait for the selection, not just the editor:
the command is fire-and-forget, and the first run through the build caught
the race.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G6hKb9Lpz4vBWMgPJS7N6D
@ChrisonSimtian
ChrisonSimtian merged commit 304f880 into develop Nov 16, 2026
2 checks passed
@ChrisonSimtian
ChrisonSimtian deleted the test-run-config-and-tree branch November 16, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test the graph webview in a browser with Playwright

1 participant