From 3d050410d12ec500f40d31faa794649e27962a49 Mon Sep 17 00:00:00 2001 From: Francis Rodriguez <39339295+Freshenext@users.noreply.github.com> Date: Mon, 7 Aug 2023 08:00:46 -0400 Subject: [PATCH] Added QA selectors (#701) * feat/NO-REF/Added selectors for QA testing * Added one more selector to the secure later button * Added pindot test label * Added no transaction typography qa selector --- src/screens/createKeys/SecurityInformation.tsx | 10 +++++++++- src/screens/createKeys/new/NewMasterKeyScreen.tsx | 4 ++++ src/screens/home/index.tsx | 8 +++++++- src/screens/pinScreen/index.tsx | 7 +++++++ 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/src/screens/createKeys/SecurityInformation.tsx b/src/screens/createKeys/SecurityInformation.tsx index 60c0c09a5..db03a04e0 100644 --- a/src/screens/createKeys/SecurityInformation.tsx +++ b/src/screens/createKeys/SecurityInformation.tsx @@ -12,6 +12,10 @@ import { castStyle } from 'shared/utils' import { AppButton, AppTouchable, Typography } from 'components/index' import { Checkbox } from 'components/checkbox' +enum TestID { + IAgreeCheckbox = 'Checkbox.IAgreeCheckbox', + ContinueButton = 'Button.ContinueButton', +} export const SecurityInformation = ({ navigation, route: { params }, @@ -55,7 +59,10 @@ export const SecurityInformation = ({ - + @@ -69,6 +76,7 @@ export const SecurityInformation = ({ disabled={!isCheckboxActive} color={sharedColors.white} textColor={sharedColors.black} + accessibilityLabel={TestID.ContinueButton} /> diff --git a/src/screens/createKeys/new/NewMasterKeyScreen.tsx b/src/screens/createKeys/new/NewMasterKeyScreen.tsx index 921430b10..6ad7e26b7 100644 --- a/src/screens/createKeys/new/NewMasterKeyScreen.tsx +++ b/src/screens/createKeys/new/NewMasterKeyScreen.tsx @@ -31,6 +31,9 @@ type Props = CompositeScreenProps< RootTabsScreenProps > +enum TestID { + SecureLaterButton = 'SecureLater', +} export const NewMasterKeyScreen = ({ navigation }: Props) => { const dispatch = useAppDispatch() const { t } = useTranslation() @@ -83,6 +86,7 @@ export const NewMasterKeyScreen = ({ navigation }: Props) => { textType={'h4'} backgroundVariety={AppButtonBackgroundVarietyEnum.OUTLINED} onPress={onSecureLater} + accessibilityLabel={TestID.SecureLaterButton} /> diff --git a/src/screens/home/index.tsx b/src/screens/home/index.tsx index 18bdff429..2d3b4563a 100644 --- a/src/screens/home/index.tsx +++ b/src/screens/home/index.tsx @@ -44,6 +44,9 @@ import { HomeInformationBar } from './HomeInformationBar' import { getTokenColor } from './tokenColor' import { PortfolioComponent } from './PortfolioComponent' +enum TestID { + NoTransactionsTypography = 'NoTransactionsTypography', +} export const HomeScreen = ({ navigation, }: HomeStackScreenProps) => { @@ -265,7 +268,10 @@ export const HomeScreen = ({ {t('home_screen_empty_transactions')} - + {t('home_screen_no_transactions_created')} diff --git a/src/screens/pinScreen/index.tsx b/src/screens/pinScreen/index.tsx index 7c8f8e962..808d2304f 100644 --- a/src/screens/pinScreen/index.tsx +++ b/src/screens/pinScreen/index.tsx @@ -82,6 +82,11 @@ interface InitialPinSettings { initialSteps: ColorValue[] | null } +enum TestID { + OpenKeyboardButton = 'Button.OpenKeyboard', + PINDot = 'PINDot', +} + const getInitialPinSettings = ( isChangeRequested: boolean | undefined, pin: string | null, @@ -393,6 +398,7 @@ export const PinScreen = ({ navigation, route }: Props) => { n && Number(n) >= 0 ? styles.dotActive : styles.dotInactive, styles.dot, ]} + accessibilityLabel={`${index}.${TestID.PINDot}`} /> ))} { title={t('pin_settings_open_keyboard_btn')} textColor={sharedColors.white} backgroundVariety={AppButtonBackgroundVarietyEnum.OUTLINED} + accessibilityLabel={TestID.OpenKeyboardButton} /> )}