Referring to this tweet, when I said that you have to run a Playwright test through the CLI, Denb, on the ItaliaJS Discord channel, shared this VSCode cuustom task with me that allows launching specifically the test the cursor is pointing.
Created
June 23, 2022 08:03
-
-
Save NoriSte/393751393a8e163df2b68232c7efe29f to your computer and use it in GitHub Desktop.
Launch the cursor-highlighted Playwright in VSCode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// See https://go.microsoft.com/fwlink/?LinkId=733558 | |
// for the documentation about the tasks.json format | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "testCurrentFileByLine", | |
"type": "shell", | |
"command": "npx playwright test --headed --workers=1 ${file}:${lineNumber}", | |
"group": "test", | |
"presentation": { | |
"reveal": "always", | |
"showReuseMessage": false | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment