Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .maestro/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ End-to-end UI tests for the example app, exercising both the display component (
│ ├── subflows/ ← suite-local helpers
│ └── screenshots/ ← golden images, per platform
├── enrichedMarkdownInput/ ← editor suite (same shape)
├── androidExample/ ← native Android example app (CommonMark flows)
├── iosExample/ ← native iOS example app (CommonMark flows)
├── subflows/ ← cross-suite helpers
└── scripts/ ← runner shell scripts + setup
```
Expand All @@ -34,6 +36,12 @@ All scripts wrap `.maestro/scripts/run-tests.sh` (single platform) or `.maestro/
| `yarn test:e2e:mobile:update-screenshots` | Refresh golden screenshots for both platforms instead of asserting. |
| `yarn test:e2e:ios:update-screenshots` | Refresh golden screenshots for iOS only. |
| `yarn test:e2e:android:update-screenshots` | Refresh golden screenshots for Android only. |
| `yarn test:e2e:ios-native` | CommonMark E2E tests on the native iOS example app. |
| `yarn test:e2e:ios-native:smoke` | Smoke CommonMark tests on the native iOS example app. |
| `yarn test:e2e:ios-native:update-screenshots` | Refresh golden screenshots for the native iOS example app. |
| `yarn test:e2e:android-native` | CommonMark E2E tests on the native Android example app. |
| `yarn test:e2e:android-native:smoke` | Smoke CommonMark tests on the native Android example app. |
| `yarn test:e2e:android-native:update-screenshots` | Refresh golden screenshots for the native Android example app. |

### When to use which

Expand Down
4 changes: 4 additions & 0 deletions .maestro/iosExample/config-commonmark-smoke.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
flows:
- "iosExample/enrichedMarkdownText/flows/**"
includeTags:
- smoke
2 changes: 2 additions & 0 deletions .maestro/iosExample/config-commonmark.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
flows:
- "iosExample/enrichedMarkdownText/flows/**"
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
appId: swmansion.enriched.markdown.ios.example
tags:
- block
- advanced
- blockquote
- code_block
- text
---
# checks the combination of blockquotes and code blocks (quoted context around code)
- launchApp

- runFlow:
file: '../../../../subflows/move_to_playground.yaml'

- runFlow:
file: '../../../subflows/set_enriched_text_value.yaml'
env:
VALUE: |
> From the docs:

```
npm install my-package
```

> Then import it:

```js
import pkg from 'my-package'
```

- runFlow:
file: '../../../subflows/capture_or_assert_screenshot.yaml'
env:
SCREENSHOT_NAME: 'blockquote_code_block_combo_display'
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
appId: swmansion.enriched.markdown.ios.example
tags:
- block
- advanced
- image
- blockquote
- text
---
# checks the combination of a blockquote followed by a block image
- launchApp

- runFlow:
file: '../../../../subflows/move_to_playground.yaml'

- runFlow:
file: '../../../subflows/set_enriched_text_value.yaml'
env:
VALUE: |
> A quoted line before the image.

- tapOn:
id: insert-image-button

- tapOn:
id: blur-button

- runFlow:
file: '../../../subflows/capture_or_assert_screenshot.yaml'
env:
SCREENSHOT_NAME: 'blockquote_image_combo_display'
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
appId: swmansion.enriched.markdown.ios.example
tags:
- block
- advanced
- blockquote
- list
- text
---
# checks the combination of blockquotes and lists (quoted content adjacent to list items)
- launchApp

- runFlow:
file: '../../../../subflows/move_to_playground.yaml'

- runFlow:
file: '../../../subflows/set_enriched_text_value.yaml'
env:
VALUE: |
> Key principles:

- Keep it simple
- Be consistent
- Test everything

> Avoid:

1. Over-engineering
2. Premature optimization

- runFlow:
file: '../../../subflows/capture_or_assert_screenshot.yaml'
env:
SCREENSHOT_NAME: 'blockquote_list_combo_display'
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
appId: swmansion.enriched.markdown.ios.example
tags:
- block
- advanced
- image
- code_block
- text
---
# checks the combination of a code block followed by a block image
- launchApp

- runFlow:
file: '../../../../subflows/move_to_playground.yaml'

- runFlow:
file: '../../../subflows/set_enriched_text_value.yaml'
env:
VALUE: |
```
print("hello world")
```

- tapOn:
id: insert-image-button

- tapOn:
id: blur-button

- runFlow:
file: '../../../subflows/capture_or_assert_screenshot.yaml'
env:
SCREENSHOT_NAME: 'code_block_image_combo_display'
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
appId: swmansion.enriched.markdown.ios.example
tags:
- block
- advanced
- blockquote
- header
- text
---
# checks the combination of headers and blockquotes (section headers with quoted content)
- launchApp

- runFlow:
file: '../../../../subflows/move_to_playground.yaml'

- runFlow:
file: '../../../subflows/set_enriched_text_value.yaml'
env:
VALUE: |
## Famous Quote

> The only way to do great work is to love what you do.

## Another Quote

> In the middle of difficulty lies opportunity.

- runFlow:
file: '../../../subflows/capture_or_assert_screenshot.yaml'
env:
SCREENSHOT_NAME: 'header_blockquote_combo_display'
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
appId: swmansion.enriched.markdown.ios.example
tags:
- block
- advanced
- code_block
- header
- text
---
# checks the combination of headers and code blocks (section headers above code snippets)
- launchApp

- runFlow:
file: '../../../../subflows/move_to_playground.yaml'

- runFlow:
file: '../../../subflows/set_enriched_text_value.yaml'
env:
VALUE: |
## Installation

```
npm install
```

## Usage

```js
import { run } from './app'
run()
```

- runFlow:
file: '../../../subflows/capture_or_assert_screenshot.yaml'
env:
SCREENSHOT_NAME: 'header_code_block_combo_display'
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
appId: swmansion.enriched.markdown.ios.example
tags:
- block
- advanced
- image
- header
- text
---
# checks the combination of a header followed by a block image
- launchApp

- runFlow:
file: '../../../../subflows/move_to_playground.yaml'

- runFlow:
file: '../../../subflows/set_enriched_text_value.yaml'
env:
VALUE: |
## Logo

- tapOn:
id: insert-image-button

- tapOn:
id: blur-button

- runFlow:
file: '../../../subflows/capture_or_assert_screenshot.yaml'
env:
SCREENSHOT_NAME: 'header_image_combo_display'
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
appId: swmansion.enriched.markdown.ios.example
tags:
- block
- advanced
- header
- list
- text
---
# checks the combination of headers and lists (section headers followed by list items)
- launchApp

- runFlow:
file: '../../../../subflows/move_to_playground.yaml'

- runFlow:
file: '../../../subflows/set_enriched_text_value.yaml'
env:
VALUE: |
## Ingredients

- Flour
- Eggs
- Butter

## Steps

1. Mix dry ingredients
2. Add wet ingredients
3. Bake at 180C

- runFlow:
file: '../../../subflows/capture_or_assert_screenshot.yaml'
env:
SCREENSHOT_NAME: 'header_list_combo_display'
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
appId: swmansion.enriched.markdown.ios.example
tags:
- block
- advanced
- header
- paragraph
- text
---
# checks the combination of headers and paragraphs (spacing, visual separation)
- launchApp

- runFlow:
file: '../../../../subflows/move_to_playground.yaml'

- runFlow:
file: '../../../subflows/set_enriched_text_value.yaml'
env:
VALUE: |
# Section One
Short intro paragraph.

## Subsection
Another short paragraph.

### Deep section
Final paragraph.

- runFlow:
file: '../../../subflows/capture_or_assert_screenshot.yaml'
env:
SCREENSHOT_NAME: 'header_paragraph_combo_display'
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
appId: swmansion.enriched.markdown.ios.example
tags:
- block
- advanced
- image
- list
- text
---
# checks the combination of a list followed by a block image
- launchApp

- runFlow:
file: '../../../../subflows/move_to_playground.yaml'

- runFlow:
file: '../../../subflows/set_enriched_text_value.yaml'
env:
VALUE: |
- Item one
- Item two
- Item three

- tapOn:
id: insert-image-button

- tapOn:
id: blur-button

- runFlow:
file: '../../../subflows/capture_or_assert_screenshot.yaml'
env:
SCREENSHOT_NAME: 'list_image_combo_display'
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
appId: swmansion.enriched.markdown.ios.example
tags:
- block
- advanced
- blockquote
- paragraph
- text
---
# checks the combination of paragraphs and blockquotes (interleaved flow)
- launchApp

- runFlow:
file: '../../../../subflows/move_to_playground.yaml'

- runFlow:
file: '../../../subflows/set_enriched_text_value.yaml'
env:
VALUE: |
A paragraph before a quote.

> This is a blockquote.

A paragraph after the quote.

> Another blockquote at the end.

- runFlow:
file: '../../../subflows/capture_or_assert_screenshot.yaml'
env:
SCREENSHOT_NAME: 'paragraph_blockquote_combo_display'
Loading