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