Skip to content

Commit b21269a

Browse files
cortinicometa-codesync[bot]
authored andcommitted
Add ScrollView visual regression tests (#59342)
Summary: Pull Request resolved: #59342 Add a Maestro visual suite for `ScrollView` using existing RNTester examples. Capture stable cropped checkpoints after opening each example and settling animations. See `packages/rn-tester/visual-tests/suites/scroll-view.md` for the example and checkpoint inventory. Changelog: [Internal] Reviewed By: Abbondanzo Differential Revision: D126723205 fbshipit-source-id: 8619cb1c10e549fb8dcd898a6d7365969ba2754d
1 parent cab781f commit b21269a

2 files changed

Lines changed: 83 additions & 0 deletions

File tree

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
appId: ${APP_ID}
2+
---
3+
- runFlow:
4+
file: ../helpers/open-example.yml
5+
env:
6+
EXAMPLE_URL: rntester://example/ScrollViewExample/scrollTo
7+
- extendedWaitUntil:
8+
visible:
9+
id: 'scroll_vertical'
10+
timeout: 15000
11+
- tapOn:
12+
id: 'scroll_to_bottom_button'
13+
- waitForAnimationToEnd:
14+
timeout: 5000
15+
- takeScreenshot:
16+
path: ${VISUAL_OUTPUT_DIR}/scroll-view/scroll-to/end
17+
cropOn:
18+
id: 'scroll_vertical'
19+
- tapOn:
20+
id: 'scroll_to_top_button'
21+
- waitForAnimationToEnd:
22+
timeout: 5000
23+
- takeScreenshot:
24+
path: ${VISUAL_OUTPUT_DIR}/scroll-view/scroll-to/start
25+
cropOn:
26+
id: 'scroll_vertical'
27+
- runFlow:
28+
file: ../helpers/open-example.yml
29+
env:
30+
EXAMPLE_URL: rntester://example/ScrollViewExample/horizontalScrollTo
31+
- extendedWaitUntil:
32+
visible:
33+
id: 'scroll_horizontal'
34+
timeout: 15000
35+
- tapOn:
36+
id: 'scroll_to_end_button'
37+
- waitForAnimationToEnd:
38+
timeout: 5000
39+
- takeScreenshot:
40+
path: ${VISUAL_OUTPUT_DIR}/scroll-view/horizontal-scroll-to/end
41+
cropOn:
42+
id: 'scroll_horizontal'
43+
- tapOn:
44+
id: 'scroll_to_start_button'
45+
- waitForAnimationToEnd:
46+
timeout: 5000
47+
- takeScreenshot:
48+
path: ${VISUAL_OUTPUT_DIR}/scroll-view/horizontal-scroll-to/start
49+
cropOn:
50+
id: 'scroll_horizontal'
51+
- runFlow:
52+
file: ../helpers/open-example.yml
53+
env:
54+
EXAMPLE_URL: rntester://example/ScrollViewExample/invertStickyHeaders
55+
- extendedWaitUntil:
56+
visible:
57+
id: 'scroll_sticky_header'
58+
timeout: 15000
59+
- tapOn:
60+
id: 'scroll_to_bottom_button'
61+
- waitForAnimationToEnd:
62+
timeout: 5000
63+
- takeScreenshot:
64+
path: ${VISUAL_OUTPUT_DIR}/scroll-view/sticky-header/end
65+
cropOn:
66+
id: 'scroll_sticky_header'
67+
- tapOn:
68+
id: 'scroll_to_top_button'
69+
- waitForAnimationToEnd:
70+
timeout: 5000
71+
- takeScreenshot:
72+
path: ${VISUAL_OUTPUT_DIR}/scroll-view/sticky-header/start
73+
cropOn:
74+
id: 'scroll_sticky_header'
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# ScrollView visual tests
2+
3+
| Example | Checkpoints |
4+
| --- | --- |
5+
| `scrollTo` | End, then start after programmatic scrolling |
6+
| `horizontalScrollTo` | End, then start after programmatic scrolling |
7+
| `invertStickyHeaders` | End, then start after programmatic scrolling |
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)