From 9abb751b9baab8932bfbc2117d5498c4be15bae7 Mon Sep 17 00:00:00 2001 From: Michael Tang Date: Tue, 7 Nov 2023 14:46:20 -0500 Subject: [PATCH 1/2] update submission req icons --- src/components/StatusBar/icons/InProgress.svg | 25 ++++++++++++++++ src/components/StatusBar/icons/New.svg | 29 ++++++++++++++----- src/components/StatusBar/icons/Submitted.svg | 23 ++++++++++++--- src/components/StatusBar/icons/index.tsx | 2 ++ 4 files changed, 67 insertions(+), 12 deletions(-) create mode 100644 src/components/StatusBar/icons/InProgress.svg diff --git a/src/components/StatusBar/icons/InProgress.svg b/src/components/StatusBar/icons/InProgress.svg new file mode 100644 index 00000000..8239e092 --- /dev/null +++ b/src/components/StatusBar/icons/InProgress.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/StatusBar/icons/New.svg b/src/components/StatusBar/icons/New.svg index 44eb441c..f2c10551 100644 --- a/src/components/StatusBar/icons/New.svg +++ b/src/components/StatusBar/icons/New.svg @@ -1,8 +1,21 @@ - - - - + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/StatusBar/icons/Submitted.svg b/src/components/StatusBar/icons/Submitted.svg index 7304a0a6..ebd28a4d 100644 --- a/src/components/StatusBar/icons/Submitted.svg +++ b/src/components/StatusBar/icons/Submitted.svg @@ -1,5 +1,20 @@ - - + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/StatusBar/icons/index.tsx b/src/components/StatusBar/icons/index.tsx index a38b0c7f..ac39c325 100644 --- a/src/components/StatusBar/icons/index.tsx +++ b/src/components/StatusBar/icons/index.tsx @@ -5,6 +5,7 @@ import Approved from "./Approved.svg"; import UnderReview from "./UnderReview.svg"; import StatusApproved from "./StatusApproved.svg"; import StatusRejected from "./StatusRejected.svg"; +import InProgress from "./InProgress.svg"; export type IconType = { [key: string]: string; @@ -21,6 +22,7 @@ export const HistoryIconMap : IconType = { Rejected, Approved, "In Review": UnderReview, + "In Progress": InProgress, }; /** From 56d8edf2e64cd2538fe7233b44effa310569f471 Mon Sep 17 00:00:00 2001 From: Michael Tang Date: Tue, 7 Nov 2023 15:24:44 -0500 Subject: [PATCH 2/2] update test cases --- src/components/StatusBar/StatusBar.test.tsx | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/components/StatusBar/StatusBar.test.tsx b/src/components/StatusBar/StatusBar.test.tsx index eb31fad0..6924f219 100644 --- a/src/components/StatusBar/StatusBar.test.tsx +++ b/src/components/StatusBar/StatusBar.test.tsx @@ -16,6 +16,7 @@ import Approved from './icons/Approved.svg'; import Rejected from './icons/Rejected.svg'; import Submitted from './icons/Submitted.svg'; import UnderReview from './icons/UnderReview.svg'; +import InProgress from './icons/InProgress.svg'; import { FormatDate } from "../../utils"; type Props = { @@ -328,22 +329,7 @@ describe("StatusBar > History Modal Tests", () => { expect(() => getByTestId("status-bar-history-item-1-icon")).toThrow(); }); - const noIconStatuses = ["In Progress"]; - it.each(noIconStatuses)("does not render an icon for status %s", (status) => { - const data = { - history: [{ dateTime: "2023-11-24T01:25:45Z", status }], - }; - - const { getByTestId, getByText } = render(); - - act(() => { - fireEvent.click(getByText("Full History")); - }); - - expect(() => getByTestId("status-bar-history-item-0-icon")).toThrow(); - }); - - const statusesWithIcons = [["New", New], ["Submitted", Submitted], ["Approved", Approved], ["Rejected", Rejected], ["In Review", UnderReview]]; + const statusesWithIcons = [["New", New], ["Submitted", Submitted], ["Approved", Approved], ["Rejected", Rejected], ["In Review", UnderReview], ["In Progress", InProgress]]; it.each(statusesWithIcons)("renders the correct icon for the status %s", (status, svg) => { const data = { history: [{ dateTime: "2023-11-24T01:25:45Z", status }],