@taqwright/lime-cli 0.15.3 → 0.16.0

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.
Files changed (3) hide show
  1. package/README.md +58 -2
  2. package/dist/index.js +266 -179
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -272,8 +272,15 @@ lime-cli check # last line: LIME_CHECK_RESULT: PASS | FAIL
272
272
  `lime-cli check` checks everything that changed since the base branch (committed, uncommitted
273
273
  and new files, never `.lime/`) against the current recording: every locator the change adds was
274
274
  recorded on the device, every changed spec calls page objects rather than the device, and the
275
- change holds a test at all. It names the recording it used (goal and time). A hand-written test
276
- fails it; `--diff <file>` takes a unified diff for CI.
275
+ change holds a test at all, and every changed spec asserts something (a spec that ends at a tap
276
+ passes with the feature reverted). It names the recording it used (goal and time). A hand-written
277
+ test fails it; `--diff <file>` takes a unified diff for CI.
278
+
279
+ **A deliberately flat suite** declares it with a `lime.json` at the repo root:
280
+ `{ "pageObjects": false }`. Then `check` and `check-pom` skip the page-object rule (and say so),
281
+ `export`/`adapt` brief the agent to write flat specs in the suite's own style, and doctor stops
282
+ flagging direct device use. It is the repo owner's declaration, committed and reviewed; the
283
+ recording rule and the assertion rule still apply.
277
284
 
278
285
  `--lime-dir` writes `.lime/` next to your project: the recorded steps the agent converts
279
286
  from, a `run.json` of what was recorded (goal, platform, cloud device), and the briefs.
@@ -328,6 +335,18 @@ flow on a cloud device, adapts the test into your **test-suite** repo, verifies
328
335
  and opens a pull request there linking back. LIME holds no GitHub credential — the runner
329
336
  already has yours.
330
337
 
338
+ Where `lime-cli pr` has commented with **suggested tests**, pick one by number instead of typing
339
+ a goal:
340
+
341
+ ```
342
+ /automate 2
343
+ ```
344
+
345
+ The goal comes from LIME's analysis of that pull request, never from the comment. A suggestion
346
+ behind a feature flag is held back until a test user for it exists. **Every reply on the pull
347
+ request** comes from the **Taqwright GitHub App**: the 👀, "Automating…", and the result. The
348
+ workflow never comments with its own token, so the templates only need `pull-requests: read`.
349
+
331
350
  On **GitLab CI/CD**, `docs/gitlab/automate.yml` is the same loop, started from a manual job
332
351
  rather than a comment — GitLab CI cannot be triggered by a comment from `.gitlab-ci.yml`
333
352
  alone. See [GitLab CI/CD](#gitlab-cicd) below.
@@ -451,6 +470,43 @@ matrix, other-runner and other-CI variants commented in. For GitLab, `docs/gitla
451
470
  is the equivalent — mind the `--run-id` note in [GitLab CI/CD](#gitlab-cicd), which is the one
452
471
  difference that degrades the board without saying so.
453
472
 
473
+ ### `pr` — what a pull request means for your UI tests
474
+
475
+ Run on the **app** repository's pull requests. LIME traces the change through your app's map
476
+ and answers, as one comment on the pull request:
477
+
478
+ - **Run these**: the tests on screens the change reaches.
479
+ - **Needs update**: tests that assert text this pull request changes (`$` → `SGD`), so an
480
+ intended change is not mistaken for a regression.
481
+ - **Not automated yet**: planned scenarios on the journeys it touches, and journeys with none.
482
+ - **Behind a feature flag**: flags the pull request adds. A test for one needs a test user the
483
+ flag is on for.
484
+
485
+ ```yaml
486
+ on: pull_request
487
+ permissions:
488
+ contents: read
489
+ jobs:
490
+ lime:
491
+ runs-on: ubuntu-latest
492
+ steps:
493
+ - uses: actions/checkout@v4
494
+ with: { fetch-depth: 0 }
495
+ - run: npx -y @taqwright/lime-cli pr --project "Shop" --app-dir mobile
496
+ env:
497
+ LIME_CI_TOKEN: ${{ secrets.LIME_CI_TOKEN }}
498
+ ```
499
+
500
+ The comment is posted by the **Taqwright GitHub App**, never by your workflow, so every pull
501
+ request sees one author. Install the App on the app repository and connect it in LIME →
502
+ Integrations. Until then the comment goes to the job summary instead.
503
+
504
+ The screens come from the app map you published from VS Code; `pr` keeps the import graph
505
+ current from the pull request's own checkout. What leaves the runner is file names, the part of
506
+ the import graph that can reach them, changed strings and source diffs with credential-looking
507
+ values masked. Credential files are never read. It always exits 0: a fork without secrets or a
508
+ shallow checkout is reported and skipped, never a failed build.
509
+
454
510
  ## Server API contract
455
511
 
456
512
  `lime-cli` is the only client of the LIME server's `/api/cli/*` endpoints, so