executable-stories-react 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/dist/index.cjs +25 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +40 -15
- package/dist/index.js.map +1 -1
- package/dist/interactive.cjs +17 -0
- package/dist/interactive.cjs.map +1 -1
- package/dist/interactive.js +43 -26
- package/dist/interactive.js.map +1 -1
- package/dist/parse.cjs +8 -0
- package/dist/parse.cjs.map +1 -1
- package/dist/parse.js +8 -0
- package/dist/parse.js.map +1 -1
- package/dist/report-island.global.js +15 -14
- package/dist/ssr.cjs +17 -0
- package/dist/ssr.cjs.map +1 -1
- package/dist/ssr.js +30 -13
- package/dist/ssr.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -658,7 +658,7 @@ function ReportDocEntries({ entries }) {
|
|
|
658
658
|
}
|
|
659
659
|
|
|
660
660
|
// src/components/ReportSteps.tsx
|
|
661
|
-
import { jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
661
|
+
import { Fragment as Fragment6, jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
662
662
|
var STEP_GLYPH = {
|
|
663
663
|
passed: "\u2713",
|
|
664
664
|
failed: "\u2717",
|
|
@@ -735,6 +735,23 @@ function ReportStepItem({
|
|
|
735
735
|
children: step.errorMessage
|
|
736
736
|
}
|
|
737
737
|
) : null,
|
|
738
|
+
step.expected !== void 0 || step.actual !== void 0 ? /* @__PURE__ */ jsxs11(
|
|
739
|
+
"dl",
|
|
740
|
+
{
|
|
741
|
+
"data-slot": "step-comparison",
|
|
742
|
+
className: "mt-1.5 ml-6 grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 font-mono text-xs",
|
|
743
|
+
children: [
|
|
744
|
+
step.expected !== void 0 ? /* @__PURE__ */ jsxs11(Fragment6, { children: [
|
|
745
|
+
/* @__PURE__ */ jsx19("dt", { className: "text-muted-foreground", children: "Expected" }),
|
|
746
|
+
/* @__PURE__ */ jsx19("dd", { className: "overflow-x-auto whitespace-pre-wrap text-pass", children: step.expected })
|
|
747
|
+
] }) : null,
|
|
748
|
+
step.actual !== void 0 ? /* @__PURE__ */ jsxs11(Fragment6, { children: [
|
|
749
|
+
/* @__PURE__ */ jsx19("dt", { className: "text-muted-foreground", children: "Actual" }),
|
|
750
|
+
/* @__PURE__ */ jsx19("dd", { className: "overflow-x-auto whitespace-pre-wrap text-fail", children: step.actual })
|
|
751
|
+
] }) : null
|
|
752
|
+
]
|
|
753
|
+
}
|
|
754
|
+
) : null,
|
|
738
755
|
step.docEntries.length > 0 ? /* @__PURE__ */ jsx19("div", { "data-es-docs": true, className: "mt-2 ml-6", children: /* @__PURE__ */ jsx19(ReportDocEntries, { entries: step.docEntries }) }) : null
|
|
739
756
|
]
|
|
740
757
|
}
|
|
@@ -858,7 +875,7 @@ function StateCardView({ card }) {
|
|
|
858
875
|
}
|
|
859
876
|
|
|
860
877
|
// src/components/ReportAttachments.tsx
|
|
861
|
-
import { Fragment as
|
|
878
|
+
import { Fragment as Fragment7, jsx as jsx21, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
862
879
|
function attachmentText(att) {
|
|
863
880
|
if (att.contentEncoding !== "BASE64") return att.body;
|
|
864
881
|
try {
|
|
@@ -898,7 +915,7 @@ function ReportAttachments({ attachments }) {
|
|
|
898
915
|
const href = dataUri ?? safeUrl(att.body);
|
|
899
916
|
const imageSrc = dataUri ?? safeImageUrl(att.body);
|
|
900
917
|
const isImage = att.mediaType.startsWith("image/") && imageSrc !== void 0;
|
|
901
|
-
return /* @__PURE__ */ jsx21("figure", { className: "m-0", children: isImage ? /* @__PURE__ */ jsxs13(
|
|
918
|
+
return /* @__PURE__ */ jsx21("figure", { className: "m-0", children: isImage ? /* @__PURE__ */ jsxs13(Fragment7, { children: [
|
|
902
919
|
/* @__PURE__ */ jsx21(
|
|
903
920
|
"img",
|
|
904
921
|
{
|
|
@@ -909,7 +926,7 @@ function ReportAttachments({ attachments }) {
|
|
|
909
926
|
}
|
|
910
927
|
),
|
|
911
928
|
/* @__PURE__ */ jsx21("figcaption", { className: "mt-1 text-xs text-muted-foreground", children: att.name })
|
|
912
|
-
] }) : /* @__PURE__ */ jsxs13(
|
|
929
|
+
] }) : /* @__PURE__ */ jsxs13(Fragment7, { children: [
|
|
913
930
|
att.external ? null : preview(att),
|
|
914
931
|
/* @__PURE__ */ jsxs13(
|
|
915
932
|
"a",
|
|
@@ -1104,7 +1121,7 @@ function flakinessOf(entries) {
|
|
|
1104
1121
|
}
|
|
1105
1122
|
|
|
1106
1123
|
// src/components/ScenarioRunHistory.tsx
|
|
1107
|
-
import { Fragment as
|
|
1124
|
+
import { Fragment as Fragment8, jsx as jsx23, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1108
1125
|
var MAX_DOTS = 10;
|
|
1109
1126
|
var DOT_COLOR = {
|
|
1110
1127
|
passed: "bg-pass",
|
|
@@ -1124,7 +1141,7 @@ function ScenarioRunHistory({ scenarioId }) {
|
|
|
1124
1141
|
const recent = entries.slice(-MAX_DOTS);
|
|
1125
1142
|
const flaky = flakinessOf(recent) === "flaky";
|
|
1126
1143
|
const summary = flaky ? `${describeRunHistory(recent)} \xB7 Flaky` : describeRunHistory(recent);
|
|
1127
|
-
return /* @__PURE__ */ jsxs15(
|
|
1144
|
+
return /* @__PURE__ */ jsxs15(Fragment8, { children: [
|
|
1128
1145
|
flaky ? /* @__PURE__ */ jsx23(Badge, { variant: "pending", "aria-label": "Flaky: status flips between recent runs", title: summary, children: "Flaky" }) : null,
|
|
1129
1146
|
/* @__PURE__ */ jsx23(
|
|
1130
1147
|
"span",
|
|
@@ -1459,9 +1476,9 @@ function ReportScenario({ scenario, hideTitle = false }) {
|
|
|
1459
1476
|
}
|
|
1460
1477
|
|
|
1461
1478
|
// src/components/ReportScenarioList.tsx
|
|
1462
|
-
import { Fragment as
|
|
1479
|
+
import { Fragment as Fragment9, jsx as jsx27 } from "react/jsx-runtime";
|
|
1463
1480
|
function ReportScenarioList({ feature }) {
|
|
1464
|
-
return /* @__PURE__ */ jsx27(
|
|
1481
|
+
return /* @__PURE__ */ jsx27(Fragment9, { children: feature.scenarios.map((scenario) => /* @__PURE__ */ jsx27(ReportScenario, { scenario }, scenario.id)) });
|
|
1465
1482
|
}
|
|
1466
1483
|
|
|
1467
1484
|
// src/components/ReportFeatureIntro.tsx
|
|
@@ -1499,7 +1516,7 @@ function featureKindLabel(kind) {
|
|
|
1499
1516
|
}
|
|
1500
1517
|
|
|
1501
1518
|
// src/components/ReportFeature.tsx
|
|
1502
|
-
import { Fragment as
|
|
1519
|
+
import { Fragment as Fragment10, jsx as jsx29, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1503
1520
|
function ReportFeature({ feature }) {
|
|
1504
1521
|
const titleId = `${feature.id}-title`;
|
|
1505
1522
|
const bodyId = `${feature.id}-body`;
|
|
@@ -1559,14 +1576,14 @@ function ReportFeature({ feature }) {
|
|
|
1559
1576
|
s.failed,
|
|
1560
1577
|
" failed"
|
|
1561
1578
|
] }),
|
|
1562
|
-
s.skipped > 0 ? /* @__PURE__ */ jsxs20(
|
|
1579
|
+
s.skipped > 0 ? /* @__PURE__ */ jsxs20(Fragment10, { children: [
|
|
1563
1580
|
/* @__PURE__ */ jsx29("span", { "aria-hidden": true, children: "\xB7" }),
|
|
1564
1581
|
/* @__PURE__ */ jsxs20("span", { children: [
|
|
1565
1582
|
s.skipped,
|
|
1566
1583
|
" skipped"
|
|
1567
1584
|
] })
|
|
1568
1585
|
] }) : null,
|
|
1569
|
-
s.pending > 0 ? /* @__PURE__ */ jsxs20(
|
|
1586
|
+
s.pending > 0 ? /* @__PURE__ */ jsxs20(Fragment10, { children: [
|
|
1570
1587
|
/* @__PURE__ */ jsx29("span", { "aria-hidden": true, children: "\xB7" }),
|
|
1571
1588
|
/* @__PURE__ */ jsxs20("span", { children: [
|
|
1572
1589
|
s.pending,
|
|
@@ -1813,9 +1830,9 @@ function ReportSchemaError({ error }) {
|
|
|
1813
1830
|
}
|
|
1814
1831
|
|
|
1815
1832
|
// src/components/ReportShell.tsx
|
|
1816
|
-
import { Fragment as
|
|
1833
|
+
import { Fragment as Fragment11, jsx as jsx36, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
1817
1834
|
function ReportTitleBlock({ title }) {
|
|
1818
|
-
return /* @__PURE__ */ jsxs24(
|
|
1835
|
+
return /* @__PURE__ */ jsxs24(Fragment11, { children: [
|
|
1819
1836
|
/* @__PURE__ */ jsx36("h1", { children: title ?? "Story Report" }),
|
|
1820
1837
|
/* @__PURE__ */ jsx36(ReportSummary, {}),
|
|
1821
1838
|
/* @__PURE__ */ jsx36(ReportMeta, {})
|
|
@@ -1909,7 +1926,7 @@ function Report(props) {
|
|
|
1909
1926
|
|
|
1910
1927
|
// src/components/doc/MermaidView.tsx
|
|
1911
1928
|
import { useEffect as useEffect3, useRef as useRef2, useState as useState4 } from "react";
|
|
1912
|
-
import { Fragment as
|
|
1929
|
+
import { Fragment as Fragment12, jsx as jsx39, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
1913
1930
|
function prefersDark(el) {
|
|
1914
1931
|
const themed = el?.closest("[data-theme]");
|
|
1915
1932
|
if (themed?.dataset.theme === "dark") return true;
|
|
@@ -1979,7 +1996,7 @@ function MermaidView({ entry, load }) {
|
|
|
1979
1996
|
)
|
|
1980
1997
|
] });
|
|
1981
1998
|
}
|
|
1982
|
-
return /* @__PURE__ */ jsxs27(
|
|
1999
|
+
return /* @__PURE__ */ jsxs27(Fragment12, { children: [
|
|
1983
2000
|
error ? /* @__PURE__ */ jsxs27(
|
|
1984
2001
|
"p",
|
|
1985
2002
|
{
|
|
@@ -2498,6 +2515,14 @@ var story_report_v1_default = {
|
|
|
2498
2515
|
errorMessage: {
|
|
2499
2516
|
type: "string"
|
|
2500
2517
|
},
|
|
2518
|
+
expected: {
|
|
2519
|
+
type: "string",
|
|
2520
|
+
description: "Serialized expected value of the failed assertion. Present only when the host framework reports one."
|
|
2521
|
+
},
|
|
2522
|
+
actual: {
|
|
2523
|
+
type: "string",
|
|
2524
|
+
description: "Serialized actual (observed) value of the failed assertion. Present only when the host framework reports one."
|
|
2525
|
+
},
|
|
2501
2526
|
mode: {
|
|
2502
2527
|
$ref: "#/$defs/StepMode"
|
|
2503
2528
|
},
|