Skip to content

Commit e369b5e

Browse files
chore: added test ids to maestro flows
1 parent d079ba6 commit e369b5e

File tree

10 files changed

+45
-14
lines changed

10 files changed

+45
-14
lines changed

.maestro/native/connect_confirm.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,15 @@ name: React Native Dapp to React Native Wallet Connection Confirmed
66
permissions:
77
all: allow
88
- startRecording: "Native Connection Confirmed"
9-
- tapOn: "Connect"
10-
- tapOn: "React Native Wallet"
11-
- tapOn: "Approve"
9+
- tapOn:
10+
id: "connect-button"
11+
- tapOn:
12+
id: "all-wallets"
13+
- waitForAnimationToEnd
14+
- tapOn: "React"
15+
- waitForAnimationToEnd
16+
- tapOn:
17+
id: "approve-button"
18+
- waitForAnimationToEnd
1219
- assertVisible: "Sign message"
1320
- stopRecording
Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
appId: com.walletconnect.web3modal.rnsample.internal
2-
name: React Native Dapp to React Native Wallet Connection Confirmed
2+
name: React Native Dapp to React Native Wallet Connection Rejected
33
---
44
- clearState
55
- launchApp:
66
permissions:
77
all: allow
88
- startRecording: "Native to Native Connection Rejected"
9-
- tapOn: "Connect"
10-
- tapOn: "React Native Wallet"
11-
- tapOn: "Reject"
9+
- tapOn:
10+
id: "connect-button"
11+
- tapOn:
12+
id: "all-wallets"
13+
- waitForAnimationToEnd
14+
- tapOn: "React"
15+
- waitForAnimationToEnd
16+
- tapOn:
17+
id: "reject-button"
18+
- waitForAnimationToEnd
1219
- assertVisible: "Connection declined"
1320
- stopRecording

.maestro/native/personal_sign_confirm.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ name: React Native Dapp to React Native Wallet Personal Sign Confirmed
55
permissions:
66
all: allow
77
- startRecording: "Native personal_sign Confirmed"
8+
- waitForAnimationToEnd
89
- tapOn: "Sign message"
9-
- tapOn: "Approve"
10+
- tapOn:
11+
id: "approve-button"
1012
- assertVisible: "Request response"
1113
- stopRecording

.maestro/native/personal_sign_reject.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ name: React Native Dapp to React Native Wallet Personal Sign Rejected
55
permissions:
66
all: allow
77
- startRecording: "Native personal_sign Rejected"
8+
- waitForAnimationToEnd
89
- tapOn: "Sign message"
9-
- tapOn: "Reject"
10+
- tapOn:
11+
id: "reject-button"
1012
- assertVisible: "Request failure"
1113
- stopRecording

.maestro/web/connect_confirm.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ name: AppKit Web to React Native Wallet Connection Confirmed
1818
platform: iOS
1919
commands:
2020
- back
21-
- tapOn: "Approve"
21+
- tapOn:
22+
id: "approve-button"
2223
- assertVisible: "AppKit Interactions"
2324
- stopRecording

.maestro/web/connect_reject.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ name: AppKit Web to React Native Wallet Connection Rejected
1313
- scroll
1414
- scroll
1515
- tapOn: "React Native Sample Wallet React Native Sample Wallet"
16-
- tapOn: "Reject"
16+
- tapOn:
17+
id: "reject-button"
1718
- runFlow:
1819
when:
1920
platform: iOS

.maestro/web/personal_sign_confirm.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,14 @@ name: AppKit Web to React Native Wallet Sign Request Confirmed
1111
- scroll
1212
- scroll
1313
- tapOn: "Sign Message"
14-
- tapOn: "Approve"
14+
- waitForAnimationToEnd
15+
- tapOn:
16+
id: "approve-button"
1517
- runFlow:
1618
when:
1719
platform: iOS
1820
commands:
1921
- back
22+
- waitForAnimationToEnd
2023
- assertVisible: "Signing Succeeded"
2124
- stopRecording

.maestro/web/personal_sign_reject.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,14 @@ name: AppKit Web to React Native Wallet Sign Request Rejected
1111
- scroll
1212
- scroll
1313
- tapOn: "Sign Message"
14-
- tapOn: "Reject"
14+
- waitForAnimationToEnd
15+
- tapOn:
16+
id: "reject-button"
1517
- runFlow:
1618
when:
1719
platform: iOS
1820
commands:
1921
- back
22+
- waitForAnimationToEnd
2023
- assertVisible: "Signing Failed"
2124
- stopRecording

wallets/rn_cli_wallet/src/components/ActionButton.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export interface ActionButtonProps {
1717
disabled?: boolean;
1818
style?: StyleProp<ViewStyle>;
1919
textStyle?: StyleProp<TextStyle>;
20+
testID?: string;
2021
}
2122

2223
export function ActionButton({
@@ -27,6 +28,7 @@ export function ActionButton({
2728
disabled,
2829
style,
2930
textStyle,
31+
testID,
3032
}: ActionButtonProps) {
3133
const Theme = useTheme();
3234
const backgroundColor = secondary ? Theme['bg-200'] : Theme['accent-100'];
@@ -35,6 +37,7 @@ export function ActionButton({
3537
return (
3638
<TouchableOpacity
3739
onPress={onPress}
40+
testID={testID}
3841
disabled={disabled || loading}
3942
style={[styles.container, {backgroundColor}, style]}>
4043
{loading ? (

wallets/rn_cli_wallet/src/components/Modal/ModalFooter.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export function ModalFooter({
4141
style={styles.button}
4242
textStyle={styles.rejectText}
4343
onPress={onReject}
44+
testID="reject-button"
4445
secondary>
4546
Reject
4647
</ActionButton>
@@ -49,7 +50,8 @@ export function ModalFooter({
4950
disabled={approveLoader || rejectLoader}
5051
style={[styles.button, {backgroundColor: bgColor}]}
5152
textStyle={styles.approveText}
52-
onPress={onApprove}>
53+
onPress={onApprove}
54+
testID="approve-button">
5355
Approve
5456
</ActionButton>
5557
</View>

0 commit comments

Comments
 (0)