Skip to content

Commit

Permalink
Added QA selectors (#701)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Freshenext authored Aug 7, 2023
1 parent d981577 commit 3d05041
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/screens/createKeys/SecurityInformation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down Expand Up @@ -55,7 +59,10 @@ export const SecurityInformation = ({
</View>
<View style={[styles.checkboxBtnWrapper, { bottom: insets.bottom }]}>
<View style={styles.agreementView}>
<AppTouchable width={18} onPress={onToggleCheckbox}>
<AppTouchable
width={18}
onPress={onToggleCheckbox}
accessibilityLabel={TestID.IAgreeCheckbox}>
<Checkbox isEnabled={isCheckboxActive} size={18} />
</AppTouchable>
<Typography type={'body2'} style={styles.agreeText}>
Expand All @@ -69,6 +76,7 @@ export const SecurityInformation = ({
disabled={!isCheckboxActive}
color={sharedColors.white}
textColor={sharedColors.black}
accessibilityLabel={TestID.ContinueButton}
/>
</View>
</View>
Expand Down
4 changes: 4 additions & 0 deletions src/screens/createKeys/new/NewMasterKeyScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ type Props = CompositeScreenProps<
RootTabsScreenProps<rootTabsRouteNames.CreateKeysUX>
>

enum TestID {
SecureLaterButton = 'SecureLater',
}
export const NewMasterKeyScreen = ({ navigation }: Props) => {
const dispatch = useAppDispatch()
const { t } = useTranslation()
Expand Down Expand Up @@ -83,6 +86,7 @@ export const NewMasterKeyScreen = ({ navigation }: Props) => {
textType={'h4'}
backgroundVariety={AppButtonBackgroundVarietyEnum.OUTLINED}
onPress={onSecureLater}
accessibilityLabel={TestID.SecureLaterButton}
/>
</View>
</View>
Expand Down
8 changes: 7 additions & 1 deletion src/screens/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<homeStackRouteNames.Main>) => {
Expand Down Expand Up @@ -265,7 +268,10 @@ export const HomeScreen = ({
<Typography style={styles.emptyTransactionsLabel} type={'h3'}>
{t('home_screen_empty_transactions')}
</Typography>
<Typography style={styles.emptyTransactionsLabel} type={'h4'}>
<Typography
style={styles.emptyTransactionsLabel}
type={'h4'}
accessibilityLabel={TestID.NoTransactionsTypography}>
{t('home_screen_no_transactions_created')}
</Typography>
</>
Expand Down
7 changes: 7 additions & 0 deletions src/screens/pinScreen/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ interface InitialPinSettings {
initialSteps: ColorValue[] | null
}

enum TestID {
OpenKeyboardButton = 'Button.OpenKeyboard',
PINDot = 'PINDot',
}

const getInitialPinSettings = (
isChangeRequested: boolean | undefined,
pin: string | null,
Expand Down Expand Up @@ -393,6 +398,7 @@ export const PinScreen = ({ navigation, route }: Props) => {
n && Number(n) >= 0 ? styles.dotActive : styles.dotInactive,
styles.dot,
]}
accessibilityLabel={`${index}.${TestID.PINDot}`}
/>
))}
<TextInput
Expand All @@ -419,6 +425,7 @@ export const PinScreen = ({ navigation, route }: Props) => {
title={t('pin_settings_open_keyboard_btn')}
textColor={sharedColors.white}
backgroundVariety={AppButtonBackgroundVarietyEnum.OUTLINED}
accessibilityLabel={TestID.OpenKeyboardButton}
/>
</>
)}
Expand Down

0 comments on commit 3d05041

Please sign in to comment.