Skip to content

Commit 47e7cab

Browse files
authored
test: add tests for recent bugs 3 (#485)
<!-- 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 PRs: #370, #421, #401, #359 ## Test Plan Execute new tests see if they pass: ```bash yarn test:e2e ./.maestro/flows/{inline_styles_survive_block_toggle.yaml,link_not_extended.yaml,list_newline_insertion.yaml,ordered_list_renumbering.yaml} ``` ## Screenshots / Videos Include any visual proof that helps reviewers understand the change — UI updates, bug reproduction or the result of the fix. ## Compatibility | OS | Implemented | | ------- | :---------: | | iOS | ✅ | | Android | ✅ |
1 parent 942a59e commit 47e7cab

14 files changed

Lines changed: 174 additions & 0 deletions
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
appId: swmansion.enriched.example
2+
---
3+
# PR #370 - fix: reapplying spans
4+
- launchApp
5+
6+
- tapOn:
7+
id: "toggle-screen-button"
8+
9+
- tapOn:
10+
id: "editor-input"
11+
12+
- tapOn:
13+
id: "toolbar-bold"
14+
- inputText: "Bold"
15+
16+
- tapOn:
17+
id: "toolbar-bold"
18+
- inputText: " regular"
19+
20+
- tapOn:
21+
id: "toolbar-quote"
22+
23+
- tapOn:
24+
id: "toolbar-quote"
25+
26+
- runFlow:
27+
file: "../subflows/capture_or_assert_screenshot.yaml"
28+
env:
29+
SCREENSHOT_NAME: "inline_styles_survive_block_toggle"
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+
- ios-only
4+
---
5+
# PR #421 - fix(iOS): prevent extending link styles
6+
- launchApp
7+
8+
- tapOn:
9+
id: "toggle-screen-button"
10+
11+
- tapOn:
12+
id: "editor-input"
13+
14+
- inputText: "Hello "
15+
16+
- runFlow:
17+
file: "../subflows/insert_link.yaml"
18+
env:
19+
LINK_TEXT: "test"
20+
LINK_URL: "https://swmansion.com"
21+
22+
- tapOn:
23+
id: "editor-input"
24+
point: "5%, 50%"
25+
- tapOn:
26+
id: "editor-input"
27+
point: "95%, 50%"
28+
29+
- inputText: "ing"
30+
31+
- runFlow:
32+
file: "../subflows/capture_or_assert_screenshot.yaml"
33+
env:
34+
SCREENSHOT_NAME: "link_not_extended"
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
appId: swmansion.enriched.example
2+
---
3+
# PR #401 - fix(Android): newline insertion in lists
4+
- launchApp
5+
6+
- tapOn:
7+
id: "toggle-screen-button"
8+
9+
- tapOn:
10+
id: "editor-input"
11+
12+
- tapOn:
13+
id: "toolbar-ordered-list"
14+
15+
- runFlow:
16+
when:
17+
platform: android
18+
commands:
19+
- inputText: "XXXXXXXXXXXXXXXXXXXXXXXX"
20+
- tapOn:
21+
id: "editor-input"
22+
point: "50%,50%"
23+
# iOS places the cursor on word boundaries by default. Precisely positioning
24+
# the cursor would require a press-and-drag gesture, which Maestro does not
25+
# support. As a workaround we type two words, tap between them (snapping to
26+
# the word boundary/space), then delete the space so we end up with a
27+
# continuous word and the cursor in the middle.
28+
- runFlow:
29+
when:
30+
platform: ios
31+
commands:
32+
- inputText: "XXXXXXXXXXX XXXXXXXXXXXXX"
33+
- tapOn:
34+
id: "editor-input"
35+
point: "50%,50%"
36+
- pressKey: Backspace
37+
38+
39+
- pressKey: Enter
40+
41+
- runFlow:
42+
file: "../subflows/capture_or_assert_screenshot.yaml"
43+
env:
44+
SCREENSHOT_NAME: "list_newline_insertion"
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
appId: swmansion.enriched.example
2+
---
3+
# PR #359 - fix: android span watcher
4+
- launchApp
5+
6+
- tapOn:
7+
id: "toggle-screen-button"
8+
9+
- tapOn:
10+
id: "editor-input"
11+
12+
- tapOn:
13+
id: "toolbar-ordered-list"
14+
15+
- inputText: "A"
16+
- pressKey: Enter
17+
- inputText: "B"
18+
- pressKey: Enter
19+
- inputText: "C"
20+
21+
# Tap on the second line to position cursor there
22+
- tapOn:
23+
id: "editor-input"
24+
point: "50%,50%"
25+
26+
- pressKey: backspace
27+
- pressKey: backspace
28+
29+
- runFlow:
30+
file: "../subflows/capture_or_assert_screenshot.yaml"
31+
env:
32+
SCREENSHOT_NAME: "ordered_list_renumbering_after_emptying_second_line"
33+
34+
- tapOn:
35+
id: "editor-input"
36+
point: "50%,50%"
37+
38+
- pressKey: backspace
39+
40+
- runFlow:
41+
file: "../subflows/capture_or_assert_screenshot.yaml"
42+
env:
43+
SCREENSHOT_NAME: "ordered_list_renumbering_after_deleting_second_line"
5.17 KB
Loading
4.96 KB
Loading
4.05 KB
Loading
4 KB
Loading
6.16 KB
Loading
6.35 KB
Loading

0 commit comments

Comments
 (0)