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

[Bug]: Playwright Test for VSCode extension v.1.1.1 - Run button does not appear next to tests #30819

Closed
mjeruzal427 opened this issue May 15, 2024 · 11 comments

Comments

@mjeruzal427
Copy link

mjeruzal427 commented May 15, 2024

Version

1.44.0

Steps to reproduce

  1. Install / update to the latest Playwright Test for VSCode extension (version 1.1.1)
  2. Open any spec.ts file

Expected behavior

The Run Test button should appear next to the lines with tests like this:
image

Actual behavior

The button is not there anymore.

Additional context

  • Installing the previous version of the extension (1.0.22) fixes this issue.
  • I am using the latest version of Visual Studio Code (1.89.1)

Environment

System:
    OS: Windows 11 10.0.22631
    CPU: (8) x64 Intel(R) Core(TM) i5-8365U CPU @ 1.60GHz
    Memory: 16.11 GB / 31.82 GB
  Binaries:
    Node: 18.16.1 - C:\Program Files\nodejs\node.EXE
    npm: 9.7.2 - C:\Program Files\nodejs\npm.CMD
  IDEs:
    VSCode: 1.89.1 - C:\Users\mje\AppData\Local\Programs\Microsoft VS Code\bin\code.CMD
  Languages:
    Bash: 5.2.15 - C:\Program Files\Git\usr\bin\bash.EXE
  npmPackages:
    @playwright/test: ^1.44.0 => 1.44.0
@mxschmitt
Copy link
Member

Does this also happen with a newly created project?

Ideally we have something which we can run locally in order to reproduce this bug, thanks for your understanding!

@mjeruzal427
Copy link
Author

@mxschmitt Yes, it does. I've initialized a brand new playwright project by using the command:

npm init playwright@latest

The project was not modified by me at any step.

With the latest (1.1.1) extension available "Run Test" buttons do not appear for example.spec.ts:
image

After rolling back to previous version of extension (1.0.22) the buttons are available:
image

@dsayerm
Copy link

dsayerm commented May 15, 2024

We noticed the same thing when we upgraded. On further investigation we found that we need to set the Projects we wish to have included in the test runner:
image

This configuration was stored then on /.vscode/settings.json.

@Tallyb
Copy link

Tallyb commented May 15, 2024

hey @mxschmitt 👋
Experiencing something similar. I suspect it happens when you have mutliple projects on your config pointing to different folders (e.g.

{
   name: 'foo'
  testDir: '.projects/foo
},
{
   name: 'bar'
  testDir: '.projects/bar
},

only foo will be picked up. you will also that in the tests explorer - only first project.

(PS only tested extension v1.1.0 but PW is on 1.43.1. It will take couple more days before we will upgrade)

@jtgober
Copy link

jtgober commented May 15, 2024

I had a similar issue and found this post (also have multiple projects) For me it was also skipping my global setup for whatever reason. However using what @dsayerm posted with the projects toggles seems to have fixed it for me at the moment. Is that a new feature? I don't recall seeing that one before

Update: ^^^ That is new functionality +++ see this other issue -> #30808

@yury-s
Copy link
Member

yury-s commented May 15, 2024

With the latest (1.1.1) extension available "Run Test" buttons do not appear for example.spec.ts:

@mjeruzal427 can you share screenshot of the Playwright Test extension sidebar in that case?

@mjeruzal427
Copy link
Author

@yury-s list of tests is stuck on "Loading..." forever. Also, I don't have any options available under "Projects" section as @dsayerm and @jtgober suggested.
image

@vladkrasn
Copy link

Yeah this seems to be tied to the new Projects tab in the extenstion. Would be nice if Play button appeared even if the project is disabled

@yury-s
Copy link
Member

yury-s commented May 17, 2024

@mjeruzal427 Could you please share console output from Developer Tools console, you can open it from command menu

image

And also Extension Host logs. From the command menu (Command+Shift+P on Mac): Developer: Show Logs... > Extension Host, and then copy the logs:

image

@pavelfeldman
Copy link
Member

@mjeruzal427: what happens when you run it from the command line?

@mjeruzal427
Copy link
Author

@yury-s, @pavelfeldman The problem has been resolved after I installed the latest version (1.1.5) of the extension. This issue can be closed now. Thank you.

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

No branches or pull requests

8 participants