Skip to content

Commit c40eac2

Browse files
committed
test: add testId hoocks for E2E tests
1 parent 71aa952 commit c40eac2

File tree

5 files changed

+12
-4
lines changed

5 files changed

+12
-4
lines changed

src/components/Money.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ const Money = (props: MoneyProps): ReactElement => {
146146
</Text>
147147
)}
148148
{showSymbol && symbol}
149-
<Text color={color} testID="MoneyText">
149+
<Text color={color} testID={`MoneyText${testID}`}>
150150
{text}
151151
</Text>
152152
</View>

src/screens/Wallets/Receive/ReceiveAmount.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ const ReceiveAmount = ({
119119
{t('minimum')}
120120
</Caption13Up>
121121
<Money
122+
testID="Minimum" // appended to 'MoneyText'
122123
sats={minimumAmount}
123124
size="bodySSB"
124125
symbol={true}

src/screens/Wallets/Receive/ReceiveConnect.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ const FeeInfo = ({
7878

7979
return (
8080
<>
81-
<BodyM style={styles.text} color="secondary">
81+
<BodyM
82+
testID="ReceiveReviewLspFeeText"
83+
style={styles.text}
84+
color="secondary">
8285
<Trans
8386
t={t}
8487
i18nKey={
@@ -172,7 +175,7 @@ const ReceiveConnect = ({
172175
<GradientView style={styles.container}>
173176
<BottomSheetNavigationHeader title={t('receive_bitcoin')} />
174177
<View style={styles.content}>
175-
<AmountToggle amount={amount} />
178+
<AmountToggle testID="Review" amount={amount} />
176179

177180
{!isLoading && feeEstimate ? (
178181
<FeeInfo fees={feeEstimate} isAdditional={isAdditional} />

src/screens/Wallets/Receive/ReceiveQR.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,8 @@ const ReceiveQR = ({
630630
style={styles.switchRow}
631631
color="purple"
632632
isEnabled={enableInstant}
633-
onPress={onToggleInstant}>
633+
onPress={onToggleInstant}
634+
testID="ReceiveInstantSwitch">
634635
{!enableInstant && <ArrowLNFunds color="secondary" />}
635636
<BodyM>{t('receive_spending')}</BodyM>
636637
</SwitchRow>

src/utils/lightning/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import lm, {
3434
TPaymentReq,
3535
TTransactionData,
3636
TTransactionPosition,
37+
ELdkLogLevels,
3738
TGetBestBlock,
3839
} from '@synonymdev/react-native-ldk';
3940

@@ -462,6 +463,8 @@ export const setupLdk = async ({
462463
return err(e);
463464
}
464465

466+
await ldk.setLogLevel(ELdkLogLevels.trace, true);
467+
465468
const lmStart = await lm.start({
466469
account: account.value,
467470
getFees,

0 commit comments

Comments
 (0)