fix: check message location visibility for failureInVisibleDocument peek#308697
Open
yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
Open
fix: check message location visibility for failureInVisibleDocument peek#308697yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
Conversation
When `testing.automaticallyOpenPeekView` is set to `failureInVisibleDocument`, the peek view should only auto-open if the failure location is in a currently visible document. Previously, the check only verified that the test item's URI was in a visible editor, but not the message location URI. This meant that if a test defined in a visible file failed with an error in a different file (e.g. a utility module), VS Code would open that non-visible file just to show the peek view, which contradicts the intent of the setting. Now both the test item URI and the message location URI must be in visible editors for the peek to auto-open. Fixes microsoft#230881
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.
Summary
testing.automaticallyOpenPeekViewset tofailureInVisibleDocumentwould still open peek views in non-visible documentsFixes #230881
Test plan
"testing.automaticallyOpenPeekView": "failureInVisibleDocument"example.spec.ts) that calls a utility function in a separate file (util.ts) which throws an errorexample.spec.tsin the editor (ensureutil.tsis NOT open)util.tsis not visible)example.spec.tsandutil.tsside by side