@digital-commons-official/codeceptjs-storyboard 0.4.13 → 1.0.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 (2) hide show
  1. package/README.md +58 -2
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -15,10 +15,66 @@ npm install --save-dev codeceptjs playwright @digital-commons-official/codeceptj
15
15
  npx playwright install chromium
16
16
  ```
17
17
 
18
- Peer dependencies: `codeceptjs >= 4` and [`@digital-commons-official/codeceptjs-visual-helper`](https://gitlab.com/digital-commons/software/libraries/npm/codeceptjs-visual-helper) (the plugin captures and asserts through `I.takeScreenshot`, `I.captureScreenshot` and `I.assertVisualMatch`).
18
+ Requires Node.js `>= 22.19.0`, CodeceptJS `^4.2.0` and
19
+ [`@digital-commons-official/codeceptjs-visual-helper`](https://gitlab.com/digital-commons/software/libraries/npm/codeceptjs-visual-helper)
20
+ `>= 1.3.0`. The plugin captures and asserts through `I.takeScreenshot`,
21
+ `I.captureScreenshot` and `I.assertVisualMatch`.
19
22
 
20
23
  VisualHelper is required: enable it in CodeceptJS as shown below. Keeping it as a peer dependency lets the plugin use your project's helper and CodeceptJS installation.
21
24
 
25
+ ### Tested versions
26
+
27
+ The browser suite installs the actual packed package into six fresh projects:
28
+
29
+ | Node.js | CodeceptJS | VisualHelper |
30
+ |---------------------------|------------|--------------|
31
+ | 22.19.0, 24.21.0, 26.10.0 | 4.2.0 | 1.3.0 |
32
+ | 22.19.0, 24.21.0, 26.10.0 | 4.2.0 | 2.0.3 |
33
+
34
+ Each project imports its own four packages, passes `npm audit`, records one
35
+ English journey and three French Rule cases, then reruns with strict pixel
36
+ comparison. All fourteen baseline hashes must stay unchanged and match across
37
+ the six combinations. The real gallery must link all four journeys.
38
+
39
+ Node 18 is rejected with `--engine-strict`; CodeceptJS 4.0 is rejected with
40
+ `--strict-peer-deps`. Older CodeceptJS 4.0 consumers also fail the security audit.
41
+ The declared ranges allow later compatible versions; the table states the exact
42
+ versions exercised in CI. Use the same Playwright browser and fonts when
43
+ comparing pictures across machines.
44
+
45
+ These installation tests use `npm pack` and real npm commands. They do not
46
+ authenticate a publication to the registry; the release job and npm provenance
47
+ provide that separate proof.
48
+
49
+ ## Public API and compatibility
50
+
51
+ The package root exports the CodeceptJS plugin factory and these functions.
52
+ Their signatures are defined in [src/index.d.ts](src/index.d.ts).
53
+
54
+ | Functions | Contract |
55
+ |--------------------------------------------------------------|------------------------------------------------------------------------------------------|
56
+ | `storyboardStep` | Register a literal sentence and its optional note/copy annotation. |
57
+ | `capturePageFrame`, `captureElementFrame`, `frameOutputPath` | Capture a real viewport or element and return its frame path. |
58
+ | `addStoryboardFrame`, `assertOrUpdateBaseline` | Assert pixels strictly; only `TASK_E2E_UPDATE_BASELINES=1` outside CI records baselines. |
59
+ | `begin`, `baseDir`, `panel`, `frame`, `annotate`, `panels` | Manage a scenario's cards; `frame` attaches an image without asserting it. |
60
+ | `parseScenarioLines`, `render` | Read the original Gherkin sentences and render their SVG. |
61
+ | `tryTo` | Re-export the CodeceptJS effect for an optional action. |
62
+
63
+ The supported plugin options are `theme` and `replayCommand`; CodeceptJS owns
64
+ `require` and `enabled`. From 1.0.0, compatible releases preserve this public
65
+ API and the documented baseline recording behaviour. Removing a public
66
+ function, changing its required arguments or raising a supported minimum
67
+ requires a major release. Internal modules under `src/` are implementation
68
+ details; use the package root.
69
+
70
+ The parser follows Cucumber's Gherkin dialects. Feature and Rule backgrounds,
71
+ Scenario Outlines and Examples, inherited tags, repeated titles, data tables
72
+ and doc strings are supported. Real browser journeys cover English, French
73
+ and German; parser tests cover other dialects, including joined keywords.
74
+ Tables and doc strings are step arguments, not extra cards. A filtered run
75
+ with no matching scenario fails. Future dependency versions still need the
76
+ same compatibility checks; the matrix above identifies the versions verified.
77
+
22
78
  ## Configuration ⚙️
23
79
 
24
80
  Register the plugin next to the visual helper in `codecept.conf.js`, and point Gherkin at your step files:
@@ -231,7 +287,7 @@ The [installation storyboard](tests/e2e/storyboards/06-installation/storyboard-c
231
287
  It checks CodeceptJS 4.2.0, Playwright 1.63.0 and VisualHelper 1.3.5 in Chromium.
232
288
  It opens the generated `index.html` and SVG, repeats the run with strict baselines, then proves that a changed page fails on its exact sentence.
233
289
 
234
- The [consumer manifest](tests/e2e/consumer/package.json) pins those tools and overrides vulnerable transitive dependencies. Its lockfile makes the test repeatable. This verifies that combination; the wider peer dependency ranges are not a tested version matrix. The complete installation and run logs are kept in `tests/e2e/_output/consumer-install.log`.
290
+ The [consumer manifest](tests/e2e/consumer/package.json) pins those tools and overrides vulnerable transitive dependencies. Its lockfile makes the test repeatable. The separate [version matrix](tests/e2e/features/08-compatibility/matrix.feature) verifies the six combinations listed above. Complete installation and run logs are kept in `tests/e2e/_output/consumer-install.log` and `tests/e2e/_output/matrix/`.
235
291
 
236
292
  The clean-consumer test also copies the replay command from the generated gallery
237
293
  and executes it unchanged, then checks that every strict baseline hash is intact.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital-commons-official/codeceptjs-storyboard",
3
- "version": "0.4.13",
3
+ "version": "1.0.0",
4
4
  "description": "Storyboard plugin for CodeceptJS: one Gherkin sentence = one card = one pixel baseline, and every scenario renders itself as a single SVG storyboard",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@digital-commons-official/codeceptjs-visual-helper": ">=1.3.0",
31
- "codeceptjs": ">=4.0.0"
31
+ "codeceptjs": "^4.2.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@digital-commons-official/codeceptjs-visual-helper": "2.0.3",
@@ -60,6 +60,6 @@
60
60
  "author": "Digital Commons",
61
61
  "license": "EUPL-1.2",
62
62
  "engines": {
63
- "node": ">=18.0.0"
63
+ "node": ">=22.19.0"
64
64
  }
65
65
  }