@sifurai/cli 0.1.4 → 0.1.5

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 +4 -3
  2. package/dist/cli.js +10 -8
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -96,7 +96,8 @@ sifur accept AZA-12 --url https://test.example.internal
96
96
 
97
97
  1. Finds the ticket in your organizations and downloads its cases.
98
98
  2. Runs each UI case in a headless browser against `--url` (paths in the cases are relative to
99
- it), taking a screenshot after every step. Add `--headed` to watch.
99
+ it), taking a screenshot after every step, in a browser window you can watch. Add `--headless`
100
+ to run it without one.
100
101
  3. For a step that needs a person's eye, shows you the screenshot's path and asks whether it looks
101
102
  right.
102
103
  4. Runs automated cases in your checkout of their repository (see below); without one, asks you
@@ -193,7 +194,7 @@ sifur record AZA-12 --new "…" --repository web # when the project h
193
194
  Like `accept`, it uses the project's test server unless `--url` names another. The CLI:
194
195
 
195
196
  1. Downloads the ticket's cases and signs in to your test server with Sifur's sign-in (the steps
196
- every UI case starts with), in a browser you don't see (`--headed` shows it). The sign-in's
197
+ every UI case starts with), in a browser you can watch (`--headless` hides it). The sign-in's
197
198
  secrets come from `SIFUR_SECRET_<NAME>`, or are asked for, as for `accept`.
198
199
  2. Opens Playwright's recorder in Chrome (or Edge), already signed in, on the page the sign-in
199
200
  left it at. Do the case's steps, then check the result with the toolbar's **Assert text** or
@@ -275,7 +276,7 @@ SIFUR_SECRET_ADMIN_PASSWORD='…' sifur accept AZA-12 --url https://test.example
275
276
  | Option | |
276
277
  |---|---|
277
278
  | `--url <url>` | Your test server, where the ticket's branch is deployed |
278
- | `--headed` | Show the browser while the cases run |
279
+ | `--headless` | Run the browser without showing it; it shows by default |
279
280
  | `--timeout <seconds>` | How long each browser step may take, page loads included (default 60). Raise it when the test server is slow, for example over a VPN |
280
281
  | `--workdir <repository>=<dir>` | Run that repository's automated cases in `<dir>`; repeatable. Default: the checkout you're in, when it's that repository's |
281
282
  | `--download` / `--run` / `--upload` | The three steps for a full-tunnel VPN |
package/dist/cli.js CHANGED
@@ -13,17 +13,17 @@ const USAGE = `Usage:
13
13
  sifur logout
14
14
  sifur apply <KEY|uuid> [--workdir <repo>=<dir> …]
15
15
  sifur apply <KEY|uuid> --revert
16
- sifur accept <KEY|uuid> --url <test url> [--apply] [--headed] [--workdir <repo>=<dir> …]
16
+ sifur accept <KEY|uuid> [--url <test url>] [--apply] [--headless] [--workdir <repo>=<dir> …]
17
17
  sifur accept <KEY|uuid> --download [--apply]
18
- sifur accept <KEY|uuid> --run --url <test url> [--headed] [--workdir <repo>=<dir> …]
18
+ sifur accept <KEY|uuid> --run [--url <test url>] [--headless] [--workdir <repo>=<dir> …]
19
19
  sifur accept <KEY|uuid> --upload
20
- sifur record <KEY|uuid> <TC-n> [--url <test url>] [--headed]
21
- sifur record <KEY|uuid> --new "<title>" [--repository <name>] [--url <test url>] [--headed]
20
+ sifur record <KEY|uuid> <TC-n> [--url <test url>] [--headless]
21
+ sifur record <KEY|uuid> --new "<title>" [--repository <name>] [--url <test url>] [--headless]
22
22
 
23
23
  Options:
24
24
  --api <url> Sifur's API (default ${DEFAULT_API}, or SIFUR_API_URL)
25
- --url <url> Your test server, where the ticket's branch is deployed
26
- --headed Show the browser while the cases run
25
+ --url <url> Your test server (default: the project's saved address)
26
+ --headless Run the browser without showing it (it shows by default)
27
27
  --timeout <seconds> How long each browser step may take (default 60; raise it for a slow VPN)
28
28
  --apply Put Sifur's changes in your checkouts first, uncommitted, as \`sifur apply\` does
29
29
  --revert Take the changes \`sifur apply\` put in back out
@@ -72,7 +72,9 @@ export async function main(argv, io, env = process.env, cwd = process.cwd()) {
72
72
  options: {
73
73
  api: { type: 'string' },
74
74
  url: { type: 'string' },
75
+ // Kept so older instructions still work: the browser shows by default now.
75
76
  headed: { type: 'boolean', default: false },
77
+ headless: { type: 'boolean', default: false },
76
78
  timeout: { type: 'string' },
77
79
  workdir: { type: 'string', multiple: true, default: [] },
78
80
  download: { type: 'boolean', default: false },
@@ -135,7 +137,7 @@ export async function main(argv, io, env = process.env, cwd = process.cwd()) {
135
137
  ref,
136
138
  mode,
137
139
  url: values.url,
138
- headed: values.headed,
140
+ headed: !values.headless,
139
141
  workdirs: parseWorkdirs(values.workdir ?? []),
140
142
  cwd,
141
143
  store: cacheDir(env),
@@ -155,7 +157,7 @@ export async function main(argv, io, env = process.env, cwd = process.cwd()) {
155
157
  title: values.new,
156
158
  repository: values.repository,
157
159
  url: values.url,
158
- headed: values.headed,
160
+ headed: !values.headless,
159
161
  consoleOrigin: env.SIFUR_CONSOLE_URL ?? credentials?.console ?? null,
160
162
  }, { io, env, timeoutMs: timeoutSeconds(values.timeout) * 1000 });
161
163
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sifurai/cli",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Run a Sifur ticket's acceptance cases against your own test server and upload the results.",
5
5
  "license": "UNLICENSED",
6
6
  "homepage": "https://sifur.ai",