add additional test scripts and update readme
This commit is contained in:
parent
7f075be033
commit
2b06174958
@ -27,3 +27,20 @@ $ npx playwright test chat --browser=firefox
|
||||
or
|
||||
$ npm test chat -- --browser=firefox
|
||||
```
|
||||
#### Additional commands
|
||||
|
||||
To see the tests running visually, you must run them in headed mode:
|
||||
```bash
|
||||
$ npm run test:headed chat
|
||||
```
|
||||
|
||||
If you want to run a specific test or a specific group of tests, you can do so with the following command:
|
||||
```bash
|
||||
$ npm run test:filter "Send public message"
|
||||
```
|
||||
_(note that this filter needs to be passed in "double quotes")_
|
||||
|
||||
You can also use this also through the test tree, adding the test suite / group of tests before the test filter:
|
||||
```bash
|
||||
$ npm run test:filter "notifications chat"
|
||||
```
|
@ -1,6 +1,9 @@
|
||||
{
|
||||
"scripts": {
|
||||
"test": "npx playwright test"
|
||||
"test": "npx playwright test",
|
||||
"test:filter": "npx playwright test -g",
|
||||
"test:headed": "npx playwright test --headed",
|
||||
"test:debug": "npx playwright test --debug -g"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@playwright/test": "^1.16.3",
|
||||
|
Loading…
Reference in New Issue
Block a user