@hcmai/cli 0.36.1 → 0.37.1

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/README.md CHANGED
@@ -166,6 +166,21 @@ hcm chiron page /dashboard/<id> --env acme-dev --as consultant-acme-dev \
166
166
  --out evidence/acme-dev/<date>-dashboard/page.png
167
167
  ```
168
168
 
169
+ Both `--expect-text` and `--reject-text` are matched against the page's **visible
170
+ text** (`document.body.innerText`), not the page source: words that only appear in
171
+ `<head>` (`<meta name="description">` mentions "AI 数字员工"), attributes, scripts
172
+ or hidden elements do not count. The receipt carries `textLength`; an empty visible
173
+ text (`blank: true`) always fails with "页面正文为空" and a next step — the path
174
+ probably does not exist (list pages are `/model_list/<Model>`, e.g.
175
+ `/model_list/Employee`), the page has not finished rendering (raise `--wait-ms`),
176
+ or the identity is not logged in / not allowed; when navigation never reached the
177
+ load event the next step points at the frontend address instead. A failing run
178
+ ends with one line carrying the verdict and the next step (`hcm chiron test`
179
+ quotes that line). Failing to read the visible text is an error, not a blank
180
+ page. The legacy spawn driver only gets
181
+ `--dump-dom` HTML; it strips `<head>`, scripts, styles, comments and tags before
182
+ matching and marks `textSource: dump-dom` (CSS-hidden text still counts there).
183
+
169
184
  Exit code is `0` when the page carries every `--expect-text` and none of the
170
185
  `--reject-text`, and `3` when it does not; the screenshot is kept either way so a
171
186
  human can see whether it was a login page, an error page, or a real gap.