Skip to content

Commit

Permalink
Show exception details in report browser
Browse files Browse the repository at this point in the history
  • Loading branch information
cezarypiatek committed Dec 22, 2023
1 parent f05d0f6 commit abe20a8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 0 additions & 4 deletions src/NScenario/report-browser-template.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/nscenario-report-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"inline": "inliner -nm --preserve-comments build/index.html > build/report-browser-template.html"
"inline": "inliner -nm --preserve-comments build/index.html > ../NScenario/report-browser-template.html"
},
"eslintConfig": {
"extends": [
Expand Down
6 changes: 6 additions & 0 deletions src/nscenario-report-browser/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ export function StepCtr(props: {data:Step, prefix:string}) {
return (
<> <span style={{color:"blue"}}>Step {props.prefix}:</span> {`${props.data.Description}`}

{props.data.Exception != null && (
<pre style={{wordWrap: "break-word", whiteSpace: "pre-wrap", overflowX: "auto", padding:10, border: "1px solid red", borderRadius: 5}}><code>
{props.data.Exception}
</code></pre>
)}

{props.data.SubSteps && <Timeline style={{marginTop:"10px", paddingBottom:0}}
mode={"left"}
items={ props.data.SubSteps.map((value, index) => ({
Expand Down

0 comments on commit abe20a8

Please sign in to comment.