diff --git a/govtool/frontend/src/components/molecules/LinkWithIcon.tsx b/govtool/frontend/src/components/molecules/LinkWithIcon.tsx index ecfa97b16..7eef35a94 100644 --- a/govtool/frontend/src/components/molecules/LinkWithIcon.tsx +++ b/govtool/frontend/src/components/molecules/LinkWithIcon.tsx @@ -6,6 +6,7 @@ import { Typography } from "@atoms"; import { LinkWithIconProps } from "./types"; export const LinkWithIcon = ({ + dataTestId, label, onClick, icon, @@ -13,7 +14,7 @@ export const LinkWithIcon = ({ cutWithEllipsis, }: LinkWithIconProps) => ( + ); } }); @@ -93,8 +97,9 @@ export const CreateGovernanceActionForm = ({ links.length > 1 ? ( removeLink(index)} + sx={{ cursor: "pointer", height: 24, with: 24 }} /> ) : null } @@ -141,7 +146,12 @@ export const CreateGovernanceActionForm = ({ {renderLinks()} {links?.length < MAX_NUMBER_OF_LINKS ? ( - ) : null} diff --git a/govtool/frontend/src/components/organisms/CreateGovernanceActionSteps/ReviewCreatedGovernanceAction.tsx b/govtool/frontend/src/components/organisms/CreateGovernanceActionSteps/ReviewCreatedGovernanceAction.tsx index 488afddd9..9911da359 100644 --- a/govtool/frontend/src/components/organisms/CreateGovernanceActionSteps/ReviewCreatedGovernanceAction.tsx +++ b/govtool/frontend/src/components/organisms/CreateGovernanceActionSteps/ReviewCreatedGovernanceAction.tsx @@ -9,7 +9,7 @@ import { useTranslation, } from "@hooks"; import { LinkWithIcon } from "@molecules"; -import { openInNewTab } from "@utils"; +import { openInNewTab, testIdFromLabel } from "@utils"; import { Dispatch, SetStateAction } from "react"; import { BgCard } from "../BgCard"; @@ -58,6 +58,8 @@ export const ReviewCreatedGovernanceAction = ({ {label} @@ -82,9 +84,10 @@ export const ReviewCreatedGovernanceAction = ({ {t("createGovernanceAction.supportingLinks")} {links.map( - (link: string) => + (link: string, index: number) => link && ( } label={link} onClick={() => onClickLink(link)} @@ -107,6 +110,7 @@ export const ReviewCreatedGovernanceAction = ({