@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 +39 -11
- package/dist/index.cjs +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/plugin/index.cjs +126 -275
- package/dist/plugin/index.cjs.map +1 -1
- package/dist/plugin/index.d.cts +22 -20
- package/dist/plugin/index.d.ts +22 -20
- package/dist/plugin/index.js +126 -275
- package/dist/plugin/index.js.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
# @qualflare/cypress
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@qualflare/cypress)
|
|
4
|
+
[](https://github.com/Qualflare/qualflare-cypress/actions/workflows/ci.yml)
|
|
5
|
+
[](./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)
|
|
6
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
46
|
-
|
|
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
|
-
- **
|
|
81
|
-
|
|
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
|
|
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