From afde2215c1bc3010b3674831bd47e79ff5a545f2 Mon Sep 17 00:00:00 2001 From: Francis Rodriguez Date: Fri, 12 Jul 2024 11:00:44 -0400 Subject: [PATCH] FEAT/ADDED-TESTIDS Added a few test ids --- src/app/user/Balances/StakeRIFCell.tsx | 6 +++++- src/app/user/Balances/UnStakeRIFCell.tsx | 6 +++++- src/app/user/Stake/StakePreview.tsx | 8 ++++++-- src/app/user/Stake/StakeRIF.tsx | 11 ++++++++++- src/app/user/Stake/StakeStatus.tsx | 10 ++++++++-- src/app/user/Stake/hooks/useStakeRIF.tsx | 11 +++++++++-- src/components/Button/Button.tsx | 12 ++++++++++-- src/components/TextInput/TextInput.tsx | 4 ++-- 8 files changed, 55 insertions(+), 13 deletions(-) diff --git a/src/app/user/Balances/StakeRIFCell.tsx b/src/app/user/Balances/StakeRIFCell.tsx index dd0d1f64e..63b824551 100644 --- a/src/app/user/Balances/StakeRIFCell.tsx +++ b/src/app/user/Balances/StakeRIFCell.tsx @@ -4,7 +4,11 @@ export const StakeRIFCell = () => { const { stakeModal } = useBalancesContext() return ( -

+

Stake

) diff --git a/src/app/user/Balances/UnStakeRIFCell.tsx b/src/app/user/Balances/UnStakeRIFCell.tsx index c77919573..008d4030c 100644 --- a/src/app/user/Balances/UnStakeRIFCell.tsx +++ b/src/app/user/Balances/UnStakeRIFCell.tsx @@ -4,7 +4,11 @@ export const UnStakeRIFCell = () => { const { unstakeModal } = useBalancesContext() return ( -

+

Unstake

) diff --git a/src/app/user/Stake/StakePreview.tsx b/src/app/user/Stake/StakePreview.tsx index 9f8db4fa4..a66386262 100644 --- a/src/app/user/Stake/StakePreview.tsx +++ b/src/app/user/Stake/StakePreview.tsx @@ -51,10 +51,14 @@ export const StakePreview = ({ {customComponentBeforeFooter} {/* Stake Actions */}
- -
diff --git a/src/app/user/Stake/StakeRIF.tsx b/src/app/user/Stake/StakeRIF.tsx index dc90349fc..eaf4faacd 100644 --- a/src/app/user/Stake/StakeRIF.tsx +++ b/src/app/user/Stake/StakeRIF.tsx @@ -80,7 +80,13 @@ export const StakeRIF = ({ {/* @TODO if we're unstaking we should have a component here - check design */} {/* Stake */}
-
@@ -108,6 +114,9 @@ const PercentageButton = ({ amount, percentage, totalAmountAllowed, onClick }: P ) } diff --git a/src/app/user/Stake/StakeStatus.tsx b/src/app/user/Stake/StakeStatus.tsx index 9535d92d2..e3f47b619 100644 --- a/src/app/user/Stake/StakeStatus.tsx +++ b/src/app/user/Stake/StakeStatus.tsx @@ -63,10 +63,16 @@ export const StakeStatus = ({ {/* Stake Actions */}
- - +
) diff --git a/src/app/user/Stake/hooks/useStakeRIF.tsx b/src/app/user/Stake/hooks/useStakeRIF.tsx index 353b3e2f8..f9730806a 100644 --- a/src/app/user/Stake/hooks/useStakeRIF.tsx +++ b/src/app/user/Stake/hooks/useStakeRIF.tsx @@ -132,7 +132,9 @@ function CustomStakingRIFFooter({ return (
You need to request allowance for stRIF to be able to stake. - +
) case isAllowanceNeeded && isAllowanceTxPending && !!hash: @@ -140,7 +142,12 @@ function CustomStakingRIFFooter({
Allowance TX is in process. Wait for Allowance TX to be mined. - +
) default: diff --git a/src/components/Button/Button.tsx b/src/components/Button/Button.tsx index 86c16b5f5..1ed252de7 100644 --- a/src/components/Button/Button.tsx +++ b/src/components/Button/Button.tsx @@ -14,9 +14,11 @@ interface Props { disabled?: boolean className?: string textClassName?: string - buttonProps?: JSX.IntrinsicElements['button'] + buttonProps?: JSX.IntrinsicElements['button'] & { 'data-testid': string } } +const DEFAULT_DATA_TESTID = 'Button' + export const Button: FC = ({ children: text, onClick, @@ -54,7 +56,13 @@ export const Button: FC = ({ }) return ( -