Skip to content

Commit

Permalink
Show multiple scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Schüler committed Mar 1, 2024
1 parent 3af69b6 commit 7239a85
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
2 changes: 1 addition & 1 deletion new/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function App() {
title={"Mein Titel"}
description={"Meine Description"}
reportName={guaranteedStateReport.name}
scenarios={[guaranteedStateReport.scenarios[0]]}
scenarios={guaranteedStateReport.scenarios}
/>
</div>
);
Expand Down
22 changes: 14 additions & 8 deletions new/src/components/Scenarios/ScenarioOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,21 @@ export function ScenarioOverview(props: { reportName: string, title: string, des
</Grid>
</Grid>
<Grid item xs={12}>

<div style={{ height: "40em" }}>
<Scenario
reportName={props.reportName}
scenario={props.scenarios[0]}
accordionExpansion={{
expanded: expanded,
setExpanded: setExpanded
}}
></Scenario>
{props.scenarios.map((scenario) => {
return (
<Scenario
reportName={props.reportName}
scenario={scenario}
accordionExpansion={{
expanded: expanded,
setExpanded: setExpanded
}}
></Scenario>
);
}) }

</div>
</Grid>
</Grid>
Expand Down
4 changes: 2 additions & 2 deletions new/src/sampleData/GuaranteedStateTestScenario.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"scenarios": [
{
"className": "com.tngtech.jgiven.impl.GuaranteedStateTest",
"testMethodName": "assure_before_method_of_second_test_is_executed_after_guaranteed_fields_validation",
"description": "assure before method of second test is executed after guaranteed fields validation",
"testMethodName": "assure_before_method_of_first_test_is_executed_after_guaranteed_fields_validation",
"description": "assure before method of first test is executed after guaranteed fields validation",
"tagIds": [],
"explicitParameters": [],
"derivedParameters": [],
Expand Down

0 comments on commit 7239a85

Please sign in to comment.