Skip to content

Commit bf48d15

Browse files
fixup! fixup! fixup! fixup! fixup! Introduce Playwright Component Testing (#857)
1 parent 4a24a88 commit bf48d15

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

.env.playwright.dist

+3
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ PW_WORKERS=1
77

88
# Port used by Playwright Component Testing to serve the test files
99
PW_CT_PORT=3100
10+
11+
# Port used by Playwright Component Testing to serve the report
12+
PW_REPORT_PORT=9323

CONTRIBUTING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ To change them, edit the `.env` file as needed.
2222
#### Node shell
2323

2424
All npm commands such as `npm ci`, `npm test`, `npm run eslint` and others you
25-
need to run them within the `node_shell` docker container.
25+
need to run them within the `node_shell` Docker container.
2626

2727
To log into the container, run:
2828

@@ -72,8 +72,8 @@ docker compose run --rm node_shell
7272

7373
#### Playwright
7474

75-
Npm commands such as `test:playwright-ct:all` and `test:playwright-ct:all-with-update`
76-
you need to run them within the `playwright` docker container.
75+
npm commands such as `test:playwright-ct:all` and `test:playwright-ct:all-with-update`
76+
need to be run them within the `playwright` Docker container.
7777

7878
To log into the container, run:
7979

TESTING.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,15 @@ npm run test:playwright-ct:<all|all-with-update> -- <cli_argument>
9898

9999
#### Opening Test Report
100100

101-
After running Playwright tests, test report can be served into a browser
101+
After running Playwright tests, test report can be opened on the host system
102102
by using the following command:
103103

104104
```bash
105-
npx playwright show-report
105+
npm run test:playwright-ct:show-report
106106
```
107107

108+
Test report cannot be server Docker container yet.
109+
108110
[gh-gg-node-shell]: /docs/contribute/general-guidelines#node-shell
109111
[gh-gg-playwright]: /docs/contribute/general-guidelines#playwright
110112
[playwright-cli]: https://playwright.dev/docs/test-cli#reference

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@
5959
"test": "npm run test:jest",
6060
"test:jest": "jest src --coverage",
6161
"test:playwright-ct:all": "playwright test -c playwright-ct.config.js",
62-
"test:playwright-ct:all-with-update": "playwright test -c playwright-ct.config.js --update-snapshots"
62+
"test:playwright-ct:all-with-update": "playwright test -c playwright-ct.config.js --update-snapshots",
63+
"test:playwright-ct:show-report": "playwright show-report --port=$(grep PW_REPORT_PORT .env.playwright | cut -d '=' -f2)"
6364
},
6465
"dependencies": {
6566
"normalize.css": "^8.0.1"

0 commit comments

Comments
 (0)