Skip to content

docs: add local test running guide to AGENTS.md#7442

Merged
JohnMcLear merged 4 commits intoether:developfrom
JohnMcLear:docs/agents-test-guide
Apr 3, 2026
Merged

docs: add local test running guide to AGENTS.md#7442
JohnMcLear merged 4 commits intoether:developfrom
JohnMcLear:docs/agents-test-guide

Conversation

@JohnMcLear
Copy link
Copy Markdown
Member

Summary

  • Expands the Testing & Validation section in AGENTS.md with step-by-step instructions for running backend (Mocha), frontend E2E (Playwright), and admin panel tests locally
  • Includes prerequisites (e.g. starting the dev server for Playwright), single-file test examples, and key details like timeouts, NODE_ENV, and file locations
  • Backend test commands verified locally (745 passing, 6 pending)

Test plan

  • Backend tests verified: pnpm --filter ep_etherpad-lite run test → 745 passing
  • Dev server starts correctly on port 9001 for frontend tests
  • Review AGENTS.md renders correctly on GitHub

🤖 Generated with Claude Code

Expand the Testing & Validation section with step-by-step instructions
for running backend (Mocha), frontend E2E (Playwright), and admin panel
tests locally, including prerequisites and single-file examples.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@qodo-free-for-open-source-projects
Copy link
Copy Markdown

Review Summary by Qodo

Add comprehensive local test running guide to AGENTS.md

📝 Documentation

Grey Divider

Walkthroughs

Description
• Expands Testing & Validation section with detailed local test running instructions
• Adds step-by-step guides for backend (Mocha), frontend E2E (Playwright), and admin panel tests
• Includes prerequisites, command examples, file locations, and configuration details
• Emphasizes running tests locally before pushing to CI
Diagram
flowchart LR
  A["Testing & Validation Section"] --> B["Backend Tests Guide"]
  A --> C["Frontend E2E Tests Guide"]
  A --> D["Admin Panel Tests Guide"]
  B --> E["Mocha commands & locations"]
  C --> F["Playwright setup & commands"]
  D --> G["Admin test commands"]
Loading

Grey Divider

File Changes

1. AGENTS.md 📝 Documentation +63/-3

Comprehensive local testing guide documentation

• Reorganized Testing & Validation section with emphasis on local testing before CI
• Added detailed Backend Tests subsection with Mocha commands, NODE_ENV settings, and test file
 locations
• Added Frontend E2E Tests subsection with Playwright prerequisites, server startup, and interactive
 UI mode
• Added Admin Panel Tests subsection with sequential execution details and test file paths

AGENTS.md


2. AGENTS.MD Additional files +63/-3

...

AGENTS.MD


Grey Divider

Qodo Logo

@qodo-free-for-open-source-projects
Copy link
Copy Markdown

qodo-free-for-open-source-projects bot commented Apr 3, 2026

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX Issues (0)

Grey Divider


Action required

1. Wrong install-deps working directory🐞 Bug ≡ Correctness
Description
AGENTS.MD tells users to run sudo npx playwright install-deps without cd src, but Playwright is
a devDependency of the src workspace (ep_etherpad-lite) rather than the repo root. Running it from
the root can resolve a different Playwright version via npx, causing mismatched system/browser
dependencies relative to the version actually used by test-ui/test-admin.
Code

AGENTS.MD[R96-99]

