saffron-ai 0.7.2 → 0.8.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/CHANGELOG.md +61 -0
- package/README.md +1 -0
- package/dist-pkg/cli.js +116 -109
- package/package.json +1 -1
- package/skills/saffron/SKILL.md +1 -0
- package/skills/saffron/references/config.md +2 -0
- package/skills/saffron/references/syntax.md +54 -0
- package/templates/saucedemo/data/catalog.json +11 -0
- package/templates/saucedemo/features/shopping.saffron +9 -0
- package/textmate/saffron/syntaxes/saffron.tmLanguage.json +7 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,60 @@ All notable changes to Saffron, in one place: the `saffron-ai` runner (npm),
|
|
|
4
4
|
the VS Code extension (`ChathurangaJayasinghe.saffron-vscode`) and the
|
|
5
5
|
JetBrains plugin (`ai.saffron.jetbrains`). Dates are publish dates.
|
|
6
6
|
|
|
7
|
+
## 0.8.0
|
|
8
|
+
|
|
9
|
+
Released 2026-09-21.
|
|
10
|
+
|
|
11
|
+
Test data moves out of the feature file: a `data/` folder, `{data:...}`
|
|
12
|
+
references, list checks, `Examples` from a file, values unique per run, and
|
|
13
|
+
data per environment.
|
|
14
|
+
|
|
15
|
+
Runner
|
|
16
|
+
|
|
17
|
+
- **Test data outside the feature file: `{data:file.key}`.** Put values in
|
|
18
|
+
JSON files under `data/` and reference them from a step, a table cell or
|
|
19
|
+
a doc string: `When I sign in as {data:users.admin.email}`. Same family
|
|
20
|
+
as `{env:VAR}`: the recording stores the token and replay reads the file,
|
|
21
|
+
so changing a value changes the next replay at zero tokens. A recording
|
|
22
|
+
that still spells out the old value goes stale instead of replaying
|
|
23
|
+
yesterday's data, and a missing file or key stops the run by name before
|
|
24
|
+
a browser opens. New config key `dataDir` (default `data`). Not for
|
|
25
|
+
secrets: data files are committed.
|
|
26
|
+
- **Check a whole list in one step.** `Then the status filter should list
|
|
27
|
+
every {data:enums.OrderStatus}` records ONE assertion (`expectEach`) that
|
|
28
|
+
names the list and its container. Replay reads the list from the file, so
|
|
29
|
+
a value added to the data is checked on the next run at zero tokens, and
|
|
30
|
+
a missing one fails by name with how many were found. Values match as
|
|
31
|
+
whole text ("Paid" is not "Unpaid"), extra entries such as "All" are
|
|
32
|
+
allowed, and a closed dropdown works.
|
|
33
|
+
- **`Examples` from a file**, in `.saffron` files: `Examples: {data:roles}`
|
|
34
|
+
reads `data/roles.csv` (header row = placeholders) or a JSON list of
|
|
35
|
+
records. One recording, one zero-token replay per row; a row added to the
|
|
36
|
+
file records nothing. A placeholder without a column, a missing file and a
|
|
37
|
+
`.feature` file using it are each parse errors that say what to do.
|
|
38
|
+
- **`{unique:name}`**: a value that is new on every run and the same within
|
|
39
|
+
one, for scenarios that create things. The agent types the generated
|
|
40
|
+
value while recording and Saffron turns it back into the token; a run that
|
|
41
|
+
is not green lists what each token stood for. `{unique:name:digits}` for
|
|
42
|
+
numeric fields.
|
|
43
|
+
- **Data per environment**: `--env staging` (or `SAFFRON_ENV`, or `env` in
|
|
44
|
+
the config) lays `data/users.staging.json` over `data/users.json`, key by
|
|
45
|
+
key. The reference in the step stays the same on every target.
|
|
46
|
+
- `saffron status --json` gains `data`: the folder, the environment, the
|
|
47
|
+
files, and references that do not resolve. `saffron lsp` completes
|
|
48
|
+
`{data:` paths, shows values on hover, jumps to the key and flags
|
|
49
|
+
unresolved references. The bundled grammar highlights `{data:...}` and
|
|
50
|
+
`{unique:...}`. `saffron init --examples` installs `data/catalog.json` and
|
|
51
|
+
a scenario that uses it, and the agent skill, its syntax reference and the
|
|
52
|
+
AGENTS.md block teach the new syntax.
|
|
53
|
+
|
|
54
|
+
- **`saffron prune` covers failure screenshots.** A deleted scenario also
|
|
55
|
+
leaves its screenshot folder behind under `.saffron/artifacts/`. Prune
|
|
56
|
+
lists those folders with the caches and proposals and removes them with
|
|
57
|
+
`--yes`; a live scenario's folder is kept, per Examples row. `saffron
|
|
58
|
+
status --json` reports them as orphans of kind `artifact`, and both IDE
|
|
59
|
+
panels (VS Code 0.2.6, JetBrains 0.2.3) show them.
|
|
60
|
+
|
|
7
61
|
## 0.7.2
|
|
8
62
|
|
|
9
63
|
Released 2026-09-21.
|
|
@@ -34,6 +88,13 @@ Runner
|
|
|
34
88
|
|
|
35
89
|
Editors (VS Code extension 0.2.6, JetBrains plugin 0.2.3)
|
|
36
90
|
|
|
91
|
+
- **`{data:...}` in the editor.** VS Code completes data files and keys with
|
|
92
|
+
their values, shows the current value (or a list's values, or an Examples
|
|
93
|
+
file's columns) on hover, jumps to the key, and underlines a reference
|
|
94
|
+
that does not resolve, reading the same files and environment overlay the
|
|
95
|
+
runner does. JetBrains gets the same through `saffron lsp`. Both highlight
|
|
96
|
+
`{data:...}` and `{unique:...}` like `{env:VAR}`, including on an
|
|
97
|
+
`Examples:` line.
|
|
37
98
|
- **Last run, with the screenshot one click away.** Both IDEs list what the
|
|
38
99
|
last run left to look at: failed scenarios, then healed ones, with the
|
|
39
100
|
step that failed. VS Code opens the screenshot in its image preview on
|