Skip to content

Commit cfb3547

Browse files
cortinicometa-codesync[bot]
authored andcommitted
Add TextInput visual regression tests (#59344)
Summary: Pull Request resolved: #59344 Add a Maestro visual suite for `TextInput` using existing RNTester examples. Capture stable cropped checkpoints after opening each example and settling animations. See `packages/rn-tester/visual-tests/suites/text-input.md` for the example and checkpoint inventory. Changelog: [Internal] Reviewed By: Abbondanzo Differential Revision: D126723200
1 parent 6219dd4 commit cfb3547

2 files changed

Lines changed: 121 additions & 0 deletions

File tree

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
appId: ${APP_ID}
2+
---
3+
- runFlow:
4+
file: ../helpers/open-example.yml
5+
env:
6+
EXAMPLE_URL: rntester://example/TextInputExample/clipping
7+
- extendedWaitUntil:
8+
visible:
9+
id: 'textinput-clipping'
10+
timeout: 15000
11+
- waitForAnimationToEnd:
12+
timeout: 5000
13+
- takeScreenshot:
14+
path: ${VISUAL_OUTPUT_DIR}/text-input/clipping/default
15+
cropOn:
16+
id: 'textinput-clipping'
17+
- runFlow:
18+
file: ../helpers/open-example.yml
19+
env:
20+
EXAMPLE_URL: rntester://example/TextInputExample/placeholderEllipsizing
21+
- extendedWaitUntil:
22+
visible:
23+
id: 'textinput-placeholder-singleline'
24+
timeout: 15000
25+
- waitForAnimationToEnd:
26+
timeout: 5000
27+
- takeScreenshot:
28+
path: ${VISUAL_OUTPUT_DIR}/text-input/placeholder-ellipsizing/singleline
29+
cropOn:
30+
id: 'textinput-placeholder-singleline'
31+
- extendedWaitUntil:
32+
visible:
33+
id: 'textinput-placeholder-multiline'
34+
timeout: 15000
35+
- waitForAnimationToEnd:
36+
timeout: 5000
37+
- takeScreenshot:
38+
path: ${VISUAL_OUTPUT_DIR}/text-input/placeholder-ellipsizing/multiline
39+
cropOn:
40+
id: 'textinput-placeholder-multiline'
41+
- runFlow:
42+
file: ../helpers/open-example.yml
43+
env:
44+
EXAMPLE_URL: rntester://example/TextInputExample/textStyles
45+
- extendedWaitUntil:
46+
visible:
47+
id: 'text-styles'
48+
timeout: 15000
49+
- assertVisible:
50+
id: 'cycle-styles-label'
51+
text: 'Cycle 1/6'
52+
- waitForAnimationToEnd:
53+
timeout: 5000
54+
- takeScreenshot:
55+
path: ${VISUAL_OUTPUT_DIR}/text-input/text-styles/cycle-1
56+
cropOn:
57+
id: 'text-styles'
58+
- tapOn:
59+
id: 'cycle-styles'
60+
- assertVisible:
61+
id: 'cycle-styles-label'
62+
text: 'Cycle 2/6'
63+
- waitForAnimationToEnd:
64+
timeout: 5000
65+
- takeScreenshot:
66+
path: ${VISUAL_OUTPUT_DIR}/text-input/text-styles/cycle-2
67+
cropOn:
68+
id: 'text-styles'
69+
- tapOn:
70+
id: 'cycle-styles'
71+
- assertVisible:
72+
id: 'cycle-styles-label'
73+
text: 'Cycle 3/6'
74+
- waitForAnimationToEnd:
75+
timeout: 5000
76+
- takeScreenshot:
77+
path: ${VISUAL_OUTPUT_DIR}/text-input/text-styles/cycle-3
78+
cropOn:
79+
id: 'text-styles'
80+
- tapOn:
81+
id: 'cycle-styles'
82+
- assertVisible:
83+
id: 'cycle-styles-label'
84+
text: 'Cycle 4/6'
85+
- waitForAnimationToEnd:
86+
timeout: 5000
87+
- takeScreenshot:
88+
path: ${VISUAL_OUTPUT_DIR}/text-input/text-styles/cycle-4
89+
cropOn:
90+
id: 'text-styles'
91+
- tapOn:
92+
id: 'cycle-styles'
93+
- assertVisible:
94+
id: 'cycle-styles-label'
95+
text: 'Cycle 5/6'
96+
- waitForAnimationToEnd:
97+
timeout: 5000
98+
- takeScreenshot:
99+
path: ${VISUAL_OUTPUT_DIR}/text-input/text-styles/cycle-5
100+
cropOn:
101+
id: 'text-styles'
102+
- tapOn:
103+
id: 'cycle-styles'
104+
- assertVisible:
105+
id: 'cycle-styles-label'
106+
text: 'Cycle 6/6'
107+
- waitForAnimationToEnd:
108+
timeout: 5000
109+
- takeScreenshot:
110+
path: ${VISUAL_OUTPUT_DIR}/text-input/text-styles/cycle-6
111+
cropOn:
112+
id: 'text-styles'
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# TextInput visual tests
2+
3+
| Example | Checkpoints |
4+
| --- | --- |
5+
| `clipping` | Initial rendering |
6+
| `placeholderEllipsizing` | Single-line and multiline placeholders |
7+
| `textStyles` | Cycles 1–6 of nested single-line and multiline styles |
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)