+# Install all browsers (chromium, firefox, webkit) and their system dependencies
+cd src && npx playwright install
+sudo npx playwright install-deps
+```
Evidence
The guide’s install-deps command is shown without switching into src, but the root workspace
does not declare Playwright; @playwright/test is declared under src/package.json, and the
Playwright test scripts are also defined there. That means npx playwright at the root is not
guaranteed to use the same version as the tests.

AGENTS.MD[92-99]
package.json[36-43]
src/package.json[85-88]
src/package.json[143-146]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
AGENTS.MD instructs `sudo npx playwright install-deps` without changing into the `src` workspace, where Playwright is actually installed and where the Playwright test scripts run from.
## Issue Context
This repo is a workspace/monorepo. `@playwright/test` is a devDependency in `src/package.json`, not the root. Running `npx playwright` from the root may fetch/execute a different Playwright version than the one used by `pnpm --filter ep_etherpad-lite run test-ui`.
## Fix Focus Areas
- AGENTS.MD[92-99]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Wrong plugin tests location🐞 Bug ≡ Correctness
Description
AGENTS.MD claims plugin backend tests live under src/node_modules/..., but the backend test
script actually runs plugin specs from the workspace root node_modules (referenced as
../node_modules/... from within src). Following the guide will send contributors to a
non-existent/wrong directory and make it harder to confirm plugin test discovery.
Code

AGENTS.MD[R81-85]

+- Tests run with `NODE_ENV=production`.
+- Default timeout is 120 seconds per test.
+- Test files live in `src/tests/backend/specs/`.
+- Plugin backend tests live in `src/node_modules/ep_*/static/tests/backend/specs/` and are included automatically.
+
Evidence
The new doc line says plugin tests are in src/node_modules/..., but the actual backend test
command includes plugin specs from ../node_modules/ep_*/static/tests/backend/specs/** (which
resolves to /node_modules/... when run from src/). Also, the src/ directory in-repo does not
contain a node_modules folder, so the documented location is misleading/wrong for this repo
layout.

AGENTS.MD[81-85]
src/package.json[134-138]
src/package.json[136-137]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
AGENTS.MD documents plugin backend tests as living under `src/node_modules/...`, but the repo’s backend test script runs plugin specs from the workspace root `node_modules` (`../node_modules/...` from `src`). This mismatch misleads contributors trying to locate plugin test files.
### Issue Context
The `ep_etherpad-lite` package lives in `src/`, and its `test` script references plugin tests via a path that resolves to `<repo-root>/node_modules/ep_*/static/tests/backend/specs/**`.
### Fix Focus Areas
- AGENTS.MD[81-85]
- src/package.json[134-138]
### Expected change
Update the AGENTS.MD bullet to point to the correct location (for example: `node_modules/ep_*/static/tests/backend/specs/` at repo root, or explicitly explain it’s `../node_modules/...` relative to `src/`).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Incorrect Playwright browsers🐞 Bug ≡ Correctness
Description
AGENTS.MD states frontend E2E tests run on chromium, firefox, and webkit by default, but the
Playwright config only defines chromium and firefox projects (webkit is commented out). This creates
incorrect expectations about browser coverage when running test-ui.
Code

AGENTS.MD[R107-110]

+- Tests expect the server at `localhost:9001`.
+- Test files live in `src/tests/frontend-new/specs/`.
+- Runs against chromium, firefox, and webkit by default.
+- Playwright config is at `src/playwright.config.ts`.
Evidence
The new documentation explicitly claims webkit runs by default, but src/playwright.config.ts lists
only chromium and firefox projects and notes webkit was dropped. Therefore `pnpm --filter
ep_etherpad-lite run test-ui` will not execute webkit by default.

AGENTS.MD[107-110]
src/playwright.config.ts[31-44]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
AGENTS.MD claims Playwright E2E runs on chromium, firefox, and webkit by default, but the Playwright config only includes chromium and firefox.
### Issue Context
The `projects` list in `src/playwright.config.ts` defines which browsers run by default.
### Fix Focus Areas
- AGENTS.MD[107-110]
- src/playwright.config.ts[31-44]
### Expected change
Either:
1) Update AGENTS.MD to say it runs on chromium and firefox by default (and mention webkit is disabled), or
2) Re-enable a webkit project in `src/playwright.config.ts` if webkit coverage is intended.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

Comment thread AGENTS.MD
Comment thread AGENTS.MD
JohnMcLear and others added 2 commits April 3, 2026 20:06
Agents and developers should verify Playwright browsers and system
dependencies are installed before running frontend/admin tests to
avoid silent failures and timeouts (especially webkit).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Plugin tests are at repo-root node_modules/, not src/node_modules/
- Playwright runs chromium and firefox only (webkit is disabled)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@JohnMcLear
Copy link
Copy Markdown
Member Author

/review

@qodo-free-for-open-source-projects
Copy link
Copy Markdown

qodo-free-for-open-source-projects bot commented Apr 3, 2026

Persistent review updated to latest commit 3a61a07

Comment thread AGENTS.MD Outdated
Playwright is a devDependency of the src workspace, so install-deps
must also run from src/ to match the correct Playwright version.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@JohnMcLear JohnMcLear merged commit fd6b351 into ether:develop Apr 3, 2026
22 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant