@taqwright/lime-cli 0.15.4 → 0.17.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 +56 -0
  2. package/dist/index.js +252 -172
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -335,6 +335,25 @@ flow on a cloud device, adapts the test into your **test-suite** repo, verifies
335
335
  and opens a pull request there linking back. LIME holds no GitHub credential — the runner
336
336
  already has yours.
337
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.
347
+
348
+ **Several at once, in parallel.** On Taqwright for GitHub with **parallel slots**,
349
+ `docs/github/automate-parallel.yml` takes `/automate 1,3,4`. It records the tests side by side, one
350
+ job per slot, each with its own token (`LIME_CI_TOKEN_1`, `LIME_CI_TOKEN_2`, … from Settings →
351
+ Access → Parallel slots, plus `vars.LIME_SLOTS`). It then adapts and verifies them one at a time in
352
+ one checkout, so shared page objects are written once, and opens **one** test pull request with a
353
+ commit per test that passed. Use it instead of `automate.yml`, not beside it. **Every reply on the pull
354
+ request** comes from the **Taqwright GitHub App**: the 👀, "Automating…", and the result. The
355
+ workflow never comments with its own token, so the templates only need `pull-requests: read`.
356
+
338
357
  On **GitLab CI/CD**, `docs/gitlab/automate.yml` is the same loop, started from a manual job
339
358
  rather than a comment — GitLab CI cannot be triggered by a comment from `.gitlab-ci.yml`
340
359
  alone. See [GitLab CI/CD](#gitlab-cicd) below.
@@ -458,6 +477,43 @@ matrix, other-runner and other-CI variants commented in. For GitLab, `docs/gitla
458
477
  is the equivalent — mind the `--run-id` note in [GitLab CI/CD](#gitlab-cicd), which is the one
459
478
  difference that degrades the board without saying so.
460
479
 
480
+ ### `pr` — what a pull request means for your UI tests
481
+
482
+ Run on the **app** repository's pull requests. LIME traces the change through your app's map
483
+ and answers, as one comment on the pull request:
484
+
485
+ - **Run these**: the tests on screens the change reaches.
486
+ - **Needs update**: tests that assert text this pull request changes (`$` → `SGD`), so an
487
+ intended change is not mistaken for a regression.
488
+ - **Not automated yet**: planned scenarios on the journeys it touches, and journeys with none.
489
+ - **Behind a feature flag**: flags the pull request adds. A test for one needs a test user the
490
+ flag is on for.
491
+
492
+ ```yaml
493
+ on: pull_request
494
+ permissions:
495
+ contents: read
496
+ jobs:
497
+ lime:
498
+ runs-on: ubuntu-latest
499
+ steps:
500
+ - uses: actions/checkout@v4
501
+ with: { fetch-depth: 0 }
502
+ - run: npx -y @taqwright/lime-cli pr --project "Shop" --app-dir mobile
503
+ env:
504
+ LIME_CI_TOKEN: ${{ secrets.LIME_CI_TOKEN }}
505
+ ```
506
+
507
+ The comment is posted by the **Taqwright GitHub App**, never by your workflow, so every pull
508
+ request sees one author. Install the App on the app repository and connect it in LIME →
509
+ Integrations. Until then the comment goes to the job summary instead.
510
+
511
+ The screens come from the app map you published from VS Code; `pr` keeps the import graph
512
+ current from the pull request's own checkout. What leaves the runner is file names, the part of
513
+ the import graph that can reach them, changed strings and source diffs with credential-looking
514
+ values masked. Credential files are never read. It always exits 0: a fork without secrets or a
515
+ shallow checkout is reported and skipped, never a failed build.
516
+
461
517
  ## Server API contract
462
518
 
463
519
  `lime-cli` is the only client of the LIME server's `/api/cli/*` endpoints, so