Skip to content

Commit 942a59e

Browse files
authored
test: added tests for recent bugs 2 (#484)
<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please follow the template so that the reviewers can easily understand what the code changes affect --> # Summary + added tests for RPs: 410, 257, 306, 284, 450 + added handling of `android-only` and `ios-only` tags, so that we can write tests which will be only executed on the specified platform ## Test Plan + execute new tests, see if they pass ```bash yarn test:e2e .maestro/flows/checkbox_toggle.yaml .maestro/flows/codeblock_no_link_detection.yaml .maestro/flows/conflicting_paragraph_merge.yaml .maestro/flows/empty_element_parsing.yaml .maestro/flows/paragraph_styles_no_crash.yaml ``` ## Screenshots / Videos N/A ## Compatibility | OS | Implemented | | ------- | :---------: | | iOS | ✅ | | Android | ✅ |
1 parent 6979b31 commit 942a59e

15 files changed

+213
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
appId: swmansion.enriched.example
2+
---
3+
# PR #410 - fix: remove applying typing attr when toggling checkbox
4+
- launchApp
5+
6+
- tapOn:
7+
id: "toggle-screen-button"
8+
9+
- tapOn:
10+
id: "editor-input"
11+
12+
- tapOn:
13+
id: "toolbar-checkbox-list"
14+
- inputText: "Item one"
15+
- pressKey: Enter
16+
- inputText: "Item two"
17+
- pressKey: Enter
18+
19+
- pressKey: Backspace
20+
- inputText: "Plain text"
21+
- pressKey: Enter
22+
23+
- tapOn:
24+
id: "editor-input"
25+
point: "14%,37%"
26+
27+
- runFlow:
28+
file: "../subflows/capture_or_assert_screenshot.yaml"
29+
env:
30+
SCREENSHOT_NAME: "checkbox_toggle"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
appId: swmansion.enriched.example
2+
---
3+
# PR #257 - fix: handle style conflicts during automatic links detection
4+
- launchApp
5+
6+
- tapOn:
7+
id: "toggle-screen-button"
8+
9+
- tapOn:
10+
id: "editor-input"
11+
12+
- tapOn:
13+
id: "toolbar-code-block"
14+
15+
- inputText: "Hello example.com"
16+
17+
- assertVisible:
18+
id: "toolbar-link"
19+
enabled: false
20+
21+
- runFlow:
22+
file: "../subflows/capture_or_assert_screenshot.yaml"
23+
env:
24+
SCREENSHOT_NAME: "codeblock_no_link_detection"
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
appId: swmansion.enriched.example
2+
---
3+
# PR #306 - fix: handle conflicts between paragraphs
4+
- launchApp
5+
6+
- tapOn:
7+
id: "toggle-screen-button"
8+
9+
- tapOn:
10+
id: "editor-input"
11+
12+
- tapOn:
13+
id: "toolbar-code-block"
14+
- inputText: "Code text"
15+
- pressKey: Enter
16+
17+
- tapOn:
18+
id: "toolbar-code-block"
19+
- tapOn:
20+
id: "toolbar-heading-1"
21+
- inputText: "H1"
22+
23+
# Position cursor at start of H1 line
24+
- tapOn:
25+
id: "editor-input"
26+
point: "5%,75%"
27+
28+
- pressKey: Backspace
29+
30+
- runFlow:
31+
when:
32+
platform: "android"
33+
commands:
34+
- pressKey: Backspace
35+
- inputText: " "
36+
37+
- tapOn:
38+
id: "editor-input"
39+
point: "75%, 50%"
40+
41+
- pressKey: Enter
42+
- tapOn:
43+
id: "toolbar-code-block"
44+
45+
- tapOn:
46+
id: "toolbar-inline-code"
47+
- inputText: "Inline code"
48+
49+
- tapOn:
50+
id: "editor-input"
51+
point: "5%, 75%"
52+
53+
- pressKey: Backspace
54+
- inputText: " "
55+
56+
- runFlow:
57+
file: "../subflows/capture_or_assert_screenshot.yaml"
58+
env:
59+
SCREENSHOT_NAME: "conflicting_paragraph_merge"
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
appId: swmansion.enriched.example
2+
tags:
3+
- android-only
4+
---
5+
# PR #284 - fix: parsing empty elements
6+
- launchApp
7+
- tapOn:
8+
id: "toggle-screen-button"
9+
10+
- runFlow:
11+
file: "../subflows/set_editor_value.yaml"
12+
env:
13+
VALUE: >
14+
<html>
15+
<p>A</p>
16+
<p>B</p>
17+
<p><b>A</b></p>
18+
<p><b>B</b></p>
19+
<ul>
20+
<li><b>A</b></li>
21+
<li><b>B</b></li>
22+
<li><b>C</b></li>
23+
<li><b></b></li>
24+
</ul>
25+
<br>
26+
</html>
27+
28+
- tapOn:
29+
id: "size-max-button"
30+
31+
- runFlow:
32+
file: "../subflows/capture_or_assert_screenshot.yaml"
33+
env:
34+
SCREENSHOT_NAME: "empty_element_parsing"
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
appId: swmansion.enriched.example
2+
---
3+
# PR #450 - fix(iOS): nil NSParagraphStyle crashes
4+
- launchApp
5+
6+
- tapOn:
7+
id: "toggle-screen-button"
8+
9+
- tapOn:
10+
id: "editor-input"
11+
12+
- tapOn:
13+
id: "toolbar-unordered-list"
14+
- inputText: "Unordered"
15+
- pressKey: Enter
16+
- tapOn:
17+
id: "toolbar-unordered-list"
18+
19+
- tapOn:
20+
id: "toolbar-ordered-list"
21+
- inputText: "Ordered"
22+
- pressKey: Enter
23+
- tapOn:
24+
id: "toolbar-ordered-list"
25+
26+
- tapOn:
27+
id: "toolbar-checkbox-list"
28+
- inputText: "Checkbox"
29+
- pressKey: Enter
30+
- tapOn:
31+
id: "toolbar-checkbox-list"
32+
33+
- tapOn:
34+
id: "toolbar-code-block"
35+
- inputText: "Code"
36+
- pressKey: Enter
37+
- tapOn:
38+
id: "toolbar-code-block"
39+
40+
- tapOn:
41+
id: "toolbar-quote"
42+
- inputText: "Quote"
43+
- pressKey: Enter
44+
- tapOn:
45+
id: "toolbar-quote"
46+
47+
- tapOn:
48+
id: "toolbar-heading-1"
49+
- inputText: "Heading"
50+
51+
- assertVisible:
52+
id: "editor-input"
53+
- tapOn:
54+
id: "size-max-button"
55+
56+
- runFlow:
57+
file: "../subflows/capture_or_assert_screenshot.yaml"
58+
env:
59+
SCREENSHOT_NAME: "paragraph_styles_no_crash"
60+
12.5 KB
Loading
6.36 KB
Loading
6.91 KB
Loading
9.63 KB
Loading
37.2 KB
Loading

0 commit comments

Comments
 (0)