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

[Regression]: Playwright Test for VSCode can't find *.spec.ts files #30843

Closed
lgkula opened this issue May 16, 2024 · 8 comments
Closed

[Regression]: Playwright Test for VSCode can't find *.spec.ts files #30843

lgkula opened this issue May 16, 2024 · 8 comments

Comments

@lgkula
Copy link

lgkula commented May 16, 2024

Note from maintainers

There were some significant changes in the latest release of the VS Code Extension.
If you have problems with running tests, selecting projects and configuration,
running setup projects etc. after upgrading to the the recent version of the extension,
please read our FAQ.


Last Good Version

Playwright Test for VSCode v.1.0.22

First Bad Version

Playwright Test for VSCode v.1.1.1

Steps to reproduce

IDE: VS Code
in playwright.config.ts add additional 'setup' project:
projects: [ { name: "setup", testMatch: /.*setup.ts/, }, { name: 'chromium', use: { ...devices['Desktop Chrome'], storageState: 'playwright/.auth/user.json' }, dependencies: ["setup"], }, ]

Playwrights tests in folder .\tests
in files:
setup.ts
*.spec.ts

Expected behavior

On the left-hand side of each setup-test and each regular test, a play button should be displayed to start the test in question.
The Test Explorer tab should display the names of setup tests and regular tests

The plugin 'Playwright Test for VSCode v.1.0.22' correctly displayed all items for setup tests and regular tests

Actual behavior

After updating to 'Playwright Test for VSCode v.1.1.1'.
The play button is displayed next to the setup-test. The play button does not display for regular tests.

Only setup tests are displayed in the test explorer. No regular tests are displayed.

Additional context

Downgrade to 'Playwright Test for VSCode v.1.0.22' resolves the problem.
I can run all tests: setup tests and regular tests from the command line without using the Playwright Test for VSCode plug-in.

Environment

System:
    OS: Windows 10 10.0.19045
    CPU: (12) x64 12th Gen Intel(R) Core(TM) i7-1265U
    Memory: 17.77 GB / 31.69 GB
  Binaries:
    Node: 22.0.0 - C:\Programy\nodejs\node.EXE
    npm: 10.6.0 - C:\Programowanie\Repozytoria\masspayments\masspayments.automatic-tests\node_modules\.bin\npm.CMD
  IDEs:
    VSCode: 1.89.1 - C:\Programy\Microsoft VS Code\bin\code.CMD
  npmPackages:
    @playwright/test: ^1.6.1 => 1.6.1
@raushanraaja
Copy link

image
Are your projects selected?

@gvaatstra
Copy link

Selecting the projects was the solution for me, but I think many people will run into this issue as it (apparently) only selects the first or only the setup and not your other projects.
If this is the case, I'd say selecting all projects by default should be the solution

@yury-s
Copy link
Member

yury-s commented May 16, 2024

Folding into #30803

@yury-s yury-s closed this as completed May 16, 2024
@lgkula
Copy link
Author

lgkula commented May 16, 2024

image Are your projects selected?

You are right it is a feature not an bug. Even when I got the hint to select all projects I found it hard to find because I couldn't remember that the project was called Chrome.
I agree with yury-s that a much better solution would be to select all projects by default.

@yury-s yury-s reopened this May 16, 2024
@lucasxavierlucas
Copy link

I cant see the "projects" option, could some one help me to clarify it ?
image

@gvaatstra
Copy link

I only got that option in v1.1.1. of the plugin. When reverted to the previous version, I don't have it either

@lgkula
Copy link
Author

lgkula commented May 17, 2024

It is new feature in plugin v. 1.1.1
I read somewhere that in previous versions it was possible to set the project in the plugin configuration file.

@yury-s
Copy link
Member

yury-s commented May 17, 2024

Note from maintainers

There were some significant changes in the latest release of the VS Code Extension.
If you have problems with running tests, selecting projects and configuration,
running setup projects etc. after upgrading to the the recent version of the extension,
please read our FAQ.

If the FAQ does not resolve your issue, please file a new bug.

@yury-s yury-s closed this as completed May 17, 2024
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

5 participants