Skip to content

Commit faee7a4

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

2 files changed

Lines changed: 68 additions & 0 deletions

File tree

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
appId: ${APP_ID}
2+
---
3+
- runFlow:
4+
file: ../helpers/open-example.yml
5+
env:
6+
EXAMPLE_URL: rntester://example/ButtonExample/default-styling
7+
- extendedWaitUntil:
8+
visible:
9+
id: 'example-container'
10+
timeout: 15000
11+
- waitForAnimationToEnd:
12+
timeout: 5000
13+
- takeScreenshot:
14+
path: ${VISUAL_OUTPUT_DIR}/button/default-styling/default
15+
cropOn:
16+
id: 'example-container'
17+
- runFlow:
18+
file: ../helpers/open-example.yml
19+
env:
20+
EXAMPLE_URL: rntester://example/ButtonExample/disabled
21+
- extendedWaitUntil:
22+
visible:
23+
id: 'example-container'
24+
timeout: 15000
25+
- waitForAnimationToEnd:
26+
timeout: 5000
27+
- takeScreenshot:
28+
path: ${VISUAL_OUTPUT_DIR}/button/disabled/default
29+
cropOn:
30+
id: 'example-container'
31+
- runFlow:
32+
file: ../helpers/open-example.yml
33+
env:
34+
EXAMPLE_URL: rntester://example/ButtonExample/color-red
35+
- extendedWaitUntil:
36+
visible:
37+
id: 'example-container'
38+
timeout: 15000
39+
- waitForAnimationToEnd:
40+
timeout: 5000
41+
- takeScreenshot:
42+
path: ${VISUAL_OUTPUT_DIR}/button/color-red/default
43+
cropOn:
44+
id: 'example-container'
45+
- runFlow:
46+
file: ../helpers/open-example.yml
47+
env:
48+
EXAMPLE_URL: rntester://example/ButtonExample/two-buttons-flexbox
49+
- extendedWaitUntil:
50+
visible:
51+
id: 'example-container'
52+
timeout: 15000
53+
- waitForAnimationToEnd:
54+
timeout: 5000
55+
- takeScreenshot:
56+
path: ${VISUAL_OUTPUT_DIR}/button/two-buttons-flexbox/default
57+
cropOn:
58+
id: 'example-container'
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Button visual tests
2+
3+
| Example | Checkpoints |
4+
| --- | --- |
5+
| `default-styling` | Initial rendering |
6+
| `disabled` | Initial rendering |
7+
| `color-red` | Initial rendering |
8+
| `two-buttons-flexbox` | Initial rendering |
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)