diff --git a/src/components/editTestCase/qdm/EditTestCase.test.tsx b/src/components/editTestCase/qdm/EditTestCase.test.tsx index 7f3c256c0..e0d8750a9 100644 --- a/src/components/editTestCase/qdm/EditTestCase.test.tsx +++ b/src/components/editTestCase/qdm/EditTestCase.test.tsx @@ -366,9 +366,7 @@ jest.mock("@madie/madie-util", () => ({ useFeatureFlags: jest.fn(() => { return { applyDefaults: mockApplyDefaults, - disableRunTestCaseWithObservStrat: true, qdmHideJson: false, - qdmHighlightingTabs: true, }; }), measureStore: { @@ -526,7 +524,6 @@ describe("EditTestCase QDM Component", () => { (useFeatureFlags as jest.Mock).mockClear().mockImplementation(() => { return { applyDefaults: mockApplyDefaults, - disableRunTestCaseWithObservStrat: false, }; }); }); @@ -555,22 +552,6 @@ describe("EditTestCase QDM Component", () => { await waitFor(() => expect(actualResult).toBeChecked()); }); - it("should disable run qdm test case", async () => { - (useFeatureFlags as jest.Mock).mockClear().mockImplementationOnce(() => { - return { - applyDefaults: mockApplyDefaults, - disableRunTestCaseWithObservStrat: true, - }; - }); - await waitFor(() => renderEditTestCaseComponent()); - const runTestCaseButton = await getByRole("button", { - name: "Run Test", - }); - expect(runTestCaseButton).toBeInTheDocument(); - - expect(runTestCaseButton).toBeDisabled(); - }); - it("should see that the JSON changed", async () => { await waitFor(() => renderEditTestCaseComponent()); const runTestCaseButton = await getByRole("button", { diff --git a/src/components/editTestCase/qdm/EditTestCase.tsx b/src/components/editTestCase/qdm/EditTestCase.tsx index 262d85645..1466f2512 100644 --- a/src/components/editTestCase/qdm/EditTestCase.tsx +++ b/src/components/editTestCase/qdm/EditTestCase.tsx @@ -123,22 +123,6 @@ const EditTestCase = () => { const featureFlags = useFeatureFlags(); const [hasObservationOrStratification, setHasObservationOrStratification] = useState(false); - useEffect(() => { - if (featureFlags?.disableRunTestCaseWithObservStrat) { - const groups: Group[] = measure?.groups; - groups?.forEach((group) => { - const measureObservations: MeasureObservation[] = - group?.measureObservations; - const measureStratifications: Stratification[] = group?.stratifications; - if ( - (measureObservations && measureObservations.length > 0) || - (measureStratifications && measureStratifications.length > 0) - ) { - setHasObservationOrStratification(true); - } - }); - } - }, [measure, measure?.groups]); const formik = useFormik({ initialValues: { title: currentTestCase?.title || "", diff --git a/src/components/editTestCase/qdm/RightPanel/RightPanel.tsx b/src/components/editTestCase/qdm/RightPanel/RightPanel.tsx index ceef5fe8e..38304b058 100644 --- a/src/components/editTestCase/qdm/RightPanel/RightPanel.tsx +++ b/src/components/editTestCase/qdm/RightPanel/RightPanel.tsx @@ -35,7 +35,7 @@ const RightPanel = ({
- {featureFlags.qdmHighlightingTabs && activeTab === "highlighting" && ( + {activeTab === "highlighting" && ( { return { applyDefaults: mockApplyDefaults, qiCoreElementsTab: true, - highlightingTabs: false, }; }, measureStore: { @@ -2370,7 +2369,7 @@ describe("EditTestCase component", () => { }); userEvent.click(screen.getByTestId("highlighting-tab")); expect( - await screen.findByText("Population Criteria 1") + await screen.findByText("Population Criteria") ).toBeInTheDocument(); userEvent.click(screen.getByTestId("expectoractual-tab")); @@ -2487,7 +2486,7 @@ describe("EditTestCase component", () => { }); userEvent.click(screen.getByTestId("highlighting-tab")); expect( - await screen.findByText("Population Criteria 1") + await screen.findByText("Population Criteria") ).toBeInTheDocument(); userEvent.click(screen.getByTestId("expectoractual-tab")); diff --git a/src/components/editTestCase/qiCore/calculationResults/CalculationResults.test.tsx b/src/components/editTestCase/qiCore/calculationResults/CalculationResults.test.tsx index 1ccf2b032..22366c931 100644 --- a/src/components/editTestCase/qiCore/calculationResults/CalculationResults.test.tsx +++ b/src/components/editTestCase/qiCore/calculationResults/CalculationResults.test.tsx @@ -90,29 +90,12 @@ describe("CalculationResults with tabbed highlighting layout off", () => { }, ]; - beforeEach(() => { - useFeatureFlags.mockReturnValue({ highlightingTabs: false }); - }); - test("display info message when test case has not been ran yet", () => { renderCoverageComponent(); expect( screen.getByText("To see the logic highlights, click 'Run Test'") ).toBeInTheDocument(); }); - - test("render calculation results", () => { - renderCoverageComponent(calculationResults); - expect(screen.getByText("Population Criteria 1")).toBeInTheDocument(); - expect(screen.getByText("Population Criteria 2")).toBeInTheDocument(); - }); - - test("render calculation errors if any", () => { - const errorMessage = "Something is not right"; - renderCoverageComponent([], { status: "error", message: errorMessage }); - expect(screen.getByText(`${errorMessage}`)).toBeInTheDocument(); - expect(screen.getByTestId("calculation-results").innerHTML).toEqual(""); - }); }); describe("CalculationResults with new tabbed highlighting layout on", () => { @@ -283,10 +266,6 @@ describe("CalculationResults with new tabbed highlighting layout on", () => { }, ]; - beforeEach(() => { - useFeatureFlags.mockReturnValue({ highlightingTabs: true }); - }); - const getByRole = (name) => screen.findByRole("tab", { name: name }); const getCriteriaOptions = () => { const criteriaSelector = screen.getByTestId( diff --git a/src/components/editTestCase/qiCore/calculationResults/CalculationResults.tsx b/src/components/editTestCase/qiCore/calculationResults/CalculationResults.tsx index c5ab36282..d599e422f 100644 --- a/src/components/editTestCase/qiCore/calculationResults/CalculationResults.tsx +++ b/src/components/editTestCase/qiCore/calculationResults/CalculationResults.tsx @@ -96,7 +96,7 @@ const CalculationResults = ({ }, {} ), - populationRelevance: populationRelevance.reduce( + populationRelevance: populationRelevance?.reduce( ( populationRelevanceOutput, { criteriaExpression, populationId, populationType, result } @@ -140,18 +140,13 @@ const CalculationResults = ({ }} /> )} - {featureFlags.highlightingTabs && !isEmpty(groupPopulations) && ( + {!isEmpty(groupPopulations) && ( )} - {!featureFlags.highlightingTabs && coverageHtmls && ( -
- {coverageHtmls.map((coverageHtml) => parse(coverageHtml))} -
- )}
); }; diff --git a/src/components/routes/qdm/TestCaseRoutes.test.tsx b/src/components/routes/qdm/TestCaseRoutes.test.tsx index b684cfd35..971d69a39 100644 --- a/src/components/routes/qdm/TestCaseRoutes.test.tsx +++ b/src/components/routes/qdm/TestCaseRoutes.test.tsx @@ -77,8 +77,6 @@ jest.mock("@madie/madie-util", () => ({ }, useFeatureFlags: jest.fn().mockImplementation(() => ({ applyDefaults: false, - importTestCases: false, - qdmTestCases: true, })), useOktaTokens: () => ({ getAccessToken: () => "test.jwt", diff --git a/src/components/testCaseLanding/qdm/CreateCodeCoverageNavTabs.tsx b/src/components/testCaseLanding/qdm/CreateCodeCoverageNavTabs.tsx index 6b8e778e9..455330a30 100644 --- a/src/components/testCaseLanding/qdm/CreateCodeCoverageNavTabs.tsx +++ b/src/components/testCaseLanding/qdm/CreateCodeCoverageNavTabs.tsx @@ -85,27 +85,19 @@ export default function CreateCodeCoverageNavTabs(props: NavTabProps) { const [optionsOpen, setOptionsOpen] = useState(false); const [anchorEl, setAnchorEl] = useState(null); useEffect(() => { - if (featureFlags?.disableRunTestCaseWithObservStrat) { - const groups: Group[] = measure?.groups; - groups?.forEach((group) => { - const measureObservations: MeasureObservation[] = - group?.measureObservations; - const measureStratifications: Stratification[] = group?.stratifications; - if ( - (measureObservations && measureObservations.length > 0) || - (measureStratifications && measureStratifications.length > 0) - ) { - setShouldDisableRunTestsButton(true); - } - }); - } else { - setShouldDisableRunTestsButton(false); - } - }, [ - measure, - measure?.groups, - featureFlags?.disableRunTestCaseWithObservStrat, - ]); + const groups: Group[] = measure?.groups; + groups?.forEach((group) => { + const measureObservations: MeasureObservation[] = + group?.measureObservations; + const measureStratifications: Stratification[] = group?.stratifications; + if ( + (measureObservations && measureObservations.length > 0) || + (measureStratifications && measureStratifications.length > 0) + ) { + setShouldDisableRunTestsButton(true); + } + }); + }, [measure, measure?.groups]); const executionResultsDisplayTemplate = (label) => { const codeCoverage = executeAllTestCases ? coveragePercentage : "-"; @@ -221,23 +213,23 @@ export default function CreateCodeCoverageNavTabs(props: NavTabProps) { /> Delete All - {featureFlags?.importTestCases && ( - - )} + + +