Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Commit

Permalink
add the testcasecoverage folder
Browse files Browse the repository at this point in the history
  • Loading branch information
ethankaplan committed Nov 21, 2023
1 parent d44cebf commit 26e9ab0
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React, { useEffect, useState } from "react";
interface Props {
population: string;
populationText: any;
}
import { Accordion } from "@madie/madie-design-system/dist/react";

const CoverageTab = ({ population, populationText }: Props) => {
return (

Check warning on line 9 in src/components/testCaseLanding/qdm/TestCaseCoverage/CoverageTabs/CoverageTab.tsx

View check run for this annotation

Codecov / codecov/patch

src/components/testCaseLanding/qdm/TestCaseCoverage/CoverageTabs/CoverageTab.tsx#L9

Added line #L9 was not covered by tests
<Accordion title={population} isOpen={true}>
<pre>{populationText.text}</pre>
</Accordion>
);
};

export default CoverageTab;
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import React, { useEffect, useState } from "react";
import _, { isEmpty } from "lodash";
import CoverageTab from "./CoverageTab";

import { MappedCql } from "../../../../../util/GroupCoverageHelpers";
import "twin.macro";
import "styled-components/macro";
interface Props {
groupPopulations: any;
mappedCql: MappedCql;
}

const CoverageTabList = ({ groupPopulations, mappedCql }: Props) => {
return (
<>
<div tw="border-b pb-2">{}</div>

{mappedCql &&
groupPopulations.map((pop) => {
return (

Check warning on line 20 in src/components/testCaseLanding/qdm/TestCaseCoverage/CoverageTabs/CoverageTabList.tsx

View check run for this annotation

Codecov / codecov/patch

src/components/testCaseLanding/qdm/TestCaseCoverage/CoverageTabs/CoverageTabList.tsx#L20

Added line #L20 was not covered by tests
<CoverageTab
population={pop.name}
populationText={mappedCql[pop.name]}
/>
);
})}
<div tw="flex mt-5" key={"1"}>
<div tw="flex-none w-1/5"></div>
<div></div>
</div>
</>
);
};

export default CoverageTabList;
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import React from "react";
// import QdmGroupCoverage from "../../../groupCoverage/QdmGroupCoverage";
import { isEmpty } from "lodash";
import { MadieAlert } from "@madie/madie-design-system/dist/react";
import { mapCql, mapCoverageCql } from "../../../../util/GroupCoverageHelpers";
import "twin.macro";
import "styled-components/macro";
import CoverageTabList from "./CoverageTabs/CoverageTabList";

const TestCaseCoverage = ({
calculationResults,
groupPopulations,
measureCql,
measureGroups,
calculationErrors,
}) => {
return (
<div tw="p-5" style={{ paddingRight: ".25rem" }}>
<CoverageTabList
groupPopulations={groupPopulations.populations.filter(
(pop) => pop.definition
)}
mappedCql={mapCoverageCql(measureCql, groupPopulations)}
/>
</div>
);
};

export default TestCaseCoverage;

0 comments on commit 26e9ab0

Please sign in to comment.