Repository navigation
test(snipper-vs): add mock-mode integration tests (VS SDK TestFramework) Adds Snipper.VisualStudio.IntegrationTests (net472) — four test classes using Microsoft.VisualStudio.Sdk.TestFramework.Xunit [VsFact] / MockedVS collection, which spins up a mocked VS service container so tests run on CI (windows-latest) without a real IDE install: - LspSnippetConverterVsTests — XmlDocument + XPath assertions on VS snippet XML - SnipperOptionsPageTests — property default / round-trip - SnipperBinaryLocatorTests — path resolution edge cases - TabstopInserterTests — full call-chain: PlainTextViewStub (no-op), ExpansionViewStub (records InsertSpecificExpansion), and CapturingXmlMemberIndexService (captures temp .snippet file content) Also adds vs-integration-tests CI job (windows-latest) and wires the new project into Snipper.VisualStudio.sln. https://claude.ai/code/session_01VRbhF1wSDh9FXKajAPUyqw - #11
Conversation
Adds Snipper.VisualStudio.IntegrationTests (net472) — four test classes using Microsoft.VisualStudio.Sdk.TestFramework.Xunit [VsFact] / MockedVS collection, which spins up a mocked VS service container so tests run on CI (windows-latest) without a real IDE install: - LspSnippetConverterVsTests — XmlDocument + XPath assertions on VS snippet XML - SnipperOptionsPageTests — property default / round-trip - SnipperBinaryLocatorTests — path resolution edge cases - TabstopInserterTests — full call-chain: PlainTextViewStub (no-op), ExpansionViewStub (records InsertSpecificExpansion), and CapturingXmlMemberIndexService (captures temp .snippet file content) Also adds vs-integration-tests CI job (windows-latest) and wires the new project into Snipper.VisualStudio.sln. https://claude.ai/code/session_01VRbhF1wSDh9FXKajAPUyqw
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a40c8662e5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| { | ||
| string? capturedPath = null; | ||
| var mockXmlService = new CapturingXmlMemberIndexService(path => capturedPath = path); | ||
| this.serviceProvider.AddService(typeof(SVsXMLMemberIndexService), mockXmlService, dispose: false); |
There was a problem hiding this comment.
Reset the mocked VS service before re-registering it
When both TabstopInserterTests run in the same MockedVS collection, they share the same GlobalServiceProvider fixture, so the SVsXMLMemberIndexService registered by the other test remains in the global service container. Registering the same service type again here makes the suite order-dependent and can fail before exercising TabstopInserter; reset/remove the service between tests or register one shared stub and update its captured state per test.
Useful? React with 👍 / 👎.
public-api: drop --locked from cargo install cargo-public-api so cargo can pick dep versions compatible with rustc 1.85 (locked deps pulled in cargo-util 0.2.21 / home 0.5.12 which require 1.86/1.88). vsix-package darwin-x64: add explicit `rustup target add` step before the build — dtolnay/rust-toolchain targets field does not always install the cross-compile target on Apple Silicon runners. https://claude.ai/code/session_01VRbhF1wSDh9FXKajAPUyqw
No description provided.