From 5f1145b87e1645433cde3695b2ebdec5e2e10159 Mon Sep 17 00:00:00 2001 From: Mahendra Dani <116940083+MahendraDani@users.noreply.github.com> Date: Wed, 6 Dec 2023 22:52:43 +0530 Subject: [PATCH] fix: improved test coverage for src/components/EventListCard/EventListCard.tsx (#1142) --- src/components/EventListCard/EventListCard.test.tsx | 2 ++ src/components/EventListCard/EventListCard.tsx | 1 + 2 files changed, 3 insertions(+) diff --git a/src/components/EventListCard/EventListCard.test.tsx b/src/components/EventListCard/EventListCard.test.tsx index 820e563957..366c1686b4 100644 --- a/src/components/EventListCard/EventListCard.test.tsx +++ b/src/components/EventListCard/EventListCard.test.tsx @@ -114,6 +114,8 @@ describe('Testing Event List Card', () => { userEvent.click(screen.getByTestId('card')); + userEvent.click(screen.getByTestId('showEventDashboardBtn')); + userEvent.click(screen.getByTestId('createEventModalCloseBtn')); await wait(); diff --git a/src/components/EventListCard/EventListCard.tsx b/src/components/EventListCard/EventListCard.tsx index 0ec3a62d6f..ad21205852 100644 --- a/src/components/EventListCard/EventListCard.tsx +++ b/src/components/EventListCard/EventListCard.tsx @@ -224,6 +224,7 @@ function eventListCard(props: InterfaceEventListCardProps): JSX.Element { className={styles.customButton} variant="success" onClick={openEventDashboard} + data-testid="showEventDashboardBtn" > {' '} Show Event Dashboard{' '}