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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃摙 Playwright VS Code Extension Project Management #30882

Open
pavelfeldman opened this issue May 17, 2024 · 0 comments
Open

馃摙 Playwright VS Code Extension Project Management #30882

pavelfeldman opened this issue May 17, 2024 · 0 comments

Comments

@pavelfeldman
Copy link
Member

pavelfeldman commented May 17, 2024

FAQ VS Code Extension

Q: There is no play button next to the test name in my test file, what happened?

In order for the green button to appear next to the test name in your file you need to have the project for that test selected in the project section of the Playwright sidebar. You will then see the tests in the test explorer and be able to run them by clicking the play button from the explorer or the green play button directly in the file.

Projects section in VS Code extension

Q: Setup project only runs if it is checked, why?

This is a change in behavior, now consistent with the UI Mode. It allows bypassing setup project if needed and is useful when re-running the same test over and over, while the setup is already performed.

Q: My config file is missing in the drop-down of configs, how do I fix it?

If your project contains more than one playwright configuration file, you can switch between them by first clicking on the gear icon in the top right corner of the Playwright sidebar. This will show you all the configuration files in your project. Select the configuration files you want to use by checking the checkbox next to each one and clicking on the 'ok' button.

Selecting a configuration file

Q: Global setup no longer runs each time I run a test. Why?

  • The first time your tests run we run global setup. Global setup now runs only once.

running global setup

  • You can tear down your test manually by clicking Run global teardown from the Setup section in the Playwright sidebar.
  • To manually rerun global setup click the Run global setup option from the Setup section in the Playwright sidebar.
  • When debugging tests, global setup will re-run automatically before your tests to ensure isolated environment and better repeatability of the issues.

Q: My working directory is now workspace folder. Why?

  • cwd used to point to the config folder, now we start tests from the workspace folder.
  • Usually, your terminal is in workspace folder, so we are making it consistent with your CLI and CI experience.
  • If this change affected you, you are using local file names in your tests. Make sure to resolve them, use path.join(__dirname, '../name') or similar before you pass those names into the fs module methods.
@pavelfeldman pavelfeldman changed the title 鈩癸笍 Playwright VS Code Extension Project Management 馃摙 Playwright VS Code Extension Project Management May 17, 2024
@microsoft microsoft locked as too heated and limited conversation to collaborators May 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant