Skip to content

Commit 053d003

Browse files
committed
feat: add gesture command coverage
1 parent 6617d52 commit 053d003

40 files changed

Lines changed: 1270 additions & 32 deletions

examples/test-app/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ pnpm test-app:replay:android
8888

8989
These run the `.ad` replay suite in `examples/test-app/replays`.
9090

91+
`gesture-lab.ad` is iOS-only and verifies `pan`, `fling`, `pinch`, and
92+
`rotate-gesture` against the gesture metrics rendered by the Home screen.
93+
9194
To target a specific iOS simulator or an installed Expo development build, run the
9295
underlying command directly so global flags stay before replay inputs:
9396

examples/test-app/app/_layout.tsx

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { ThemeProvider } from '@react-navigation/native';
22
import { Stack } from 'expo-router';
33
import { StatusBar } from 'expo-status-bar';
4+
import { StyleSheet } from 'react-native';
5+
import { GestureHandlerRootView } from 'react-native-gesture-handler';
46
import { SafeAreaProvider } from 'react-native-safe-area-context';
57

68
import { ToastViewport } from '../src/components';
@@ -30,10 +32,18 @@ function RootLayoutContent() {
3032

3133
export default function RootLayout() {
3234
return (
33-
<SafeAreaProvider>
34-
<LabStateProvider>
35-
<RootLayoutContent />
36-
</LabStateProvider>
37-
</SafeAreaProvider>
35+
<GestureHandlerRootView style={styles.root}>
36+
<SafeAreaProvider>
37+
<LabStateProvider>
38+
<RootLayoutContent />
39+
</LabStateProvider>
40+
</SafeAreaProvider>
41+
</GestureHandlerRootView>
3842
);
3943
}
44+
45+
const styles = StyleSheet.create({
46+
root: {
47+
flex: 1,
48+
},
49+
});

examples/test-app/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"expo-status-bar": "~55.0.5",
2020
"react": "19.2.0",
2121
"react-native": "0.83.4",
22+
"react-native-gesture-handler": "^2.31.2",
2223
"react-native-safe-area-context": "~5.6.2",
2324
"react-native-screens": "~4.23.0"
2425
},

examples/test-app/pnpm-lock.yaml

Lines changed: 65 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
context platform=ios timeout=60000
2+
3+
env APP_TARGET="Agent Device Tester"
4+
env APP_URL=""
5+
6+
open "${APP_TARGET}" --relaunch --launch-url "${APP_URL}"
7+
wait "Gesture lab" 30000
8+
9+
pan 195 443 40 0
10+
wait "pan changed yes" 5000
11+
12+
fling right 195 443 180
13+
wait "x 72" 5000
14+
15+
pinch 1.25 195 443
16+
wait "pinch changed yes" 5000
17+
18+
rotate-gesture 35 195 443
19+
wait "rotate changed yes" 5000
20+
wait "scale 1.30" 5000
21+
22+
close

0 commit comments

Comments
 (0)