From 34a041b5d6d8bd99d908bc28d3971722e65e55f1 Mon Sep 17 00:00:00 2001 From: Greg Akins Date: Thu, 31 Oct 2024 14:00:08 -0400 Subject: [PATCH 1/2] MAT-7830: Remove ShiftTestCasesDates --- .../routes/qdm/TestCaseRoutes.test.tsx | 1 - src/components/routes/qdm/TestCaseRoutes.tsx | 12 +- .../routes/qiCore/TestCaseRoutes.tsx | 17 +-- .../common/TestCaseListSideBarNav.tsx | 114 +++++++++--------- .../TestCaseTable/TestCaseTable.test.tsx | 2 - .../TestCaseTable/TestCaseTablePopover.tsx | 2 +- .../testCaseLanding/qdm/TestCaseList.test.tsx | 12 +- src/types/madie-madie-util.d.ts | 1 - 8 files changed, 68 insertions(+), 93 deletions(-) diff --git a/src/components/routes/qdm/TestCaseRoutes.test.tsx b/src/components/routes/qdm/TestCaseRoutes.test.tsx index 4563ad5b5..5a0a3dcb5 100644 --- a/src/components/routes/qdm/TestCaseRoutes.test.tsx +++ b/src/components/routes/qdm/TestCaseRoutes.test.tsx @@ -83,7 +83,6 @@ jest.mock("@madie/madie-util", () => ({ }, useFeatureFlags: jest.fn().mockImplementation(() => ({ applyDefaults: false, - ShiftTestCasesDates: true, })), useOktaTokens: () => ({ getAccessToken: () => "test.jwt", diff --git a/src/components/routes/qdm/TestCaseRoutes.tsx b/src/components/routes/qdm/TestCaseRoutes.tsx index 132f888bf..80ec4d7b1 100644 --- a/src/components/routes/qdm/TestCaseRoutes.tsx +++ b/src/components/routes/qdm/TestCaseRoutes.tsx @@ -211,14 +211,10 @@ const TestCaseRoutes = () => { path="/measures/:measureId/edit/test-cases/list-page/expansion" element={} />} /> - {featureFlags?.ShiftTestCasesDates && ( - } /> - } - /> - )} + } />} + /> { /> } /> - {featureFlags?.ShiftTestCasesDates && ( - } - /> - } - /> - )} + } /> + } + /> { const featureFlags = useFeatureFlags(); - const showConfigurationSection = - (!qdm && featureFlags?.ShiftTestCasesDates) || qdm; + let navigate = useNavigate(); const { measureId, criteriaId } = useParams<{ measureId: string; @@ -96,68 +95,63 @@ const TestCaseListSideBarNav = ({ )} )} + <> +
+ +
- {showConfigurationSection && ( - <> -
- -
- - {showConfigTabs && ( - + {qdm && ( + + )} + {qdm && ( + + )} + - {qdm && ( - - )} - {qdm && ( - - )} - {featureFlags?.ShiftTestCasesDates && ( - - )} - - )} - - )} + /> + + )} + ); diff --git a/src/components/testCaseLanding/common/TestCaseTable/TestCaseTable.test.tsx b/src/components/testCaseLanding/common/TestCaseTable/TestCaseTable.test.tsx index b12266ea5..5430da969 100644 --- a/src/components/testCaseLanding/common/TestCaseTable/TestCaseTable.test.tsx +++ b/src/components/testCaseLanding/common/TestCaseTable/TestCaseTable.test.tsx @@ -82,7 +82,6 @@ let mockApplyDefaults = false; jest.mock("@madie/madie-util", () => ({ useFeatureFlags: jest.fn().mockImplementation(() => ({ applyDefaults: mockApplyDefaults, - ShiftTestCasesDates: true, TestCaseID: false, })), })); @@ -345,7 +344,6 @@ describe("TestCase component", () => { const exportTestCase = jest.fn(); const onCloneTestCase = jest.fn(); (useFeatureFlags as jest.Mock).mockClear().mockImplementation(() => ({ - ShiftTestCasesDates: true, TestCaseID: false, })); diff --git a/src/components/testCaseLanding/common/TestCaseTable/TestCaseTablePopover.tsx b/src/components/testCaseLanding/common/TestCaseTable/TestCaseTablePopover.tsx index 936e91f96..30d408084 100644 --- a/src/components/testCaseLanding/common/TestCaseTable/TestCaseTablePopover.tsx +++ b/src/components/testCaseLanding/common/TestCaseTable/TestCaseTablePopover.tsx @@ -204,7 +204,7 @@ const TestCaseTablePopover = (props: TestCaseTablePopoverProps) => { )} - {canEdit && featureFlags?.ShiftTestCasesDates && ( + {canEdit && (