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

Commit

Permalink
Enhance the test for this ticket
Browse files Browse the repository at this point in the history
  • Loading branch information
ethankaplan committed Nov 27, 2023
1 parent 881e632 commit 8120b1c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ const CoverageTabList = ({ groupPopulations, mappedCql }: Props) => {
return (
<div data-testid="coverage-tab-list">
{mappedCql &&
groupPopulations.map((pop) => {
groupPopulations.map((pop, i) => {
return (
<CoverageTab
key={i}
population={pop.name}
populationText={mappedCql[pop.name]}
/>
Expand Down
4 changes: 4 additions & 0 deletions src/components/testCaseLanding/qdm/TestCaseList.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,10 @@ describe("TestCaseList component", () => {
userEvent.click(screen.getByTestId("coverage-tab"));
const coverageTabList = await screen.findByTestId("coverage-tab-list");
expect(coverageTabList).toBeInTheDocument();
const allAccordions = await screen.findAllByTestId("accordion");
expect(allAccordions[0]).toBeInTheDocument();
const firstAccordion = await screen.queryByText("initialPopulation");
expect(firstAccordion).toBeInTheDocument();
});

it("Run Test Cases button should be disabled if no valid test cases", async () => {
Expand Down

0 comments on commit 8120b1c

Please sign in to comment.