Skip to content

Commit e9443ba

Browse files
cortinicometa-codesync[bot]
authored andcommitted
Add Touchable visual regression tests (#59338)
Summary: Pull Request resolved: #59338 Add a Maestro visual suite for `Touchable` using existing RNTester examples. Capture stable cropped checkpoints after opening each example and settling animations. See `packages/rn-tester/visual-tests/suites/touchable.md` for the example and checkpoint inventory. Changelog: [Internal] Reviewed By: Abbondanzo Differential Revision: D126723208 fbshipit-source-id: 386f4fbb9d8f89aaceb7e182509cc8a812f45b1a
1 parent faee7a4 commit e9443ba

2 files changed

Lines changed: 86 additions & 0 deletions

File tree

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
appId: ${APP_ID}
2+
---
3+
- runFlow:
4+
file: ../helpers/open-example.yml
5+
env:
6+
EXAMPLE_URL: rntester://example/TouchableExample/highlight
7+
- extendedWaitUntil:
8+
visible:
9+
id: 'touchable_highlight_text_button'
10+
timeout: 15000
11+
- waitForAnimationToEnd:
12+
timeout: 5000
13+
- takeScreenshot:
14+
path: ${VISUAL_OUTPUT_DIR}/touchable/highlight/default
15+
cropOn:
16+
id: 'touchable_highlight_text_button'
17+
- tapOn:
18+
id: 'touchable_highlight_text_button'
19+
- assertVisible:
20+
id: 'touchable_highlight_console'
21+
text: 'TouchableHighlight onPress'
22+
- waitForAnimationToEnd:
23+
timeout: 5000
24+
- takeScreenshot:
25+
path: ${VISUAL_OUTPUT_DIR}/touchable/highlight/pressed
26+
cropOn:
27+
id: 'touchable_highlight_console'
28+
- runFlow:
29+
file: ../helpers/open-example.yml
30+
env:
31+
EXAMPLE_URL: rntester://example/TouchableExample/without-feedback
32+
- extendedWaitUntil:
33+
visible:
34+
id: 'touchable_without_feedback_button'
35+
timeout: 15000
36+
- waitForAnimationToEnd:
37+
timeout: 5000
38+
- takeScreenshot:
39+
path: ${VISUAL_OUTPUT_DIR}/touchable/without-feedback/default
40+
cropOn:
41+
id: 'example-container'
42+
- tapOn:
43+
id: 'touchable_without_feedback_button'
44+
- assertVisible:
45+
id: 'touchable_without_feedback_console'
46+
text: 'TouchableWithoutFeedback onPress'
47+
- waitForAnimationToEnd:
48+
timeout: 5000
49+
- takeScreenshot:
50+
path: ${VISUAL_OUTPUT_DIR}/touchable/without-feedback/pressed
51+
cropOn:
52+
id: 'example-container'
53+
- runFlow:
54+
file: ../helpers/open-example.yml
55+
env:
56+
EXAMPLE_URL: rntester://example/TouchableExample/feedback-events
57+
- extendedWaitUntil:
58+
visible:
59+
id: 'touchable_feedback_events_button'
60+
timeout: 15000
61+
- waitForAnimationToEnd:
62+
timeout: 5000
63+
- takeScreenshot:
64+
path: ${VISUAL_OUTPUT_DIR}/touchable/feedback-events/default
65+
cropOn:
66+
id: 'touchable_feedback_events'
67+
- tapOn:
68+
id: 'touchable_feedback_events_button'
69+
- assertVisible:
70+
id: 'touchable_feedback_events_console'
71+
- assertVisible: 'press'
72+
- waitForAnimationToEnd:
73+
timeout: 5000
74+
- takeScreenshot:
75+
path: ${VISUAL_OUTPUT_DIR}/touchable/feedback-events/pressed
76+
cropOn:
77+
id: 'touchable_feedback_events'
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Touchable visual tests
2+
3+
| Example | Checkpoints |
4+
| --- | --- |
5+
| `highlight` | Text control and onPress log, excluding the network image |
6+
| `without-feedback` | Initial appearance and onPress feedback |
7+
| `feedback-events` | Initial appearance and onPress feedback |
8+
9+
Screenshots use the existing RNTester example crops. Each example starts from a fresh app launch; captures wait for the target and for animations to settle.

0 commit comments

Comments
 (0)