You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+35Lines changed: 35 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,41 @@ npm run dev # Watch mode for development
39
39
40
40
---
41
41
42
+
## Agent Quickstart
43
+
44
+
### Copilot Coding Agent Environment
45
+
This repo includes `.github/workflows/copilot-setup-steps.yml` to preinstall dependencies for Copilot Coding Agent. This workflow is not part of normal CI and only prepares the agent environment. Note: Copilot only uses it once it exists on the default branch.
46
+
47
+
### Standard Test Sequence
48
+
1.`composer lint`
49
+
2.`composer phpstan`
50
+
3.`./vendor/bin/phpunit`
51
+
4.`npm ci` (if deps missing)
52
+
5.`npm run gutenberg:build`
53
+
6.`npm run chartbuilder:build`
54
+
7.`npm run d3renderer:build`
55
+
8.`npm run env:up`
56
+
9.`npm run test:e2e:playwright`
57
+
10.`npm run env:down`
58
+
59
+
### E2E Environment
60
+
- Default: Docker via `npm run env:up` / `npm run env:down` (uses `docker-compose.ci.yml`).
61
+
- Optional: `wp-env` is supported, but Docker is the default for agents.
62
+
63
+
### Build Outputs
64
+
If you change anything under `classes/Visualizer/**/src`, you must run the corresponding build and commit the output:
65
+
- Gutenberg: `npm run gutenberg:build`
66
+
- ChartBuilder: `npm run chartbuilder:build`
67
+
- D3Renderer: `npm run d3renderer:build`
68
+
69
+
### Do / Don't
70
+
- Do: keep changes scoped to the task and run the standard test sequence.
71
+
- Do: update both classic and Gutenberg editor paths when changing settings UI.
72
+
- Don't: edit build artifacts directly (edit `src`, then build).
Copy file name to clipboardExpand all lines: tests/e2e/README.md
+20-1Lines changed: 20 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,17 +14,24 @@ npx playwright install
14
14
Create the testing instance using the following command:
15
15
16
16
```bash
17
-
npm run ci:up
17
+
npm run env:up
18
18
```
19
19
20
20
This will create a WordPress instance. The port is `8889` and the user is `admin` and the password is `password` (the same values used by `wp-env` testing instance).
21
+
If you see port `8080`, ignore it for E2E; the test environment is expected at `http://localhost:8889`.
21
22
22
23
For the _headless_ mode, use the following command:
23
24
24
25
```bash
25
26
npm run test:e2e:playwright
26
27
```
27
28
29
+
Tear down the environment when finished:
30
+
31
+
```bash
32
+
npm run env:down
33
+
```
34
+
28
35
For _debug_ mode (which will open the browser along with Playwright Editor), use the following command:
29
36
30
37
```bash
@@ -42,6 +49,18 @@ For database connection, the credentials are:
42
49
- Password: `password`
43
50
- Port: `3306`
44
51
52
+
### Build requirements
53
+
54
+
If you change any sources under `classes/Visualizer/**/src`, run the matching build before E2E:
55
+
56
+
-`npm run gutenberg:build`
57
+
-`npm run chartbuilder:build`
58
+
-`npm run d3renderer:build`
59
+
60
+
### Docker file
61
+
62
+
The E2E environment uses `docker-compose.ci.yml` (via `npm run env:up`).
63
+
45
64
> [!NOTE]
46
65
> You can modify the credentials in the `docker-compose.yml` file.
0 commit comments