From 3ef72f25fc642334101262f28e79d3ac6531874d Mon Sep 17 00:00:00 2001 From: Jan Jaroszczak Date: Wed, 8 May 2024 15:47:27 +0200 Subject: [PATCH] [#937] Missing Test IDs --- .../src/components/molecules/AutomatedVotingCard.tsx | 1 + .../src/components/molecules/VoteActionForm.tsx | 1 + .../components/organisms/AutomatedVotingOptions.tsx | 5 ++++- govtool/frontend/src/components/organisms/BgCard.tsx | 3 ++- .../organisms/DashboardCards/DRepDashboardCard.tsx | 2 +- .../DashboardCards/DelegateDashboardCard.tsx | 2 +- .../frontend/src/components/organisms/HomeCards.tsx | 2 +- .../RegisterAsDRepSteps/DRepStorageInformation.tsx | 1 + .../RegisterAsDRepSteps/RegisterAsDRepForm.tsx | 11 ++++++++++- .../RegisterAsDRepSteps/WhatRetirementMeans.tsx | 1 + govtool/frontend/src/components/organisms/TopNav.tsx | 1 + .../organisms/VoteContext/VoteContextText.tsx | 1 + govtool/frontend/src/components/organisms/types.ts | 1 + 13 files changed, 26 insertions(+), 6 deletions(-) diff --git a/govtool/frontend/src/components/molecules/AutomatedVotingCard.tsx b/govtool/frontend/src/components/molecules/AutomatedVotingCard.tsx index ec1d75171..cc56895d3 100644 --- a/govtool/frontend/src/components/molecules/AutomatedVotingCard.tsx +++ b/govtool/frontend/src/components/molecules/AutomatedVotingCard.tsx @@ -50,6 +50,7 @@ export const AutomatedVotingCard = ({ mt: inProgress || isSelected ? 2 : 0, py: 2.25, }} + data-testid={`${testIdLabel}-card`} > {voteContextText ? t("govActions.provideNewContextAboutYourVote") diff --git a/govtool/frontend/src/components/organisms/AutomatedVotingOptions.tsx b/govtool/frontend/src/components/organisms/AutomatedVotingOptions.tsx index 52772f98d..92fac90e4 100644 --- a/govtool/frontend/src/components/organisms/AutomatedVotingOptions.tsx +++ b/govtool/frontend/src/components/organisms/AutomatedVotingOptions.tsx @@ -74,7 +74,10 @@ export const AutomatedVotingOptions = ({ /> )} - + ( ) : null} diff --git a/govtool/frontend/src/components/organisms/RegisterAsDRepSteps/WhatRetirementMeans.tsx b/govtool/frontend/src/components/organisms/RegisterAsDRepSteps/WhatRetirementMeans.tsx index 5b7db0914..36e6459ac 100644 --- a/govtool/frontend/src/components/organisms/RegisterAsDRepSteps/WhatRetirementMeans.tsx +++ b/govtool/frontend/src/components/organisms/RegisterAsDRepSteps/WhatRetirementMeans.tsx @@ -85,6 +85,7 @@ export const WhatRetirementMeans = ({ return ( { alt="drawer-icon" src={ICONS.drawerIcon} onClick={openDrawer} + data-testid="open-drawer-button" /> )} diff --git a/govtool/frontend/src/components/organisms/VoteContext/VoteContextText.tsx b/govtool/frontend/src/components/organisms/VoteContext/VoteContextText.tsx index f241de814..3ac7117e2 100644 --- a/govtool/frontend/src/components/organisms/VoteContext/VoteContextText.tsx +++ b/govtool/frontend/src/components/organisms/VoteContext/VoteContextText.tsx @@ -71,6 +71,7 @@ export const VoteContextText = ({ {...{ control, errors }} {...fieldProps} isModifiedLayout + data-testid="provide-context-input" /> ); diff --git a/govtool/frontend/src/components/organisms/types.ts b/govtool/frontend/src/components/organisms/types.ts index 4207dd2db..1cd327aed 100644 --- a/govtool/frontend/src/components/organisms/types.ts +++ b/govtool/frontend/src/components/organisms/types.ts @@ -3,6 +3,7 @@ import { Dispatch, SetStateAction } from "react"; export type BgCardProps = { actionButtonLabel: string; + actionButtonDataTestId?: string; backButtonLabel?: string; children: React.ReactNode; isLoadingActionButton?: boolean;