Skip to content

Commit b7ebba9

Browse files
committed
feat(ios, android): mobile e2e tests
1 parent 54f77f9 commit b7ebba9

17 files changed

Lines changed: 114 additions & 2 deletions
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
appId: swmansion.enriched.example
2+
---
3+
# Test maxLength behavior: typing, native copy/paste, and HTML imperative setting
4+
- launchApp
5+
6+
- tapOn:
7+
id: 'toggle-screen-button'
8+
9+
# 1. Press the button to set maxLength to 10
10+
- tapOn:
11+
id: 'max-length-10-button'
12+
13+
- tapOn:
14+
id: 'editor-input'
15+
16+
# 2. Write 1234567890, try to write more. The extra '123' should be rejected.
17+
- inputText: '1234567890'
18+
- inputText: '123'
19+
20+
- runFlow:
21+
file: '../subflows/capture_or_assert_screenshot.yaml'
22+
env:
23+
SCREENSHOT_NAME: 'maxlength_typing_limit'
24+
25+
# 3. Remove 4 characters to have '123456', select it, copy, and paste at the end.
26+
- tapOn:
27+
id: 'editor-input'
28+
point: '50%, 50%'
29+
30+
- pressKey: backspace
31+
- pressKey: backspace
32+
- pressKey: backspace
33+
- pressKey: backspace
34+
35+
- doubleTapOn:
36+
id: 'editor-input'
37+
point: '10%, 30%'
38+
39+
- tapOn:
40+
text: 'Copy'
41+
42+
- tapOn:
43+
id: 'editor-input'
44+
point: '50%, 30%'
45+
46+
- longPressOn:
47+
id: 'editor-input'
48+
point: '50%, 30%'
49+
50+
- tapOn:
51+
text: 'Paste'
52+
53+
- runFlow:
54+
file: '../subflows/capture_or_assert_screenshot.yaml'
55+
env:
56+
SCREENSHOT_NAME: 'maxlength_paste_limit'
57+
58+
# 4. Set inputs value as `123456 <a>some longer link</a>`, style should be present on remaining text
59+
- runFlow:
60+
file: '../subflows/set_editor_value.yaml'
61+
env:
62+
VALUE: '<p>123456 <a href="https://swmansion.com">some longer link</a></p>'
63+
64+
- runFlow:
65+
file: '../subflows/capture_or_assert_screenshot.yaml'
66+
env:
67+
SCREENSHOT_NAME: 'maxlength_link_kept'
68+
69+
# 5. Set inputs value as `123456 <mention>John Doe</mention>`, style should be stripped
70+
- runFlow:
71+
file: '../subflows/set_editor_value.yaml'
72+
env:
73+
VALUE: '<p>12345 <mention text="@John Doe" indicator="@">@John Doe</mention></p>'
74+
75+
- runFlow:
76+
file: '../subflows/capture_or_assert_screenshot.yaml'
77+
env:
78+
SCREENSHOT_NAME: 'maxlength_mention_stripped'
5.96 KB
Loading
5.86 KB
Loading
4.39 KB
Loading
6.45 KB
Loading
14.6 KB
Loading
14.6 KB
Loading
14.6 KB
Loading
6.99 KB
Loading
7.02 KB
Loading

0 commit comments

Comments
 (0)