-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged in r2-2620-release-2-7-1-main (pull request #6555)
R2-2620: Merging release 2.7.1 to main
- Loading branch information
Showing
5 changed files
with
137 additions
and
164 deletions.
There are no files selected for viewing
This file contains 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
129 changes: 129 additions & 0 deletions
129
app/javascript/components/insights-sub-report/container.spec.js
This file contains 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,129 @@ | ||
import { fromJS } from "immutable"; | ||
|
||
import { mountedComponent, screen } from "../../test-utils"; | ||
|
||
import InsightsSubReport from "./container"; | ||
|
||
describe("<InsightsSubReport />", () => { | ||
const initialState = fromJS({ | ||
records: { | ||
insights: { | ||
selectedReport: { | ||
id: "ghn_report", | ||
name: "managed_reports.ghn_report.name", | ||
description: "managed_reports.ghn_report.description", | ||
module_id: "primeromodule-mrm", | ||
subreports: ["ghn_report"], | ||
report_data: { | ||
ghn_report: { | ||
data: { | ||
verified_information: [ | ||
{ | ||
group_id: "boys", | ||
data: [ | ||
{ | ||
id: "killing", | ||
total: 2 | ||
} | ||
] | ||
}, | ||
{ | ||
group_id: "girls", | ||
data: [] | ||
}, | ||
{ | ||
group_id: "unknown", | ||
data: [] | ||
}, | ||
{ | ||
group_id: "total", | ||
data: [ | ||
{ | ||
id: "killing", | ||
total: 2 | ||
} | ||
] | ||
} | ||
], | ||
verified_information_violations: [], | ||
late_verification: [], | ||
late_verification_violations: [], | ||
unverified_information: [ | ||
{ | ||
group_id: "boys", | ||
data: [ | ||
{ | ||
id: "killing", | ||
total: 1 | ||
} | ||
] | ||
}, | ||
{ | ||
group_id: "girls", | ||
data: [] | ||
}, | ||
{ | ||
group_id: "unknown", | ||
data: [] | ||
}, | ||
{ | ||
group_id: "total", | ||
data: [ | ||
{ | ||
id: "killing", | ||
total: 1 | ||
} | ||
] | ||
} | ||
], | ||
unverified_information_violations: [], | ||
multiple_violations: [ | ||
{ | ||
data: { | ||
unique_id: "26c0dfd0-4731-41d2-a6f5-689370cca821", | ||
violations: ["killing"], | ||
incident_id: "bb763213-2202-4e3d-a302-05bc96ed599b", | ||
individual_age: null, | ||
individual_sex: "male", | ||
incident_short_id: "21ac674" | ||
} | ||
} | ||
] | ||
}, | ||
metadata: { | ||
display_graph: false, | ||
lookups: { | ||
multiple_violations: ["lookup-gender-unknown-total", "lookup-violation-type"] | ||
}, | ||
table_type: "ghn_report", | ||
order: [ | ||
"verified_information", | ||
"verified_information_violations", | ||
"late_verification", | ||
"late_verification_violations", | ||
"unverified_information", | ||
"unverified_information_violations", | ||
"multiple_violations" | ||
], | ||
indicators_rows: {}, | ||
indicators_subcolumns: {} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}); | ||
|
||
it("should render a MultipleViolationsIndicator component", () => { | ||
mountedComponent( | ||
<InsightsSubReport />, | ||
initialState, | ||
{}, | ||
["/insights/primeromodule-mrm/ghn_report/ghn_report"], | ||
{}, | ||
"/insights/:moduleID/:id/:subReport" | ||
); | ||
expect(screen.getByText("managed_reports.ghn_report.sub_reports.multiple_violations")).toBeInTheDocument(); | ||
}); | ||
}); |
161 changes: 0 additions & 161 deletions
161
app/javascript/components/insights-sub-report/container.unit.test.js
This file was deleted.
Oops, something went wrong.
This file contains 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 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