add additional test scripts and update readme

This commit is contained in:
Anton 2022-01-20 10:07:48 -03:00
parent 7f075be033
commit 2b06174958
2 changed files with 21 additions and 1 deletions

View File

@ -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"
```

View File

@ -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",