@unotest/viewer 0.19.0 → 0.20.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 CHANGED
@@ -1,5 +1,58 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.20.0] - 2026-08-24
4
+
5
+ ### Minor Changes
6
+
7
+ - 7957469: A status of its own for tests that are supposed to fail, and tiles that fade with age.
8
+
9
+ **`// @expect-fail`.** A scenario can declare that failing IS its assertion.
10
+ The marker lives in the comment block before the first code — with the
11
+ mandatory header (right after the colour line) or without one. The parser is
12
+ `parseScenarioAnnotations` in `@unotest/protocol`; `ScenarioMeta` gains an
13
+ `expectFail` field.
14
+
15
+ Such a scenario carries its own status in the viewer (`expected`, purple):
16
+ it stays out of the FAILED counter, out of the "failing now" badge and out
17
+ of the "Failing now" section. The inverse case — a marked test that
18
+ **passed** — turns red: whatever it was guarding stopped breaking and nobody
19
+ found out. One rule (`scenarioHealthStatus`) drives the dashboard, the
20
+ scenario tree and the badge, so the three cannot drift apart.
21
+
22
+ The runner does not interpret the marker: exit code and run status are
23
+ unchanged. The run really did fail — it is the test itself that is fine.
24
+
25
+ **Fading.** An overview tile dims as its last result ages: four steps (hour /
26
+ day / week / older) set the strength of the fill itself — 46 / 30 / 19 / 11%
27
+ of the status colour. The 11% floor keeps an old red still red. The time of
28
+ the last run is now part of the tile's accessible name — colour is the one
29
+ channel a screen reader does not have.
30
+
31
+ ### Patch Changes
32
+
33
+ - aab65a5: A failure in the first test of a file is no longer lost, and the dashboard no longer waits for F5.
34
+
35
+ **One run, one `run:finished`.** The event was written by the executor's
36
+ per-entry tap, so a file with four `test_*()` functions left four terminal
37
+ events in `steps.jsonl`. Every consumer reads the last one — so `collection`
38
+ reported a scenario green whenever the final function passed and the first
39
+ one failed. The runner now writes the event once, folding the outcomes of
40
+ every entry: `failed` > `interrupted` > `aborted` > `completed`. A run that
41
+ never got started (no entry function, browser failed to launch) writes a
42
+ terminal event too — its artifact used to read as "the process died".
43
+
44
+ **The viewer asks for the index again.** The first `load()` could land while
45
+ the server was still rebuilding the run index: the answer was "no runs", and
46
+ nobody asked again — WS only reports a run starting and finishing. On a
47
+ project with history the whole overview showed "never run" until a page
48
+ reload. `indexReady: false` now schedules a retry with a 0.5s → 30s backoff,
49
+ until the first ready answer.
50
+
51
+ - Updated dependencies [7957469]
52
+ - Updated dependencies [c6efd92]
53
+ - @unotest/protocol@0.20.0
54
+ - @unotest/dsl@0.20.0
55
+
3
56
  ## [0.19.0] - 2026-08-23
4
57
 
5
58
  ### Minor Changes