Skip to content

Commit 6219dd4

Browse files
cortinicometa-codesync[bot]
authored andcommitted
Add Text visual regression tests
Summary: Add a Maestro visual suite for `Text` using existing RNTester examples. Capture stable cropped checkpoints after opening each example and settling animations. See `packages/rn-tester/visual-tests/suites/text.md` for the example and checkpoint inventory. Changelog: [Internal] Differential Revision: D126723199
1 parent 99cc7dd commit 6219dd4

2 files changed

Lines changed: 100 additions & 0 deletions

File tree

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
appId: ${APP_ID}
2+
---
3+
- runFlow:
4+
file: ../helpers/open-example.yml
5+
env:
6+
EXAMPLE_URL: rntester://example/TextExample/wrap
7+
- extendedWaitUntil:
8+
visible:
9+
id: 'text-wrap'
10+
timeout: 15000
11+
- waitForAnimationToEnd:
12+
timeout: 5000
13+
- takeScreenshot:
14+
path: ${VISUAL_OUTPUT_DIR}/text/wrap/default
15+
cropOn:
16+
id: 'text-wrap'
17+
- runFlow:
18+
file: ../helpers/open-example.yml
19+
env:
20+
EXAMPLE_URL: rntester://example/TextExample/nested
21+
- extendedWaitUntil:
22+
visible:
23+
id: 'text-test-nested'
24+
timeout: 15000
25+
- waitForAnimationToEnd:
26+
timeout: 5000
27+
- takeScreenshot:
28+
path: ${VISUAL_OUTPUT_DIR}/text/nested/default
29+
cropOn:
30+
id: 'text-test-nested'
31+
- runFlow:
32+
file: ../helpers/open-example.yml
33+
env:
34+
EXAMPLE_URL: rntester://example/TextExample/ellipsizeMode
35+
- extendedWaitUntil:
36+
visible:
37+
id: 'text-ellipsize-mode'
38+
timeout: 15000
39+
- waitForAnimationToEnd:
40+
timeout: 5000
41+
- takeScreenshot:
42+
path: ${VISUAL_OUTPUT_DIR}/text/ellipsize-mode/default
43+
cropOn:
44+
id: 'text-ellipsize-mode'
45+
- runFlow:
46+
file: ../helpers/open-example.yml
47+
env:
48+
EXAMPLE_URL: rntester://example/TextExample/numberOfLines
49+
- extendedWaitUntil:
50+
visible:
51+
id: 'number-of-lines'
52+
timeout: 15000
53+
- waitForAnimationToEnd:
54+
timeout: 5000
55+
- takeScreenshot:
56+
path: ${VISUAL_OUTPUT_DIR}/text/number-of-lines/default
57+
cropOn:
58+
id: 'number-of-lines'
59+
- runFlow:
60+
file: ../helpers/open-example.yml
61+
env:
62+
EXAMPLE_URL: rntester://example/TextExample/textDecoration
63+
- extendedWaitUntil:
64+
visible:
65+
id: 'text-text-decoration'
66+
timeout: 15000
67+
- waitForAnimationToEnd:
68+
timeout: 5000
69+
- takeScreenshot:
70+
path: ${VISUAL_OUTPUT_DIR}/text/text-decoration/default
71+
cropOn:
72+
id: 'text-text-decoration'
73+
- runFlow:
74+
file: ../helpers/open-example.yml
75+
env:
76+
EXAMPLE_URL: rntester://example/TextExample/textAlign
77+
- extendedWaitUntil:
78+
visible:
79+
id: 'text-align-example'
80+
timeout: 15000
81+
- waitForAnimationToEnd:
82+
timeout: 5000
83+
- takeScreenshot:
84+
path: ${VISUAL_OUTPUT_DIR}/text/text-align/default
85+
cropOn:
86+
id: 'text-align-example'
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Text visual tests
2+
3+
| Example | Checkpoints |
4+
| --- | --- |
5+
| `wrap` | Initial rendering |
6+
| `nested` | Initial rendering |
7+
| `ellipsizeMode` | Initial rendering |
8+
| `numberOfLines` | Initial rendering |
9+
| `textDecoration` | Initial rendering |
10+
| `textAlign` | Initial rendering |
11+
12+
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.
13+
14+
The existing width-mode and last-line-clipping flows provide two additional Text scenarios.

0 commit comments

Comments
 (0)