Skip to content

Commit 98a36ef

Browse files
fixup! fixup! fixup! fixup! fixup! fixup! fixup! Introduce Playwright Component Testing (#857)
1 parent 1daa8d8 commit 98a36ef

File tree

2 files changed

+54
-35
lines changed

2 files changed

+54
-35
lines changed

CONTRIBUTING.md

+12
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ To log into the container, run:
3030
docker compose run --rm node_shell
3131
```
3232

33+
If you want to run single command, run:
34+
35+
```bash
36+
docker compose run --rm node_shell bash -c 'npm run <command>'
37+
```
38+
3339
#### Run the Dev Server
3440

3541
1. **Within `node_shell`:** Install dependencies:
@@ -81,6 +87,12 @@ To log into the container, run:
8187
docker compose run --rm playwright
8288
```
8389

90+
If you want to run single command, run:
91+
92+
```bash
93+
docker compose run --rm playwright bash -c 'npm run <command>'
94+
```
95+
8496
## Testing
8597

8698
Please check out our [Testing Guidelines](/docs/contribute/testing-guidelines/).

TESTING.md

+42-35
Original file line numberDiff line numberDiff line change
@@ -15,47 +15,45 @@ their designated Docker containers before pushing changes to the repository.
1515

1616
### Linters (ESlint, Markdownlint, Stylelint)
1717

18-
They can be run individually:
18+
**On host:**
1919

20-
1. (optional) [Open][gh-gg-node-shell] `node_shell` Docker
21-
container
22-
2. Run linters:
20+
[Open][gh-gg-node-shell] `node_shell` Docker container:
2321

24-
```bash
25-
npm run <eslint|markdownlint|stylelint>
26-
```
22+
```bash
23+
docker compose run --rm node_shell
24+
```
25+
26+
**Within `node_shell`:**
2727

28-
or all together:
28+
Run linters either all together:
29+
30+
```bash
31+
npm run lint
32+
```
2933

30-
1. (optional) [Open][gh-gg-node-shell] `node_shell` Docker
31-
container
32-
2. Run linters:
34+
or run linters individually:
3335

34-
```bash
35-
npm run lint
36-
```
36+
```bash
37+
npm run <eslint|markdownlint|stylelint>
38+
```
3739

3840
### Jest
3941

40-
Jest tests can be run using the following commands:
42+
**On host:**
4143

42-
1. (optional) [Open][gh-gg-node-shell] `node_shell` Docker
43-
container
44-
2. Run tests:
44+
[Open][gh-gg-node-shell] `node_shell` Docker container:
4545

46-
```bash
47-
npm run test:jest
48-
```
46+
```bash
47+
docker compose run --rm node_shell
48+
```
4949

50-
or all together with linters:
50+
**Within `node_shell`:**
5151

52-
1. (optional) [Open](/README.md#node_shell-docker-container) `node_shell` Docker
53-
container
54-
2. Run tests:
52+
Run Jest tests:
5553

56-
```bash
57-
npm test
58-
```
54+
```bash
55+
npm run test:jest
56+
```
5957

6058
### Playwright
6159

@@ -77,12 +75,21 @@ cp .env.playwright.dist .env.playwright
7775

7876
Playwright tests can be run using the following commands:
7977

80-
1. [Open][gh-gg-playwright] `playwright` Docker container
81-
2. Run tests:
78+
**On host:**
79+
80+
[Open][gh-gg-playwright] `playwright` Docker container:
81+
82+
```bash
83+
docker compose run --rm playwright
84+
```
85+
86+
**Within `node_shell`:**
87+
88+
Run tests:
8289

83-
```bash
84-
npm run test:playwright-ct:<all|all-with-update>
85-
```
90+
```bash
91+
npm run test:playwright-ct:<all|all-with-update>
92+
```
8693

8794
You can also run specific tests by passing a path to the test files:
8895

@@ -98,14 +105,14 @@ npm run test:playwright-ct:<all|all-with-update> -- <cli_argument>
98105

99106
#### Opening Test Report
100107

101-
After running Playwright tests, test report can be opened on the host system
108+
After running Playwright tests, test report can be opened **on the host system**
102109
by using the following command:
103110

104111
```bash
105112
npm run test:playwright-ct:show-report
106113
```
107114

108-
Test report cannot be server Docker container yet.
115+
Test report cannot be server from Docker container yet.
109116

110117
[gh-gg-node-shell]: /docs/contribute/general-guidelines#node-shell
111118
[gh-gg-playwright]: /docs/contribute/general-guidelines#playwright

0 commit comments

Comments
 (0)