@sedum-dev/reporters 0.1.0-alpha.18 → 0.1.0-alpha.21

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/dist/index.d.ts CHANGED
@@ -89,13 +89,18 @@ declare function renderMarkdown(input: RunResult, options?: MarkdownReportOption
89
89
  /** Raw text; each renderer escapes it for its output format. */
90
90
  declare function visionSummary(step: ResultStep): string | null;
91
91
  declare function usageLines(result: RunResult): string[];
92
- /** How a test reads in a report, from most to least urgent. */
93
- type TestStatus = "failed" | "incomplete" | "flagged" | "passed";
92
+ /**
93
+ * How a test reads in a report, from most to least urgent. `non-blocking`
94
+ * is a failed or errored test that `--non-blocking-labels` kept from
95
+ * deciding the run.
96
+ */
97
+ type TestStatus = "failed" | "incomplete" | "non-blocking" | "flagged" | "passed";
94
98
  declare function testStatus(test: ResultTest): TestStatus;
95
99
  declare function testStatusLabel(test: ResultTest): string;
96
100
  /**
97
- * Failed first, then tests that never reached a verdict, then flagged passes.
98
- * An incomplete test says nothing about the app yet, so it outranks a pass.
101
+ * Failed first, then tests that never reached a verdict, then non-blocking
102
+ * failures, then flagged passes. An incomplete test says nothing about the
103
+ * app yet, so it outranks a pass.
99
104
  */
100
105
  declare function testOrder(test: ResultTest): number;
101
106
  /**
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@ import { validateRunResult as validateRunResult5 } from "@sedum-dev/core";
3
3
 
4
4
  // src/html.ts
5
5
  import {
6
+ nonBlockingFailure as nonBlockingFailure2,
6
7
  validateRunResult
7
8
  } from "@sedum-dev/core";
8
9
 
@@ -10,6 +11,7 @@ import {
10
11
  var REPORT_CSS = '\n:root{\n --paper:#F6F4ED;--paper2:#EDEAE0;--card:#FBFAF5;--ink:#1A2420;--soft:#57655C;\n --rule:#D9D4C5;--strong:#1A2420;--green:#1D5B3E;--green2:#2E7D52;\n --signal:#C24328;--gold:#B4841F;--wash:#E8EEE7;--btn-text:#F6F4ED;\n --step-action:#756B58;--step-measure:#B4841F;--step-remember:#39758A;\n --serif:"Fraunces",Georgia,"Times New Roman",serif;\n --sans:"Inter","Helvetica Neue",Helvetica,"Segoe UI",Arial,sans-serif;\n --mono:"IBM Plex Mono",ui-monospace,"SF Mono",SFMono-Regular,Menlo,monospace;\n --gut:clamp(1.25rem,4vw,4rem);--max:1160px;\n}\n@media (prefers-color-scheme:dark){\n :root:not([data-theme="light"]){\n --paper:#0F1613;--paper2:#161F1A;--card:#131C17;--ink:#EBE9DE;--soft:#9CAAA0;\n --rule:#2B3730;--strong:#EBE9DE;--green:#6FB58C;--green2:#8CC9A6;--signal:#E46A4B;\n --gold:#D9B662;--wash:#1B2721;--btn-text:#0F1613;\n --step-action:#C7B99B;--step-measure:#D9B662;--step-remember:#82C0D2;\n }\n}\n:root[data-theme="dark"]{\n --paper:#0F1613;--paper2:#161F1A;--card:#131C17;--ink:#EBE9DE;--soft:#9CAAA0;\n --rule:#2B3730;--strong:#EBE9DE;--green:#6FB58C;--green2:#8CC9A6;--signal:#E46A4B;\n --gold:#D9B662;--wash:#1B2721;--btn-text:#0F1613;\n --step-action:#C7B99B;--step-measure:#D9B662;--step-remember:#82C0D2;\n}\n*{box-sizing:border-box}\nbody{margin:0;background:var(--paper);color:var(--ink);font-family:var(--sans);\n font-size:16px;line-height:1.6;-webkit-font-smoothing:antialiased}\n::selection{background:var(--green);color:var(--btn-text)}\nh1,h2,h3{font-family:var(--serif);font-weight:500;letter-spacing:-0.015em;margin:0;\n font-optical-sizing:auto;text-wrap:balance}\nh1{font-size:clamp(2.2rem,5vw,3.6rem);line-height:1.02;letter-spacing:-0.022em}\nh2{font-size:clamp(1.3rem,2.4vw,1.75rem);line-height:1.1}\np{margin:0;max-width:64ch}\n.wrap{max-width:var(--max);margin:0 auto;padding-inline:var(--gut)}\n.label{font-family:var(--mono);font-size:.68rem;font-weight:500;letter-spacing:.16em;\n text-transform:uppercase;color:var(--soft)}\n.num{font-family:var(--mono);font-variant-numeric:tabular-nums}\n.soft{color:var(--soft)}\n\n.mast{position:sticky;top:0;z-index:20;background:var(--paper);\n border-bottom:1px solid var(--rule)}\n.mast .wrap{display:flex;align-items:center;justify-content:space-between;gap:1.5rem;\n padding-block:.8rem;flex-wrap:wrap}\n.mark{display:flex;align-items:center;gap:.55rem;text-decoration:none;\n font-family:var(--serif);font-weight:600;font-size:1.35rem;letter-spacing:-0.01em;\n color:var(--ink)}\n.mark svg{width:20px;height:20px;color:var(--green)}\n.crumb{font-family:var(--mono);font-size:.68rem;letter-spacing:.13em;\n text-transform:uppercase;color:var(--soft)}\n.tgl{background:none;border:1.5px solid var(--rule);color:var(--soft);width:32px;\n height:32px;border-radius:50%;cursor:pointer;display:grid;place-items:center;padding:0}\n.tgl:hover{border-color:var(--green);color:var(--green)}\n.mast-actions{display:flex;align-items:center;gap:1rem}\n\n.head{padding-block:clamp(2.4rem,5vw,3.8rem) clamp(1.6rem,3vw,2.4rem)}\n.rule-heavy{height:3px;background:var(--strong);margin-bottom:clamp(1.6rem,3vw,2.2rem)}\n.head h1{margin-bottom:1rem}\n.head h1 em{font-style:italic}\n.head h1 .v-ok{color:var(--green)}\n.head h1 .v-marginal{color:var(--gold)}\n.head h1 .v-diverged{color:var(--gold)}\n.head h1 .v-failed{color:var(--signal)}\n.lede{font-size:1.05rem;line-height:1.55;color:var(--soft);max-width:62ch}\n.lede .num{color:var(--ink)}\n\n.strip{display:flex;flex-wrap:wrap;gap:1.5rem 2.8rem;border-top:1.5px solid var(--strong);\n border-bottom:1px solid var(--rule);padding-block:1.4rem;margin-top:2rem}\n.strip>div{display:flex;flex-direction:column;gap:.35rem}\n.strip .num{font-size:1.5rem;letter-spacing:-0.01em}\n.strip .num small{font-size:.9rem;color:var(--soft)}\n.strip .kept .num{color:var(--green)}\n.strip .meter .num{color:var(--soft);text-decoration:line-through}\n\n.filters{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:1.4rem}\n.filters button{font-family:var(--mono);font-size:.66rem;letter-spacing:.12em;\n text-transform:uppercase;background:none;border:1.5px solid var(--rule);color:var(--soft);\n padding:.4rem .7rem;cursor:pointer}\n.filters button:hover{border-color:var(--green);color:var(--green)}\n.filters button[aria-current]{border-color:var(--strong);color:var(--ink);background:var(--paper2)}\n.filters .expand-all{margin-left:auto}\n.filters .expand-all[aria-pressed="true"]{border-color:var(--green);color:var(--green)}\n.test[hidden]{display:none}\n\n.test{border-bottom:1px solid var(--rule);padding-block:clamp(2rem,4vw,3rem)}\n.test-body{display:block}\n.test-body>summary{list-style:none;cursor:pointer}\n.test-body>summary::-webkit-details-marker{display:none}\n.test-head{display:flex;justify-content:space-between;align-items:flex-end;gap:1.5rem;\n flex-wrap:wrap;position:relative;padding-right:1.6rem}\n.test-head::after{content:"";position:absolute;right:0;top:.3rem;width:.6rem;height:.6rem;\n border-right:1.5px solid var(--soft);border-bottom:1.5px solid var(--soft);\n transform:rotate(45deg);transition:transform .15s ease}\n.test-body[open]>summary .test-head::after{transform:rotate(-135deg)}\n.test-head:hover::after{border-color:var(--ink)}\n.test-head .label{display:block;margin-bottom:.5rem}\n.test-head-right{display:flex;align-items:center;gap:.9rem}\n.test-summary{display:none}\n.test-body:not([open]) .test-summary{display:inline}\n.badge{font-family:var(--mono);font-size:.64rem;font-weight:500;letter-spacing:.15em;\n text-transform:uppercase;padding:.4rem .7rem;border:1.5px solid;white-space:nowrap}\n.b-ok{border-color:var(--green);color:var(--green)}\n.b-marginal{border-color:var(--gold);color:var(--gold)}\n.b-diverged{border-color:var(--gold);color:var(--gold)}\n.b-failed{border-color:var(--signal);background:var(--signal);color:var(--paper)}\n.test-content{padding-top:1px}\n.test-meta{display:flex;flex-wrap:wrap;gap:.4rem 1.4rem;margin-top:1rem;\n letter-spacing:.1em}\n.test-meta span{white-space:nowrap}\n\n.tablewrap{overflow-x:auto;margin-top:1.6rem;border-top:1.5px solid var(--strong)}\ntable{border-collapse:collapse;width:100%}\n.steps{min-width:780px}\n.steps th{font-family:var(--mono);font-weight:500;font-size:.62rem;letter-spacing:.15em;\n text-transform:uppercase;color:var(--soft);text-align:left;padding:.55rem .8rem .55rem 0;\n border-bottom:1px solid var(--rule)}\n.steps td{padding:.4rem .8rem .4rem 0;border-bottom:1px solid var(--rule);\n vertical-align:top;font-size:.875rem;line-height:1.45}\n.steps tr:last-child td{border-bottom:0}\n.steps .ix{width:2.2rem;color:var(--soft);font-size:.75rem;padding-top:.5rem}\n.steps .sym{width:1.6rem;font-family:var(--mono);font-size:.95rem;padding-top:.32rem}\n.steps td.step .cell{display:grid;grid-template-columns:5.5rem 1fr;column-gap:.4rem}\n.steps td.step .cell>*{grid-column:2}\n.steps .detail{font-family:var(--mono);font-size:.7rem;line-height:1.5;color:var(--soft);\n margin-top:.1rem}\n.s-failed .detail{color:var(--signal)}\n.s-ok .sym{color:var(--green)}\n.s-marginal .sym,.s-diverged .sym{color:var(--gold)}\n.s-failed .sym{color:var(--signal)}\n.steps .step{min-width:22rem}\n/* Scores, durations and costs are read as one token; never break one. */\n.steps td.num,.steps th{white-space:nowrap}\n.kind{font-family:var(--mono);font-size:.62rem;letter-spacing:.12em;text-transform:uppercase;\n color:var(--soft);grid-column:1!important;justify-self:start;align-self:start;\n padding:.13rem .35rem;border:1px solid var(--rule);background:var(--paper2)}\n.kind-action{--kind-color:var(--step-action)}\n.kind-verify{--kind-color:var(--green)}\n.kind-measure{--kind-color:var(--step-measure)}\n.kind-remember{--kind-color:var(--step-remember)}\n.kind-action,.kind-verify,.kind-measure,.kind-remember{\n color:var(--kind-color);border-color:var(--kind-color);\n background:color-mix(in srgb,var(--kind-color) 10%,var(--paper))}\n.what{color:var(--ink)}\n.what.claim{font-family:var(--serif);font-style:italic;font-size:.98rem;\n line-height:1.3}\n.src{font-family:var(--mono);font-size:.6rem;letter-spacing:.12em;text-transform:uppercase;\n padding:.2rem .42rem;border:1px solid var(--rule);color:var(--soft);white-space:nowrap}\n.src-model{border-color:var(--green);color:var(--green)}\n.src-cache{border-color:var(--rule);color:var(--soft);background:var(--paper2)}\n.src-none{border-color:transparent}\n.steps td.p{width:9rem}\n.pwrap{display:flex;align-items:center;gap:.6rem;padding-top:.3rem}\n.ptrack{position:relative;flex:1;height:9px;background:var(--paper2);min-width:4.5rem;\n box-shadow:inset 0 0 0 1px var(--rule)}\n.pfill{position:absolute;left:0;top:0;bottom:0}\n.pfill.ok{background:var(--green)}\n.pfill.marginal,.pfill.diverged{background:var(--gold)}\n.pfill.failed{background:var(--signal)}\n.pfill.measure{background:var(--soft)}\n.tick{position:absolute;top:-3px;bottom:-3px;width:1px;background:var(--ink);opacity:.45}\n.pfill{z-index:0}.tick{z-index:1}\n.tick.fail{background:var(--signal);opacity:.7}\n.tick.pass{background:var(--ink);opacity:.5}\n.pnum{font-family:var(--mono);font-variant-numeric:tabular-nums;font-size:.8rem;\n min-width:2.4rem}\n.steps tr.s-failed td{background:color-mix(in srgb,var(--signal) 7%,transparent)}\n.steps tr.s-marginal td,.steps tr.s-diverged td{\n background:color-mix(in srgb,var(--gold) 9%,transparent)}\n\n.goal{margin-top:1.5rem;border-left:3px solid var(--green);padding:.15rem 0 .15rem 1.3rem}\n.goal .label{display:block;margin-bottom:.5rem}\n.goal-text{font-family:var(--serif);font-style:italic;\n font-size:clamp(1.15rem,2vw,1.45rem);line-height:1.35;max-width:52ch;color:var(--ink)}\n.goal-until{margin-top:.9rem;font-size:.9rem;color:var(--soft);max-width:60ch}\n.goal-until .label{display:inline;margin-right:.6rem}\n\n.replay{margin:1.6rem 0 0;padding:0;border:1.5px solid var(--strong);background:var(--card)}\n/* A fixed height, not an aspect ratio: a full-width 1280x900 frame is ~730px\n tall and pushes the step table off the screen, which is the wrong thing to\n put first. object-fit:contain letterboxes whatever shape the viewport was. */\n.replay .screen{background:var(--paper2);height:min(52vh,430px);overflow:hidden;\n position:relative}\n/* Two layers, because swapping an <img> src cannot transition. The incoming\n frame is decoded underneath at opacity 0 and then faded up, so a step change\n reads as a dissolve rather than a jump cut. */\n.replay .layer{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;\n display:block;opacity:0;transition:opacity var(--fade,260ms) ease}\n.replay .layer.on{opacity:1}\n@media (prefers-reduced-motion:reduce){.replay .layer{transition:none}}\n/* The element the step acted on. Green because that is what this design uses\n for "resolved"; the double ring keeps it legible on a light page and a dark\n one, since the frame underneath can be any colour at all. */\n.replay .mark{position:absolute;border:2px solid var(--green);\n box-shadow:0 0 0 1px rgba(255,255,255,.9), 0 0 0 3px rgba(29,91,62,.28);\n pointer-events:none;transition:opacity var(--fade,260ms) ease}\n.replay .mark[hidden]{display:none}\n/* The default height keeps the step table on screen, which is the right\n thing to put first \u2014 but a 1280x900 frame letterboxed into 430px is small\n for reading a form or a price. `expand` trades the table for the frame,\n near enough to full height to see detail without leaving the page or\n losing the controls, the strip and the row-click wiring. */\n.replay.big .screen{height:min(86vh,900px)}\n/* Expanding scrolls the figure to the top of the viewport, and the masthead is\n sticky \u2014 without this the first inch of the frame lands underneath it. */\n.replay{scroll-margin-top:4.2rem}\n.replay .grow{margin-left:.35rem}\n.replay .speeds{display:flex;gap:.25rem;margin-left:auto}\n.replay .speeds .pb{padding:.25rem .45rem}\n.replay .pb[aria-current]{border-color:var(--strong);color:var(--ink);background:var(--paper2)}\n.replay .controls{display:flex;align-items:center;gap:.7rem;padding:.6rem .8rem;\n border-top:1px solid var(--rule);flex-wrap:wrap}\n.replay .pb{font-family:var(--mono);font-size:.7rem;background:none;cursor:pointer;\n border:1.5px solid var(--rule);color:var(--soft);padding:.25rem .55rem;line-height:1}\n.replay .pb:hover{border-color:var(--green);color:var(--green)}\n.replay .counter{font-family:var(--mono);font-size:.68rem;color:var(--soft);white-space:nowrap}\n.replay .frame-label{font-family:var(--mono);font-size:.68rem;color:var(--ink);margin:0;\n min-width:8rem;max-width:46ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n.replay .strip{display:flex;gap:2px;padding:0 .8rem .7rem}\n.replay .fr{flex:1;height:7px;border:0;padding:0;cursor:pointer;background:var(--rule)}\n.replay .fr-ok{background:var(--green);opacity:.35}\n.replay .fr-marginal,.replay .fr-diverged{background:var(--gold);opacity:.45}\n.replay .fr-failed{background:var(--signal);opacity:.6}\n.replay .fr[aria-current]{opacity:1;outline:1px solid var(--ink);outline-offset:1px}\n.steps tr[data-step]{cursor:default}\n.has-replay .steps tr[data-step]{cursor:pointer}\n.has-replay .steps tr[data-step]:hover td{background:var(--wash)}\n.steps tr[aria-current] td:first-child{box-shadow:inset 3px 0 0 var(--green)}\n.steps tr[aria-current] td{background:var(--wash)}\n/* Printing has no controls to shrink it again, and 86vh of paper is a page\n of letterbox \u2014 expanded or not, print gets the ordinary height. */\n@media print{.replay .controls,.replay .strip{display:none}\n .replay.big .screen{height:430px}}\n\n\n.legend{display:flex;flex-wrap:wrap;gap:.6rem 1.6rem;margin-top:1.2rem;\n font-family:var(--mono);font-size:.66rem;line-height:1.6;color:var(--soft);\n max-width:76ch}\n.legend b{font-weight:500;color:var(--ink)}\n\n.receipt-band{padding-block:clamp(2.4rem,5vw,4rem)}\n.receipt-grid{display:grid;grid-template-columns:360px;\n gap:clamp(1.8rem,4vw,3.4rem);align-items:start}\n@media (max-width:820px){.receipt-grid{grid-template-columns:1fr}}\n/* A bordered card, not a torn-paper cutout. The receipt reads as one through\n its type and its rules \u2014 the mono column, the dashed separators, the centred\n header and the inverted total \u2014 which survives print and dark mode. A zigzag\n bottom edge needs either a mask that clips the border or an overlay painted\n in the page colour, and both fight the border this design is built on. */\n.receipt{background:var(--card);border:1.5px solid var(--strong);font-family:var(--mono);\n font-size:.76rem;line-height:1.75;padding:1.6rem 1.5rem 1.8rem;position:relative}\n.r-center{text-align:center}\n.r-head{letter-spacing:.3em;text-transform:uppercase;font-size:.8rem;color:var(--ink)}\n.r-sub{color:var(--soft);font-size:.68rem}\n.r-rule{border:0;border-top:1px dashed var(--rule);margin:.9rem 0}\n.r-row{display:flex;justify-content:space-between;gap:1rem;font-variant-numeric:tabular-nums}\n.r-row .grow{flex:1}\n.r-row.indent{padding-left:1.1rem;color:var(--soft);font-size:.68rem;margin-top:-.35rem}\n.r-total{font-size:.92rem;font-weight:500;color:var(--ink)}\n.r-strike{color:var(--soft);text-decoration:line-through}\n.r-kept{background:var(--strong);color:var(--paper);margin:.9rem -1.5rem 0;\n padding:.75rem 1.5rem;display:flex;justify-content:space-between;gap:1rem;font-size:.8rem}\n.barcode{height:40px;margin-top:1.3rem;opacity:.85;\n background:repeating-linear-gradient(90deg,var(--ink) 0 2px,transparent 2px 5px,\n var(--ink) 5px 8px,transparent 8px 10px,var(--ink) 10px 11px,transparent 11px 15px,\n var(--ink) 15px 18px,transparent 18px 21px)}\n@media print{\n .mast,.tgl{position:static}\n body{background:#fff}\n .test{break-inside:avoid}\n .test-head::after{display:none}\n .test-summary{display:none!important}\n .test-body:not([open])>*:not(summary){display:block!important}\n}\n';
11
12
 
12
13
  // src/shared.ts
14
+ import { nonBlockingFailure } from "@sedum-dev/core";
13
15
  function visionSummary(step) {
14
16
  const vision = step.locator?.vision;
15
17
  if (!vision) return null;
@@ -57,6 +59,7 @@ function selectedAttempt(test) {
57
59
  return test.attempts.find((attempt) => attempt.id === test.selectedAttemptId);
58
60
  }
59
61
  function testStatus(test) {
62
+ if (nonBlockingFailure(test)) return "non-blocking";
60
63
  if (test.verdict === "failed") return "failed";
61
64
  if (test.verdict === null) return "incomplete";
62
65
  if (test.flags.length) return "flagged";
@@ -64,10 +67,18 @@ function testStatus(test) {
64
67
  }
65
68
  function testStatusLabel(test) {
66
69
  const value = testStatus(test);
70
+ if (value === "non-blocking")
71
+ return test.verdict === "failed" ? "failed, non-blocking" : "could not run, non-blocking";
67
72
  return value === "flagged" ? "passed, flagged" : value;
68
73
  }
69
74
  function testOrder(test) {
70
- return { failed: 0, incomplete: 1, flagged: 2, passed: 3 }[testStatus(test)];
75
+ return {
76
+ failed: 0,
77
+ incomplete: 1,
78
+ "non-blocking": 2,
79
+ flagged: 3,
80
+ passed: 4
81
+ }[testStatus(test)];
71
82
  }
72
83
  function runIsTrustworthy(result) {
73
84
  return result.state === "completed" && result.error === null && result.verdict !== null && result.totals.executedTests > 0;
@@ -155,22 +166,27 @@ var REPORT_JS = `
155
166
  try { localStorage.setItem('sedum-theme', root.dataset.theme); } catch {}
156
167
  });
157
168
 
169
+ const showOnly = (filter) => {
170
+ document.querySelectorAll('[data-group]').forEach(head => {
171
+ head.hidden = filter !== 'all' && head.dataset.group !== filter;
172
+ });
173
+ document.querySelectorAll('.test').forEach(section => {
174
+ const show = filter === 'all' || section.dataset.status === filter;
175
+ section.hidden = !show;
176
+ const body = section.querySelector('.test-body');
177
+ if (body) body.open = filter === 'all' ? section.dataset.status === 'failed' : show;
178
+ });
179
+ };
158
180
  const filters = document.querySelector('.filters');
159
181
  filters?.addEventListener('click', (event) => {
160
182
  const button = event.target.closest('button');
161
183
  if (!button) return;
162
184
  if (button.dataset.filter) {
163
- const filter = button.dataset.filter;
164
185
  filters.querySelectorAll('[data-filter]').forEach(b => {
165
186
  if (b === button) b.setAttribute('aria-current', 'true');
166
187
  else b.removeAttribute('aria-current');
167
188
  });
168
- document.querySelectorAll('.test').forEach(section => {
169
- const show = filter === 'all' || section.dataset.status === filter;
170
- section.hidden = !show;
171
- const body = section.querySelector('.test-body');
172
- if (body) body.open = filter === 'all' ? section.dataset.status === 'failed' : show;
173
- });
189
+ showOnly(button.dataset.filter);
174
190
  }
175
191
  if (button.dataset.act === 'expand-all') {
176
192
  const open = button.getAttribute('aria-pressed') !== 'true';
@@ -397,6 +413,13 @@ function attemptSection(test, attempt, frames) {
397
413
  const rows = attempt.steps.map((step) => stepRow(step, attempt.id)).join("");
398
414
  return '<details class="attempt"' + (current ? " open" : "") + "><summary>attempt " + attempt.ordinal + " \xB7 " + esc(attempt.verdict ?? attempt.state) + (attempt.flags.length ? " \xB7 flagged" : "") + (current ? " \xB7 selected" : "") + " \xB7 " + duration(attempt.elapsedMs) + "</summary>" + (attempt.timeoutReason ? '<p class="problem">timeout: ' + esc(attempt.timeoutReason) + "</p>" : "") + (attempt.error ? '<p class="problem">' + esc(attempt.error.message) + "</p>" : "") + problems + replay(test, attempt, frames) + (rows ? '<div class="tablewrap"><table class="steps"><thead><tr><th class="ix">#</th><th></th><th>step</th><th>source</th><th class="p">p</th><th>conf</th><th>ms</th><th>cost</th></tr></thead><tbody>' + rows + "</tbody></table></div>" : '<p class="empty">No steps executed in this attempt.</p>') + "</details>";
399
415
  }
416
+ var BADGE_TONE = {
417
+ failed: "failed",
418
+ incomplete: "diverged",
419
+ "non-blocking": "marginal",
420
+ flagged: "marginal",
421
+ passed: "ok"
422
+ };
400
423
  function testSection(test, index, frames) {
401
424
  const tone = testStatus(test);
402
425
  const attempt = selectedAttempt(test);
@@ -409,7 +432,7 @@ function testSection(test, index, frames) {
409
432
  steps.length + " steps",
410
433
  test.attempts.length > 1 && test.attempts.length + " attempts"
411
434
  ].filter(Boolean).join(" \xB7 ");
412
- return '<section class="test" id="flow-' + index + '" data-status="' + tone + '"><details class="test-body"' + (tone === "failed" || tone === "incomplete" ? " open" : "") + '><summary class="test-head"><div><span class="label">flow \xB7 ' + esc(test.file) + "</span><h2>" + esc(test.description || test.file) + '</h2></div><span class="test-head-right"><span class="test-summary label">' + esc(summary) + '</span><span class="badge b-' + (tone === "flagged" ? "marginal" : tone === "incomplete" ? "diverged" : tone === "passed" ? "ok" : "failed") + '">' + esc(testStatusLabel(test)) + '</span></span></summary><div class="test-content"><p class="test-meta label"><span>' + esc(summary) + "</span><span>" + esc(test.file) + "</span>" + (test.tags.length ? "<span>" + esc(test.tags.join(", ")) + "</span>" : "") + '</p><p class="rerun"><span class="label">rerun</span> <code>sedum run ' + esc(rerunArgs(test)) + "</code></p>" + (test.goal ? '<section class="goal goal-context" aria-label="Goal and verification"><h3 class="label">Goal</h3><p class="goal-text">' + esc(test.goal.text) + '</p><div class="goal-until"><h3 class="label">Verify</h3><p class="goal-claim">' + esc(test.goal.verify) + "</p></div></section>" : "") + test.attempts.map((item) => attemptSection(test, item, frames)).join("") + (!test.attempts.length ? '<p class="empty">This flow was selected but did not execute.</p>' : "") + "</div></details></section>";
435
+ return '<section class="test" id="flow-' + index + '" data-status="' + tone + '"><details class="test-body"' + (tone === "failed" || tone === "incomplete" ? " open" : "") + '><summary class="test-head"><div><span class="label">flow \xB7 ' + esc(test.file) + "</span><h2>" + esc(test.description || test.file) + '</h2></div><span class="test-head-right"><span class="test-summary label">' + esc(summary) + '</span><span class="badge b-' + BADGE_TONE[tone] + '">' + esc(testStatusLabel(test)) + '</span></span></summary><div class="test-content"><p class="test-meta label"><span>' + esc(summary) + "</span><span>" + esc(test.file) + "</span>" + (test.tags.length ? "<span>" + esc(test.tags.join(", ")) + "</span>" : "") + '</p><p class="rerun"><span class="label">rerun</span> <code>sedum run ' + esc(rerunArgs(test)) + "</code></p>" + (test.goal ? '<section class="goal goal-context" aria-label="Goal and verification"><h3 class="label">Goal</h3><p class="goal-text">' + esc(test.goal.text) + '</p><div class="goal-until"><h3 class="label">Verify</h3><p class="goal-claim">' + esc(test.goal.verify) + "</p></div></section>" : "") + test.attempts.map((item) => attemptSection(test, item, frames)).join("") + (!test.attempts.length ? '<p class="empty">This flow was selected but did not execute.</p>' : "") + "</div></details></section>";
413
436
  }
414
437
  function receipt(result) {
415
438
  const all = calls(result);
@@ -464,6 +487,7 @@ function receipt(result) {
464
487
  ) + '</span></div><div class="r-footnote">recorded provider usage across all attempts</div><div class="barcode" aria-hidden="true"></div></article></div></section>';
465
488
  }
466
489
  var extraCss = `
490
+ .group-head{padding-top:clamp(2rem,4vw,3rem);border-bottom:1.5px solid var(--strong);padding-bottom:.8rem}.group-head[hidden]{display:none}
467
491
  .test-head-right{display:flex;align-items:center;gap:1.2rem}.test-summary{max-width:32ch;text-align:right}
468
492
  .goal-context .goal-text,.goal-context .goal-claim{white-space:pre-wrap;overflow-wrap:anywhere}
469
493
  .goal-context .goal-until .label{display:block}
@@ -494,15 +518,29 @@ var extraCss = `
494
518
  .test[hidden]{display:block!important}.test-body:not([open])>.test-content{display:block!important}.attempt:not([open])>*:not(summary){display:block!important}.step-extra details:not([open])>*:not(summary){display:block!important}.filters,.replay .controls,.replay .strip{display:none!important}.test{break-inside:auto}.receipt{break-inside:avoid}
495
519
  }
496
520
  `;
521
+ var NON_BLOCKING_HEAD = '<section class="group-head" data-group="non-blocking"><span class="label">non-blocking failures</span><p class="soft">These tests have a <code>--non-blocking-labels</code> tag. They ran and failed, but they do not fail the run.</p></section>';
522
+ function headlineVerdict(counts2) {
523
+ const [tone, text] = counts2.failed ? ["failed", counts2.failed + " failed"] : counts2["non-blocking"] ? ["marginal", counts2["non-blocking"] + " non-blocking failed"] : counts2.flagged ? ["marginal", counts2.flagged + " flagged"] : ["ok", "all passed"];
524
+ return '<em class="v-' + tone + '">' + text + "</em>";
525
+ }
497
526
  function renderHtmlBody(result, options = {}) {
498
527
  const value = validateRunResult(result);
499
528
  const tests = value.tests.map((test, index) => ({ test, index })).sort((a, b) => testOrder(a.test) - testOrder(b.test));
500
- const counts2 = { failed: 0, flagged: 0, passed: 0, incomplete: 0 };
529
+ const counts2 = {
530
+ failed: 0,
531
+ flagged: 0,
532
+ passed: 0,
533
+ incomplete: 0,
534
+ "non-blocking": 0
535
+ };
501
536
  for (const test of value.tests) counts2[testStatus(test)]++;
502
- const headline = value.state === "error" || value.state === "interrupted" ? value.tests.length + ' flows, <em class="v-failed">' + esc(value.state) + "</em>." : value.tests.length + " " + (value.tests.length === 1 ? "flow" : "flows") + ', <em class="v-' + (counts2.failed ? "failed" : counts2.flagged ? "marginal" : "ok") + '">' + (counts2.failed ? counts2.failed + " failed" : counts2.flagged ? counts2.flagged + " flagged" : "all passed") + "</em>.";
537
+ const firstNonBlocking = tests.findIndex(
538
+ ({ test }) => nonBlockingFailure2(test)
539
+ );
540
+ const headline = value.state === "error" || value.state === "interrupted" ? value.tests.length + ' flows, <em class="v-failed">' + esc(value.state) + "</em>." : value.tests.length + " " + (value.tests.length === 1 ? "flow" : "flows") + ", " + headlineVerdict(counts2) + ".";
503
541
  const chips = [
504
542
  '<button type="button" data-filter="all" aria-current="true">all \xB7 ' + value.tests.length + "</button>",
505
- ...["failed", "incomplete", "flagged", "passed"].filter((key) => counts2[key] > 0).map(
543
+ ...["failed", "incomplete", "non-blocking", "flagged", "passed"].filter((key) => counts2[key] > 0).map(
506
544
  (key) => '<button type="button" data-filter="' + key + '">' + key + " \xB7 " + counts2[key] + "</button>"
507
545
  )
508
546
  ];
@@ -512,15 +550,15 @@ function renderHtmlBody(result, options = {}) {
512
550
  ) + "</p>"
513
551
  ).join("");
514
552
  const runError = value.error ? '<p class="problem"><b>' + esc(value.error.code) + "</b> " + esc(value.error.message) + "</p>" : "";
515
- const lede = counts2.failed + " failed \xB7 " + counts2.flagged + " flagged \xB7 " + counts2.passed + " passed" + (counts2.incomplete ? " \xB7 " + counts2.incomplete + " incomplete" : "") + ". Open a flow for its attempts, steps, evidence and exact decision lines.";
553
+ const lede = counts2.failed + " failed \xB7 " + counts2.flagged + " flagged \xB7 " + counts2.passed + " passed" + (counts2.incomplete ? " \xB7 " + counts2.incomplete + " incomplete" : "") + (counts2["non-blocking"] ? " \xB7 " + counts2["non-blocking"] + " non-blocking failed" : "") + ". Open a flow for its attempts, steps, evidence and exact decision lines.";
516
554
  return '<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="color-scheme" content="light dark"><meta name="robots" content="noindex"><title>Sedum \u2014 run report \xB7 ' + esc(value.runId) + "</title><style>" + REPORT_FONTS + REPORT_CSS + extraCss + '</style></head><body><header class="mast"><div class="wrap"><a class="mark" href="#top">' + mark + 'sedum</a><div class="mast-actions"><span class="crumb">run report \xB7 \u2116 ' + esc(value.runId.slice(0, 8).toUpperCase()) + '</span><button class="tgl" type="button" data-theme-toggle aria-label="toggle dark mode">\u25D0</button></div></div></header><main class="wrap" id="top"><section class="head"><div class="rule-heavy"></div><p class="label" style="margin-bottom:1.2rem">' + esc(
517
555
  new Date(value.startedAt).toLocaleString("en-GB", {
518
556
  dateStyle: "medium",
519
557
  timeStyle: "short",
520
558
  timeZone: "UTC"
521
559
  })
522
- ) + " UTC \xB7 run " + esc(value.runId) + "</p><h1>" + headline + '</h1><p class="lede">' + esc(lede) + '</p><div class="strip"><div><span class="label">selected</span><div class="num">' + value.totals.selectedTests + '</div></div><div><span class="label">passed</span><div class="num">' + value.totals.passedTests + '</div></div><div><span class="label">failed</span><div class="num">' + value.totals.failedTests + '</div></div><div><span class="label">flagged steps</span><div class="num">' + value.totals.flaggedSteps + '</div></div><div><span class="label">duration</span><div class="num">' + duration(value.elapsedMs) + '</div></div></div><div class="filters" role="group" aria-label="filter flows">' + chips.join("") + '<button type="button" class="expand-all" data-act="expand-all" aria-pressed="false">expand all</button></div></section>' + runError + issues + tests.map(
523
- ({ test, index }) => testSection(test, index + 1, options.replayFrames)
560
+ ) + " UTC \xB7 run " + esc(value.runId) + "</p><h1>" + headline + '</h1><p class="lede">' + esc(lede) + '</p><div class="strip"><div><span class="label">selected</span><div class="num">' + value.totals.selectedTests + '</div></div><div><span class="label">passed</span><div class="num">' + value.totals.passedTests + '</div></div><div><span class="label">failed</span><div class="num">' + value.totals.failedTests + "</div></div>" + (value.totals.nonBlockingFailedTests === void 0 ? "" : '<div><span class="label">non-blocking failed</span><div class="num">' + value.totals.nonBlockingFailedTests + "</div></div>") + '<div><span class="label">flagged steps</span><div class="num">' + value.totals.flaggedSteps + '</div></div><div><span class="label">duration</span><div class="num">' + duration(value.elapsedMs) + '</div></div></div><div class="filters" role="group" aria-label="filter flows">' + chips.join("") + '<button type="button" class="expand-all" data-act="expand-all" aria-pressed="false">expand all</button></div></section>' + runError + issues + tests.map(
561
+ ({ test, index }, position) => (position === firstNonBlocking ? NON_BLOCKING_HEAD : "") + testSection(test, index + 1, options.replayFrames)
524
562
  ).join("") + (value.tests.length ? "" : '<p class="empty">No flows were recorded for this run.</p>') + receipt(value) + "</main><script>" + REPORT_JS + "</script></body></html>\n";
525
563
  }
526
564
  function renderHtml(input, options = {}) {
@@ -587,6 +625,10 @@ var ReporterLifecycle = class {
587
625
  };
588
626
 
589
627
  // src/terminal.ts
628
+ import {
629
+ isBlocking,
630
+ nonBlockingFailure as nonBlockingFailure3
631
+ } from "@sedum-dev/core";
590
632
  import path from "path";
591
633
  function label(state, verdict2) {
592
634
  return verdict2 === "passed" ? "PASSED" : verdict2 === "failed" ? "FAILED" : state.toUpperCase();
@@ -600,6 +642,12 @@ function coloredLabel(state, verdict2, context) {
600
642
  function flags(value) {
601
643
  return value.length ? ` [${value.join(", ")}]` : "";
602
644
  }
645
+ function attentionHeading(test) {
646
+ return nonBlockingFailure3(test) ? "non-blocking failure" : "needs attention";
647
+ }
648
+ function role(test) {
649
+ return isBlocking(test) ? "" : " (non-blocking)";
650
+ }
603
651
  function source(stack) {
604
652
  return stack.map((item) => `${item.file}:${item.line}`).join(" <- ");
605
653
  }
@@ -621,7 +669,7 @@ function attention(result, context) {
621
669
  continue;
622
670
  reruns.add(rerunArgs(test));
623
671
  lines.push(`
624
- needs attention: ${testLabel(test)}`);
672
+ ${attentionHeading(test)}: ${testLabel(test)}`);
625
673
  for (const step of affectedSteps) {
626
674
  lines.push(
627
675
  ` ${label(step.state, step.verdict)}${flags(step.flags)} ${step.phase} step ${step.index}: ${stepText(step)}`
@@ -718,7 +766,7 @@ function createTerminalReporter(name) {
718
766
  if (name === "steps") return steps;
719
767
  completed++;
720
768
  const attempts = test.attempts.length > 1 ? ` (${test.attempts.length} attempts)` : "";
721
- return `[${completed}/${context.parallel.total}] test ${coloredLabel(test.state, test.verdict, context)}${flags(test.flags)} ${testLabel(test)}${attempts}
769
+ return `[${completed}/${context.parallel.total}] test ${coloredLabel(test.state, test.verdict, context)}${flags(test.flags)}${role(test)} ${testLabel(test)}${attempts}
722
770
  `;
723
771
  };
724
772
  return {
@@ -739,7 +787,7 @@ function createTerminalReporter(name) {
739
787
  }
740
788
  if (event.type === "testCompleted") {
741
789
  if (!parallel)
742
- return name === "list" ? `test ${coloredLabel(event.test.state, event.test.verdict, context)}${flags(event.test.flags)} ${testLabel(event.test)}
790
+ return name === "list" ? `test ${coloredLabel(event.test.state, event.test.verdict, context)}${flags(event.test.flags)}${role(event.test)} ${testLabel(event.test)}
743
791
  ` : "";
744
792
  const retries = context.parallel?.retries ?? 0;
745
793
  if (event.test.verdict === "failed" && event.test.attempts.length <= retries) {
@@ -762,6 +810,7 @@ function createTerminalReporter(name) {
762
810
 
763
811
  // src/markdown.ts
764
812
  import {
813
+ nonBlockingFailure as nonBlockingFailure4,
765
814
  validateRunResult as validateRunResult3
766
815
  } from "@sedum-dev/core";
767
816
  function inline(value) {
@@ -971,14 +1020,38 @@ function flowDetail(test) {
971
1020
  else out.push("No steps executed in the selected attempt.", "");
972
1021
  return out;
973
1022
  }
974
- function verdictLine(result, counts2) {
975
- const verdict2 = result.state === "error" || result.state === "interrupted" || result.state === "running" ? result.state : counts2.failed ? "failed" : counts2.incomplete ? "incomplete" : counts2.flagged ? "passed, flagged" : "passed";
976
- const parts = [
1023
+ function countParts(counts2) {
1024
+ const nonBlocking = counts2["non-blocking"] ? [`${counts2["non-blocking"]} non-blocking failed`] : [];
1025
+ return [
977
1026
  `${counts2.failed} failed`,
978
1027
  `${counts2.incomplete} incomplete`,
1028
+ ...nonBlocking,
979
1029
  `${counts2.flagged} flagged`,
980
1030
  `${counts2.passed} passed`
981
1031
  ];
1032
+ }
1033
+ function attentionSections(items) {
1034
+ const blocking = [];
1035
+ const nonBlocking = [];
1036
+ let number = 0;
1037
+ for (const item of items) {
1038
+ if (!item.attempt) continue;
1039
+ const target = nonBlockingFailure4(item.test) ? nonBlocking : blocking;
1040
+ for (const step of item.steps)
1041
+ target.push(...stepSection(++number, item.test, item.attempt, step));
1042
+ for (const problem of item.bindings)
1043
+ target.push(...problemSection(++number, item.test, problem));
1044
+ if (item.attemptError)
1045
+ target.push(
1046
+ ...attemptErrorSection(++number, item.test, item.attemptError)
1047
+ );
1048
+ }
1049
+ return { blocking, nonBlocking };
1050
+ }
1051
+ var NON_BLOCKING_INTRO = "These tests have a `--non-blocking-labels` tag. They ran and failed, but they do not fail the run.";
1052
+ function verdictLine(result, counts2) {
1053
+ const verdict2 = result.state === "error" || result.state === "interrupted" || result.state === "running" ? result.state : counts2.failed ? "failed" : counts2.incomplete ? "incomplete" : counts2.flagged ? "passed, flagged" : "passed";
1054
+ const parts = countParts(counts2);
982
1055
  const extra = [
983
1056
  `${result.tests.length} ${result.tests.length === 1 ? "flow" : "flows"}`,
984
1057
  result.totals.historicalAttempts ? `${result.totals.historicalAttempts} retried attempts` : null,
@@ -987,12 +1060,29 @@ function verdictLine(result, counts2) {
987
1060
  ].filter(Boolean);
988
1061
  return `**${verdict2}** \u2014 ${parts.join(" \xB7 ")} (${extra.join(", ")})`;
989
1062
  }
1063
+ function nextSteps(state) {
1064
+ if (!state.needsAttention)
1065
+ return [
1066
+ state.nonBlocking ? "Nothing blocks this run. Fix the tests under **Non-blocking failures** before you remove their quarantine tag." : "Nothing needs attention."
1067
+ ];
1068
+ const steps = [
1069
+ "1. Fix the items under **Needs attention** in order; the first is the most urgent.",
1070
+ "2. Open the linked frames to see the page at the moment each step stopped.",
1071
+ "3. Read `result.json` in this folder for every recorded field."
1072
+ ];
1073
+ if (state.reruns.length)
1074
+ steps.push(
1075
+ `4. Rerun: ${code("sedum run " + state.reruns.map(shellArg).join(" "))}`
1076
+ );
1077
+ return steps;
1078
+ }
990
1079
  function renderMarkdownBody(input) {
991
1080
  const result = validateRunResult3(input);
992
1081
  const tests = result.tests.map((test, index) => ({ test, index })).sort((a, b) => testOrder(a.test) - testOrder(b.test) || a.index - b.index).map(({ test }) => test);
993
1082
  const counts2 = {
994
1083
  failed: 0,
995
1084
  incomplete: 0,
1085
+ "non-blocking": 0,
996
1086
  flagged: 0,
997
1087
  passed: 0
998
1088
  };
@@ -1057,20 +1147,16 @@ function renderMarkdownBody(input) {
1057
1147
  );
1058
1148
  out.push("");
1059
1149
  }
1060
- const sections = [];
1061
- let number = 0;
1062
- for (const item of attention2) {
1063
- if (!item.attempt) continue;
1064
- for (const step of item.steps)
1065
- sections.push(...stepSection(++number, item.test, item.attempt, step));
1066
- for (const problem of item.bindings)
1067
- sections.push(...problemSection(++number, item.test, problem));
1068
- if (item.attemptError)
1069
- sections.push(
1070
- ...attemptErrorSection(++number, item.test, item.attemptError)
1071
- );
1072
- }
1150
+ const { blocking: sections, nonBlocking } = attentionSections(attention2);
1073
1151
  if (sections.length) out.push("## Needs attention", "", ...sections);
1152
+ if (nonBlocking.length)
1153
+ out.push(
1154
+ "## Non-blocking failures",
1155
+ "",
1156
+ NON_BLOCKING_INTRO,
1157
+ "",
1158
+ ...nonBlocking
1159
+ );
1074
1160
  out.push("## Flow detail", "");
1075
1161
  out.push(
1076
1162
  "### Model usage (all attempts)",
@@ -1092,24 +1178,19 @@ function renderMarkdownBody(input) {
1092
1178
  const reruns = [
1093
1179
  ...new Set(
1094
1180
  attention2.filter(
1095
- (item) => item.steps.length || item.bindings.length || item.attemptError || testStatus(item.test) !== "passed"
1181
+ (item) => !nonBlockingFailure4(item.test) && (item.steps.length || item.bindings.length || item.attemptError || testStatus(item.test) !== "passed")
1096
1182
  ).map((item) => item.test.file)
1097
1183
  )
1098
1184
  ];
1099
- out.push("## Next steps", "");
1100
- if (!sections.length && !discovery.length && !result.error)
1101
- out.push("Nothing needs attention.");
1102
- else {
1103
- out.push(
1104
- "1. Fix the items under **Needs attention** in order; the first is the most urgent.",
1105
- "2. Open the linked frames to see the page at the moment each step stopped.",
1106
- "3. Read `result.json` in this folder for every recorded field."
1107
- );
1108
- if (reruns.length)
1109
- out.push(
1110
- `4. Rerun: ${code("sedum run " + reruns.map(shellArg).join(" "))}`
1111
- );
1112
- }
1185
+ out.push(
1186
+ "## Next steps",
1187
+ "",
1188
+ ...nextSteps({
1189
+ needsAttention: sections.length > 0 || discovery.length > 0 || !!result.error,
1190
+ nonBlocking: nonBlocking.length > 0,
1191
+ reruns
1192
+ })
1193
+ );
1113
1194
  return out.join("\n") + "\n";
1114
1195
  }
1115
1196
  function renderMarkdown(input, options = {}) {
@@ -1120,6 +1201,8 @@ function renderMarkdown(input, options = {}) {
1120
1201
 
1121
1202
  // src/junit.ts
1122
1203
  import {
1204
+ isBlocking as isBlocking2,
1205
+ nonBlockingFailure as nonBlockingFailure5,
1123
1206
  validateRunResult as validateRunResult4
1124
1207
  } from "@sedum-dev/core";
1125
1208
  var MESSAGE_LIMIT = 512;
@@ -1326,14 +1409,49 @@ function testStatusElement(test, attempt, result, strict, evidenceDirectory) {
1326
1409
  };
1327
1410
  return null;
1328
1411
  }
1412
+ function nonBlockingStatus(test, status) {
1413
+ if (isBlocking2(test) || !status) return status;
1414
+ if (test.verdict === "passed") return null;
1415
+ if (!nonBlockingFailure5(test)) return status;
1416
+ return {
1417
+ element: "skipped",
1418
+ message: `non-blocking ${status.element}: ${status.message}`,
1419
+ body: status.body
1420
+ };
1421
+ }
1422
+ function testProperties(test, result, strict) {
1423
+ const optional = (name, value) => value === false ? [] : [[name, value]];
1424
+ return [
1425
+ ["sedum.run_id", result.runId],
1426
+ ["sedum.test_id", test.id],
1427
+ ["sedum.verdict", test.verdict ?? "none"],
1428
+ ...optional("sedum.state", test.state !== "completed" && test.state),
1429
+ ...optional("sedum.flags", test.flags.length > 0 && test.flags.join(",")),
1430
+ ...optional("sedum.tags", test.tags.length > 0 && test.tags.join(",")),
1431
+ ...optional("sedum.blocking", !isBlocking2(test) && "false"),
1432
+ ["sedum.attempts", String(test.attempts.length)],
1433
+ ["sedum.strict", String(strict)]
1434
+ ];
1435
+ }
1436
+ function runCountProperties(result) {
1437
+ const nonBlocking = result.totals.nonBlockingFailedTests;
1438
+ return [
1439
+ ["sedum.tests.passed", String(result.totals.passedTests)],
1440
+ ["sedum.tests.failed", String(result.totals.failedTests)],
1441
+ ...nonBlocking === void 0 ? [] : [["sedum.tests.non_blocking_failed", String(nonBlocking)]]
1442
+ ];
1443
+ }
1329
1444
  function testSuite(test, result, options) {
1330
1445
  const attempt = selectedAttempt(test);
1331
- const status = testStatusElement(
1446
+ const status = nonBlockingStatus(
1332
1447
  test,
1333
- attempt,
1334
- result,
1335
- options.strict,
1336
- options.evidenceDirectory
1448
+ testStatusElement(
1449
+ test,
1450
+ attempt,
1451
+ result,
1452
+ options.strict,
1453
+ options.evidenceDirectory
1454
+ )
1337
1455
  );
1338
1456
  const output = [];
1339
1457
  if (test.flags.length && attempt) {
@@ -1360,16 +1478,7 @@ function testSuite(test, result, options) {
1360
1478
  file: test.file,
1361
1479
  time: elapsed,
1362
1480
  timestamp: test.attempts[0]?.startedAt ?? result.startedAt,
1363
- properties: [
1364
- ["sedum.run_id", result.runId],
1365
- ["sedum.test_id", test.id],
1366
- ["sedum.verdict", test.verdict ?? "none"],
1367
- ...test.state === "completed" ? [] : [["sedum.state", test.state]],
1368
- ...test.flags.length ? [["sedum.flags", test.flags.join(",")]] : [],
1369
- ...test.tags.length ? [["sedum.tags", test.tags.join(",")]] : [],
1370
- ["sedum.attempts", String(test.attempts.length)],
1371
- ["sedum.strict", String(options.strict)]
1372
- ],
1481
+ properties: testProperties(test, result, options.strict),
1373
1482
  cases: [
1374
1483
  {
1375
1484
  classname: test.file,
@@ -1417,8 +1526,7 @@ function runSuite(result, strict) {
1417
1526
  ["sedum.verdict", result.verdict ?? "none"],
1418
1527
  ["sedum.strict", String(strict)],
1419
1528
  ["sedum.tests.selected", String(selected)],
1420
- ["sedum.tests.passed", String(result.totals.passedTests)],
1421
- ["sedum.tests.failed", String(result.totals.failedTests)],
1529
+ ...runCountProperties(result),
1422
1530
  ["sedum.flagged_steps", String(result.totals.flaggedSteps)],
1423
1531
  ["sedum.flags.low_confidence", String(flags3.low_confidence)],
1424
1532
  ["sedum.flags.contradiction", String(flags3.contradiction)]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sedum-dev/reporters",
3
- "version": "0.1.0-alpha.18",
3
+ "version": "0.1.0-alpha.21",
4
4
  "repository": "https://github.com/sedum-dev/sedum",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -20,7 +20,7 @@
20
20
  "assets"
21
21
  ],
22
22
  "dependencies": {
23
- "@sedum-dev/core": "0.1.0-alpha.18"
23
+ "@sedum-dev/core": "0.1.0-alpha.21"
24
24
  },
25
25
  "scripts": {
26
26
  "build": "tsup src/index.ts --format esm --dts --clean --out-dir dist",