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
[BUG] Playwright test for vscode 1.0.0 doesn't find tests with Vscode 1.73.1 #18954
Comments
I am facing a similar issue. It happens for all my Playwright projects now, old and new ones. Switched to latest Node.js LTS from the current 19.1.0 and created the project again but no luck. |
We are unable to reproduce this issue, with |
I have many VSCode extensions and I am using npm package manager. The thing is, that I have exactly same setup like earlier, only VSCode app and Playwrite test for vscode extension versions have been changed when problem occurred. My colleague has same setup with VSCode version 1.69 and Playwrite test for vscode 1.0.0 setup combination and it works. I haven't tried to downgrade my VSCode yet. |
@qasamppa I am not sure we'll be able to help you without any more information from your side. I'd suggest trying to disable other extensions, or playing with VSCode version. |
@dgozman I installed vscode version 1.70.2 and Playwright test for vscode 1.0.0 -extension started to work immediately. So definitely something to do with latest release(s) of vscode. |
Could you tell us what other extensions you have installed? We can't reproduce this problem on clean VSCode + Playwright extension installed. |
Bash Beautify v0.1.1, Cypress Helper 1.2.2, Cypress Snippets v0.0.5, Docker v1.22.2, ESLint v2.2.6, Git Blame 9.0.1, Git Graph v1.30.0, Git History v0.6.19, Jupyter Keymap v1.0.0 and Markdown Preview Mermaid Support v1.15.2, markdown lint v0.48.1, Playwright Test for VSCode 1.0.1, Playwright Test Runner v1.4.0, Playwright Test Snippets v1.2.1, Prettier - Code Formatter v9.9.0, Pylance v2022.11.30, Robot Framework Language Server v1.5.0, Shell Check v0.28.2, Stylelint v1.2.3, YAML v1.10.1, sort v2022.8.0, Jupyter v2022.9.1303220346, Jupyter Cell Tags v0.1.6, Jupyter Notebook Renderers v1.0.12, Jupyter Slide Show v0.1.5, Python v2022.18.2 Long list, yes :) |
I tried disabling/uninstalling all extensions, removing .vscode directory and starting the IDE afresh with only Playwright extension, but none of it worked. Finally, when I installed system wide node and npm, then it got fixed. So, in my case, it somehow stopped working with node/npm installed via nvm-node version manager. None of extension had any conflict. |
@arpan-patelia thanks for these details! Could you help me via answering those questions?
It seems like Playwright VSCode Extension could not find |
@pavelfeldman just to be more specific, installing system wide Below are the answers for your questions.
|
#19181 can be linked here too. As mentioned there, I too used Hope this helps anyone facing this issue. |
<tl;dr> Forgive my naiveté, but does Typescript presume ES modules, and does javascript presume CommonJS? I don't use Typescript, but I do use ES modules so I tripped over this option in playwright initialization. Same issue, fixed in as follows. However the fix (removing "type: module" from package.json) breaks my app. See below for the actual fix. These steps were not necesssary, but just wanted to confirm the problem and the fix:
Here was the fix:
So, finally, I re-initialized playwright specifying Typescript as the language, and everything worked as advertised. |
I was encountering the same issue.
I installed the I have The extension did discover the example test cases after I installed It has been some time since I first installed VSCode, but I recall an issue with how the integrated terminal invoked the shell. Here is the aforementioned nvm magic that I moved from export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion |
Thanks for the thorough investigation @smfelsher. Extension does not really use any of the shells, but it does look for your Node installation using the |
That's exactly what I tried to describe in my previous post.
Why? I originally installed node using nvm. This only installs
At this point, VSCode will not see So, people that use |
VS Code is detecting your dev environment via running shell command and is patching its own environment at runtime. It does it lazily though, after IDE was opened. We used to have retries for locating node that we've lost, i brought them back to see if that helps. |
I had similar issue, the plugin is unable to resolve node (I am using nvm to manage multiple node) but the terminal (zsh) does. I tried to reset/change terminal settings but I think this config helped fix the issue for me
|
I'd just like to report in that I ran in to this issue because I was trying to load in an environment variable in to Checking VS Code
Which led me down the rabbit hole discovering that the undefined value made my Anyways...make sure your values are valid in the config! Hope this helps someone going forward :) |
@uncvrd Thanks, this was exactly the problem. I had both |
If you're using |
I still have that issue using WSL 2 on windows with zsh. I have node installed through nvm. I have tried moving the "nvm" magic into the
Anyone has another idea? VSCode version |
Installing node/npm systmem wide using NodeSource, rather than nvm, fixed this for me. |
Context:
Code Snippet
Help us help you! Put down a short code snippet that illustrates your bug and
that we can run and debug locally. For example:
Describe the bug
Playwright test for vscode 1.0.0 doesn't show tests in repository.
The text was updated successfully, but these errors were encountered: