Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CodeLens "Debug" appears on wrong document #178

Closed
seanpoulter opened this issue Dec 2, 2017 · 6 comments · Fixed by #198
Closed

CodeLens "Debug" appears on wrong document #178

seanpoulter opened this issue Dec 2, 2017 · 6 comments · Fixed by #198
Assignees
Labels

Comments

@seanpoulter
Copy link
Member

Environment

  1. node -v: v8.9.1
  2. npm -v: 5.5.1
  3. npm ls react-scripts (if you haven’t ejected): N/A
  4. Operating system: Windows 7 x64
  5. VS Code: 1.18.1
  6. Jest extension: 4.5.0

Steps to Reproduce

  1. Clone the repo:
    git clone https://github.com/seanpoulter/vscode-jest-178
    
  2. Open the repo in Visual Studio Code
  3. Open index.js and index.test.js
  4. Wait for the CodeLens "Debug" to appear in index.test.js
  5. Switch to another window

Expected Behavior

The "Debug" should only appear on the appropriate document.

Actual Behavior

"Debug" appears on the wrong document. Here's a GIF of it appearing correctly on index.test.js then incorrectly on index.js.

2017-12-01 -- vscode-jest 178 - debug appears in wrong window

@bogdan-calapod
Copy link

I would say this is related to #175 ? The feature requested is caused by exactly this bug - the debug button shows up in the inappropiate document and flips around scrolling in VSCode

@bogdan-calapod
Copy link

After some investigation I noticed that the "Debug" thing shows up correctly if you toggle side-by-side view of the .js file and the .test.js file

@seanpoulter
Copy link
Member Author

Yep, @bogdan-calapod - the behavior is described in #175. Since #175 is about adding a setting to disable the "Debug" CodeLens I thought it'd be easier to track this as a separate issue.

@goncharov
Copy link
Contributor

goncharov commented Dec 8, 2017

Hello. I also made few investigations. The current implementation of codelens uses the common list of decorations which updates implicitly by change active text editor only if a new document is jest test. If the document in new editor is not Jest test it will not reset previous decorations and will display old ones. This is why lenses display in wrong files. It also reproduces for side-by-side view

@seanpoulter
Copy link
Member Author

We need to confirm if this was fixed by #186 and ideally test it.

@orta
Copy link
Member

orta commented Dec 11, 2017

#186 really only adds the ability to remove all of them - @goncharov's answer would probably fix it 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants