Skip to content

Commit 149bc7f

Browse files
cortinicometa-codesync[bot]
authored andcommitted
Add View visual regression tests (#59339)
Summary: Pull Request resolved: #59339 Add a Maestro visual suite for `View` using existing RNTester examples. Capture stable cropped checkpoints after opening each example and settling animations. See `packages/rn-tester/visual-tests/suites/view.md` for the example and checkpoint inventory. Changelog: [Internal] Reviewed By: Abbondanzo Differential Revision: D126723201
1 parent 8b8608a commit 149bc7f

2 files changed

Lines changed: 76 additions & 0 deletions

File tree

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
appId: ${APP_ID}
2+
---
3+
- runFlow:
4+
file: ../helpers/open-example.yml
5+
env:
6+
EXAMPLE_URL: rntester://example/ViewExample/opacity
7+
- extendedWaitUntil:
8+
visible:
9+
id: 'view-test-opacity'
10+
timeout: 15000
11+
- waitForAnimationToEnd:
12+
timeout: 5000
13+
- takeScreenshot:
14+
path: ${VISUAL_OUTPUT_DIR}/view/opacity/default
15+
cropOn:
16+
id: 'view-test-opacity'
17+
- runFlow:
18+
file: ../helpers/open-example.yml
19+
env:
20+
EXAMPLE_URL: rntester://example/ViewExample/overflow
21+
- extendedWaitUntil:
22+
visible:
23+
id: 'view-test-overflow'
24+
timeout: 15000
25+
- waitForAnimationToEnd:
26+
timeout: 5000
27+
- takeScreenshot:
28+
path: ${VISUAL_OUTPUT_DIR}/view/overflow/default
29+
cropOn:
30+
id: 'view-test-overflow'
31+
- runFlow:
32+
file: ../helpers/open-example.yml
33+
env:
34+
EXAMPLE_URL: rntester://example/ViewExample/flexgap
35+
- extendedWaitUntil:
36+
visible:
37+
id: 'view-test-flexgap'
38+
timeout: 15000
39+
- waitForAnimationToEnd:
40+
timeout: 5000
41+
- takeScreenshot:
42+
path: ${VISUAL_OUTPUT_DIR}/view/flexgap/default
43+
cropOn:
44+
id: 'view-test-flexgap'
45+
- runFlow:
46+
file: ../helpers/open-example.yml
47+
env:
48+
EXAMPLE_URL: rntester://example/ViewExample/z-index
49+
- extendedWaitUntil:
50+
visible:
51+
id: 'z-index-button'
52+
timeout: 15000
53+
- waitForAnimationToEnd:
54+
timeout: 5000
55+
- takeScreenshot:
56+
path: ${VISUAL_OUTPUT_DIR}/view/z-index/default
57+
cropOn:
58+
id: 'z-index-button'
59+
- tapOn:
60+
id: 'z-index-button'
61+
- waitForAnimationToEnd:
62+
timeout: 5000
63+
- takeScreenshot:
64+
path: ${VISUAL_OUTPUT_DIR}/view/z-index/reordered
65+
cropOn:
66+
id: 'z-index-button'
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# View visual tests
2+
3+
| Example | Checkpoints |
4+
| --- | --- |
5+
| `opacity` | Initial rendering |
6+
| `overflow` | Initial rendering |
7+
| `flexgap` | Initial rendering |
8+
| `z-index` | Initial and reordered stacking |
9+
10+
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)