From 232302fbc45464e56496cf674e182f08c081aa0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sza=C5=82owski?= Date: Thu, 5 Sep 2024 08:36:11 +0200 Subject: [PATCH 1/5] fix(#1934): make displaying own DRep in DRep directory available --- CHANGELOG.md | 2 +- .../src/pages/DRepDirectoryContent.tsx | 34 +++++++------------ 2 files changed, 14 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bfd082028..d168f37d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,7 @@ changes. ### Changed -- +- Make displaying own DRep in DRep directory available [Issue 1934](https://github.com/IntersectMBO/govtool/issues/1934) ### Removed diff --git a/govtool/frontend/src/pages/DRepDirectoryContent.tsx b/govtool/frontend/src/pages/DRepDirectoryContent.tsx index 8fe12aae3..98b5aa417 100644 --- a/govtool/frontend/src/pages/DRepDirectoryContent.tsx +++ b/govtool/frontend/src/pages/DRepDirectoryContent.tsx @@ -208,27 +208,19 @@ export const DRepDirectoryContent: FC = ({ }} > {dRepList?.length === 0 && } - {dRepListToDisplay?.map((dRep) => { - if ( - isSameDRep(dRep, myDrep?.view) || - isSameDRep(dRep, inProgressDelegation) - ) { - return null; - } - return ( - - delegate(dRep.drepId)} - /> - - ); - })} + {dRepListToDisplay?.map((dRep) => ( + + delegate(dRep.drepId)} + /> + + ))} {dRepListHasNextPage && dRepList.length >= 10 && ( From 50741a6c0d01e1d4cc0c960aaa50008f7a0e3e50 Mon Sep 17 00:00:00 2001 From: Joanna Dyczka Date: Thu, 5 Sep 2024 11:22:33 +0200 Subject: [PATCH 2/5] [#1928] make testIds for link and identity references in drep form unique --- CHANGELOG.md | 2 +- govtool/frontend/src/components/molecules/DRepDataForm.tsx | 4 +++- govtool/frontend/src/components/organisms/DRepDetailsCard.tsx | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bfd082028..c0a135576 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,7 @@ changes. ### Fixed -- +- Make testIds for link and identity references in drep form unique [Issue 1928](https://github.com/IntersectMBO/govtool/issues/1928) ### Changed diff --git a/govtool/frontend/src/components/molecules/DRepDataForm.tsx b/govtool/frontend/src/components/molecules/DRepDataForm.tsx index 66b0ceb9e..c332d4dca 100644 --- a/govtool/frontend/src/components/molecules/DRepDataForm.tsx +++ b/govtool/frontend/src/components/molecules/DRepDataForm.tsx @@ -232,6 +232,7 @@ const ReferencesSection = ({ label={t("forms.dRepData.referenceDescription")} name={`${fieldName}.${index}.label`} helpfulText={t("forms.dRepData.referenceDescriptionHelpfulText")} + dataTestId={`${type}-reference-description-${index + 1}-input`} rules={Rules.LINK_DESCRIPTION} /> ))} {references?.length < MAX_NUMBER_OF_LINKS ? (