greenrun-cli 0.2.5 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "greenrun-cli",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "CLI and MCP server for Greenrun - browser test management for Claude Code",
5
5
  "type": "module",
6
6
  "main": "dist/server.js",
@@ -37,6 +37,25 @@ Projects can be configured with authentication settings so tests auto-login befo
37
37
 
38
38
  Projects can also store named **credentials** (name/email/password sets). Each test can reference a credential by `credential_name` to use specific login details during execution.
39
39
 
40
+ ### Project Setup
41
+
42
+ When asked to create tests, first call `list_projects` to check for an existing project. Then:
43
+
44
+ - **No project exists**: Create one via `create_project` with the name, base URL, and description.
45
+ - **Project exists but missing credentials or auth config**: Update it via `update_project` to add what's missing.
46
+
47
+ In either case, follow these steps:
48
+
49
+ 1. **Derive the base URL** from the project's configuration (e.g. `APP_URL` in `.env`, framework config, or `docker-compose.yml`). Don't ask the user for this.
50
+ 2. **Set up authentication** -- most apps need auth for testing. Be proactive:
51
+ - Look for a registration or login page in the app's routes/config.
52
+ - Create test credentials and store them on the project using the `credentials` parameter. Use clear names like `"default"` or `"admin"`. Example: `{ name: "default", email: "greenrun-test@example.com", password: "TestPass123!" }`.
53
+ - Set `auth_mode: "existing_user"` with the app's `login_url` and step-by-step `login_instructions`.
54
+ - Then register the test account through the app's registration flow using Playwright so the credentials are valid.
55
+ 3. **Discover pages** by reading the app's route definitions, then register key pages via `create_page`.
56
+
57
+ Don't ask the user for information you can derive from the codebase (base URL, login URL, route structure). Only ask when there's genuine ambiguity.
58
+
40
59
  ### Creating Tests
41
60
 
42
61
  1. Navigate to the page you want to test using Playwright