@qualflare/cypress 0.1.0 → 0.2.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.
package/README.md CHANGED
@@ -1,9 +1,15 @@
1
1
  # @qualflare/cypress
2
2
 
3
- A native Cypress reporter for [Qualflare](https://qualflare.com) — uploads test results directly
3
+ [![npm version](https://img.shields.io/npm/v/%40qualflare%2Fcypress.svg)](https://www.npmjs.com/package/@qualflare/cypress)
4
+ [![CI](https://github.com/Qualflare/qualflare-cypress/actions/workflows/ci.yml/badge.svg)](https://github.com/Qualflare/qualflare-cypress/actions/workflows/ci.yml)
5
+ [![License: Apache-2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](./LICENSE)
6
+
7
+ A native Cypress reporter for [Qualflare](https://qualflare.com) — captures test results directly
4
8
  from your Cypress run: suite/test status, real retry counts, screenshots, step-by-step command
5
- traces, and author-facing metadata (labels, links, tags, custom attachments). No post-hoc file
6
- parsing, no intermediate report format.
9
+ traces, and author-facing metadata (labels, links, tags, custom attachments) and writes them into
10
+ a report directory that [`qualflare-cli`](https://github.com/Qualflare/qualflare-cli) uploads. No
11
+ post-hoc file parsing, no intermediate report format to hand-roll, no network access needed from
12
+ inside your Cypress run.
7
13
 
8
14
  ## Install
9
15
 
@@ -11,7 +17,14 @@ parsing, no intermediate report format.
11
17
  npm install --save-dev @qualflare/cypress
12
18
  ```
13
19
 
14
- Requires Cypress `>=12.0.0 <15.0.0` (installed separately as a peer dependency) and Node `>=18`.
20
+ Requires Cypress `>=12.0.0` (installed separately as a peer dependency). Node `>=18` for
21
+ Cypress 12–14; Cypress 15 itself requires Node `>=20`.
22
+
23
+ The peer range is deliberately open-ended rather than capped at a known-good major, so a new
24
+ Cypress release never hard-blocks `npm install` for you. Every major from 12 through 15 is
25
+ exercised in CI against a real `cypress run`; majors newer than that are untested but not
26
+ refused — please [open an issue](https://github.com/Qualflare/qualflare-cypress/issues) if
27
+ one misbehaves.
15
28
 
16
29
  ## Quickstart
17
30
 
@@ -36,14 +49,27 @@ export default defineConfig({
36
49
  import '@qualflare/cypress';
37
50
  ```
38
51
 
39
- Set your token via the `QUALFLARE_TOKEN` environment variable (or the `token` plugin option):
52
+ Run your tests as usual — every `cypress run` writes a Collect report (JSON, plus any video
53
+ attachments) into `./qualflare-results` by default. No token or network access is needed for this
54
+ step; the reporter itself never makes a network call:
55
+
56
+ ```sh
57
+ npx cypress run
58
+ ```
59
+
60
+ Then, in the same CI job, hand that directory to `qualflare-cli` — the step that actually uploads
61
+ results, required after every run, sharded or not:
40
62
 
41
63
  ```sh
42
- QUALFLARE_TOKEN=<your-token> npx cypress run
64
+ npm install -g @qualflare/cli
65
+ qf login my-project "$QUALFLARE_TOKEN" --force
66
+ qf my-project collect ./qualflare-results
43
67
  ```
44
68
 
45
- That's it — suite/test results, retries, and automatic-on-failure screenshots upload as one Launch
46
- at the end of the run. See [`examples/basic/`](./examples/basic) for a complete runnable project.
69
+ That's it — suite/test results, retries, and automatic-on-failure screenshots show up as one Launch
70
+ once `qualflare-cli collect` runs. [`examples/basic/`](./examples/basic) has a runnable project, but
71
+ its own instructions still describe the old direct-upload/`QUALFLARE_TOKEN` setup and haven't been
72
+ updated for the `outputDir` model yet — follow the steps above instead, not that example's README.
47
73
 
48
74
  ## Enriching your tests
49
75
 
@@ -77,8 +103,10 @@ branch/commit, CI provider/build/PR, browser/OS) in [`docs/CONFIGURATION.md`](./
77
103
 
78
104
  ## Known limitations
79
105
 
80
- - **No video upload** Qualflare has no blob/video-attachment storage yet.
81
- - **One `cypress run` process uploads as one Launch** sharded CI setups get multiple Launches.
106
+ - **Sharded CI runs merge automatically, but only at collect time** — point every shard's
107
+ `cypress run` at the same shared `outputDir`; `qualflare-cli collect` merges every report file it
108
+ finds there into one Launch, no extra flag needed (see
109
+ [`docs/LIMITATIONS.md`](./docs/LIMITATIONS.md)).
82
110
  - **Command-log step nesting is two levels only** (Cypress's own API limit) — `qualflare.step()`
83
111
  supports arbitrary nesting depth.
84
112
 
@@ -91,7 +119,7 @@ npm run typecheck # tsc --noEmit
91
119
  npm run lint # eslint .
92
120
  npm run build # tsup — dual ESM+CJS, .d.ts
93
121
  npm test # unit tests (vitest)
94
- npm run test:integration # spawns real cypress run against a fixture project + mock server
122
+ npm run test:integration # spawns a real cypress run against a fixture project, asserts on its outputDir report
95
123
  ```
96
124
 
97
125
  Release process: see [`RELEASING.md`](./RELEASING.md).
package/dist/index.cjs CHANGED
@@ -45,6 +45,7 @@ var MAX_LABELS_PER_CASE = 100;
45
45
  var MAX_LINKS_PER_CASE = 20;
46
46
  var MAX_TAGS_PER_CASE = 64;
47
47
  var MAX_TAG_LENGTH = 255;
48
+ var MAX_VIDEO_UPLOAD_BYTES = 50 * 1024 * 1024;
48
49
  var MAX_STEPS_PER_TEST_ATTEMPT = 300;
49
50
 
50
51
  // src/shared/duration.ts