-
Notifications
You must be signed in to change notification settings - Fork 1
Merge long going React Migration Branch to master #131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 71 commits
Commits
Show all changes
72 commits
Select commit
Hold shift + click to select a range
a857bad
Move code to legacy folder and create new react folder next to it
l-1squared 45fd586
Move code to legacy folder and create new react folder next to it
l-1squared fd848c4
Add sidebar
fudler 916b6d5
Add contents of sidebar
fudler 4331c21
Extract sidebar to own method
fudler 8690c93
Integrate MenuBar into Scenario Overview
fudler c1fe2bc
Fix variable heights
fudler 2751040
Fix menu bar
fudler 24f20b8
Fix menu bar
fudler 6585932
Include review comments
fudler cf3c7b6
Include review comments
fudler 242f1d9
Provide Readme for Workshop
fudler 45c0f28
Provide items to work on
fudler 4f999d7
Add react-router-dom and basic routing example
marcus-aemilius 80f755e
Changed Scenario UI structure
70a59bd
Show multiple scenarios
b17baf8
code format
70624bb
Add a complete JGiven Report
l-1squared 3ae5da0
Single expansion logic
3c125c6
small fix
26986d4
Use url parameters for link to scenarios filtered by status
marcus-aemilius 441407e
Added prettier
marcus-aemilius c3aa9db
Fix jgiven report json
l-1squared ba4e6dd
some statistics fixed
af602e5
Extend gitignore
marcus-aemilius bb900f1
Move styling to own file
marcus-aemilius a0860e6
Remove accidentally pushed dummy data
marcus-aemilius 43bb347
introduce filter
l-1squared e569ce3
overhaueld new report model
bca41ba
Fix tests
marcus-aemilius 66cc767
Make test compile
marcus-aemilius 4e68f5d
force Json to be JsonReport
l-1squared ca450fb
fixed statistics
c967384
Moved icon button styling to separate file and increased button size
marcus-aemilius a13a448
Ran npm audit fix
marcus-aemilius a4e94e8
make as sample tag file available in a repository
l-1squared 88dd331
number format change
331ea7a
Use onClick-properties to pass callbacks and avoid usage of built-in …
marcus-aemilius bef0810
better status filter
l-1squared fa25fc5
fix compile errors
l-1squared dd70b20
Restructured Scenario Accordion
ca093c1
move sample reports into sample data
l-1squared 83b3a92
Test status filter
l-1squared 8bb4fda
Added Iteration over Scenarios
d5c5f3b
Try to use filter function
marcus-aemilius f3542c5
expand report filter to accept several values
l-1squared a24c95a
filter returns scenario model array
l-1squared f4d5771
repository now has a get all scenarios method
l-1squared d7dc86d
Introduce type-safe hook for filters
marcus-aemilius 9701742
fixed scenarios
76c3f5d
imroved scenarios
46b8d92
improved time display
9cb3028
Fix typo
fudler dc9323b
removed unnecessary condition
d3f12f7
Add basic test for ScenarioOverview
marcus-aemilius aba6e16
Refactored Scenario component
fa4ca88
Fixed formatting
6efe47f
removed unused variable
7feb1da
created subdirectory for tests
d1df2f7
Covered `ScenarioStep` with tests
9657cc7
Covered `ScenarioCase` with tests
2606d90
Overhauled scenario tests
3b5b1ed
Added tests for `StatisticsBreadcrumbs`
ac069e2
Covered `ScenarioHead` with tests
d521988
Code style fixes
2c0c496
skipped failing tests
77e6fe5
resolved npm audit vulnerability warnings
27efbe2
extracted statistics logic
6d1f13e
added functionality tests for `StatisticBreadcrumbs`
adfe2c4
repaired DonutChart functionality
1471cf2
Minor fixes
932dec7
Removed skipped tests
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.idea |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { repository } from "./repository"; | ||
import { filterByStatus } from "./ReportFilter"; | ||
import { ScenarioStatusFilter } from "./components/ScenarioOverview/ScenarioCollectionHead"; | ||
import { createSampleScenario } from "./components/Scenarios/__test__/scenarioTestData"; | ||
|
||
describe("Report filter status filter", () => { | ||
const fullReport = { | ||
tagFile: { tagTypeMap: {}, tags: {} }, | ||
scenarios: [ | ||
{ | ||
className: "com.tngtech.jgiven.junit5.JUnit5ExecutorTest", | ||
name: "J Unit 5 Executor", | ||
scenarios: [ | ||
createSampleScenario({ executionStatus: "SUCCESS" }), | ||
createSampleScenario({ executionStatus: "FAILED" }) | ||
] | ||
}, | ||
{ | ||
className: "com.tngtech.jgiven.tests.TestScenarios", | ||
name: "Test Scenarios", | ||
scenarios: [createSampleScenario({ executionStatus: "FAILED" })] | ||
} | ||
] | ||
}; | ||
test("should filter by status", () => { | ||
jest.spyOn(repository, "getReport").mockReturnValue(fullReport); | ||
|
||
expect(filterByStatus(ScenarioStatusFilter.SUCCESS)).toEqual([ | ||
fullReport.scenarios[0].scenarios[0] | ||
]); | ||
}); | ||
|
||
test("should ignore undefined status", () => { | ||
jest.spyOn(repository, "getReport").mockReturnValue(fullReport); | ||
|
||
expect(filterByStatus(ScenarioStatusFilter.SUCCESS, undefined)).toEqual([ | ||
fullReport.scenarios[0].scenarios[0] | ||
]); | ||
}); | ||
|
||
test("should return the full report if no status is provided", () => { | ||
jest.spyOn(repository, "getReport").mockReturnValue(fullReport); | ||
|
||
expect(filterByStatus()).toEqual(fullReport.scenarios.flatMap(s => s.scenarios)); | ||
}); | ||
|
||
test("should return the full report if null is provided", () => { | ||
jest.spyOn(repository, "getReport").mockReturnValue(fullReport); | ||
|
||
expect(filterByStatus(undefined)).toEqual(fullReport.scenarios.flatMap(s => s.scenarios)); | ||
}); | ||
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { repository } from "./repository"; | ||
import ReportModel, { ScenarioModel } from "./reportModel"; | ||
import { ScenarioStatusFilter } from "./components/ScenarioOverview/ScenarioCollectionHead"; | ||
|
||
export function filterByStatus( | ||
...statusParameter: (ScenarioStatusFilter | undefined)[] | ||
): ScenarioModel[] { | ||
const fullReport = repository.getReport(); | ||
const status = statusParameter | ||
.filter(status => status !== undefined) | ||
.map(s => s as ScenarioStatusFilter); | ||
|
||
const filteredReports = | ||
status.length === 0 | ||
? fullReport.scenarios | ||
: filterReportByScenarioStatus(fullReport.scenarios, ...status); | ||
|
||
return filteredReports.flatMap(report => report.scenarios); | ||
} | ||
|
||
function filterReportByScenarioStatus(reports: ReportModel[], ...status: ScenarioStatusFilter[]) { | ||
const filteredReports = []; | ||
for (const report of reports) { | ||
const filteredScenarios = report.scenarios.filter(scenario => | ||
(status as string[]).includes(scenario.executionStatus) | ||
); | ||
if (filteredScenarios.length > 0) { | ||
filteredReports.push({ | ||
...report, | ||
scenarios: filteredScenarios | ||
}); | ||
} | ||
} | ||
return filteredReports; | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this file here?