diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml new file mode 100644 index 000000000..175f4746e --- /dev/null +++ b/.github/workflows/e2e.yml @@ -0,0 +1,223 @@ +name: E2E Tests +on: + push: + branches: + - main + pull_request: + branches: + - main + merge_group: + types: + - checks_requested + +jobs: + changes: + runs-on: ubuntu-latest + outputs: + android: ${{ steps.filter.outputs.android }} + ios: ${{ steps.filter.outputs.ios }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Check file changes + uses: dorny/paths-filter@v3 + id: filter + with: + filters: | + android: + - 'android/**' + - 'apps/example/android/**' + - 'apps/example/src/**' + - 'src/**' + - 'cpp/**' + - 'package.json' + - 'apps/example/package.json' + - 'react-native.config.js' + - 'babel.config.js' + - '.maestro/**' + ios: + - 'ios/**' + - 'apps/example/ios/**' + - 'apps/example/src/**' + - 'src/**' + - 'cpp/**' + - '*.podspec' + - 'package.json' + - 'apps/example/package.json' + - 'react-native.config.js' + - 'babel.config.js' + - '.maestro/**' + + e2e-ios: + needs: [changes] + if: needs.changes.outputs.ios == 'true' + runs-on: macos-latest + timeout-minutes: 60 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup + uses: ./.github/actions/setup + + - name: Set up Xcode + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: latest-stable + + - name: Restore cocoapods + id: cocoapods-cache + uses: actions/cache/restore@v4 + with: + path: | + **/ios/Pods + key: ${{ runner.os }}-cocoapods-${{ hashFiles('apps/example/ios/Podfile.lock') }} + restore-keys: | + ${{ runner.os }}-cocoapods- + + - name: Install cocoapods + if: steps.cocoapods-cache.outputs.cache-hit != 'true' + run: | + cd apps/example/ios + pod install + env: + NO_FLIPPER: 1 + + - name: Cache cocoapods + if: steps.cocoapods-cache.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + path: | + **/ios/Pods + key: ${{ steps.cocoapods-cache.outputs.cache-key }} + + - name: Restore Xcode DerivedData + uses: actions/cache/restore@v4 + id: derived-data-cache + with: + path: ~/Library/Developer/Xcode/DerivedData + key: ${{ runner.os }}-derived-data-${{ hashFiles('ios/**', 'apps/example/ios/**', 'cpp/**', 'src/**') }} + restore-keys: | + ${{ runner.os }}-derived-data- + + - name: Install maestro-runner + run: | + curl -fsSL https://open.devicelab.dev/install/maestro-runner | bash + echo "$HOME/.maestro-runner/bin" >> $GITHUB_PATH + + - name: Start Metro + run: yarn example start & + + - name: Run E2E tests + run: yarn test:e2e:ios + + - name: Cache Xcode DerivedData + if: steps.derived-data-cache.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + path: ~/Library/Developer/Xcode/DerivedData + key: ${{ steps.derived-data-cache.outputs.cache-primary-key }} + + - name: Upload test artifacts + if: failure() + uses: actions/upload-artifact@v4 + with: + name: e2e-ios-artifacts + path: | + reports/ + .maestro/enrichedInput/screenshots/android/*_diff.png + .maestro/enrichedText/screenshots/android/*_diff.png + + e2e-android: + needs: [changes] + if: needs.changes.outputs.android == 'true' + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup + uses: ./.github/actions/setup + + - name: Enable KVM + run: | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm + + - name: Install JDK + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: '17' + + - name: Install maestro-runner + run: | + curl -fsSL https://open.devicelab.dev/install/maestro-runner | bash + echo "$HOME/.maestro-runner/bin" >> $GITHUB_PATH + + - name: Cache Gradle + uses: actions/cache@v4 + with: + path: | + ~/.gradle/wrapper + ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('apps/example/android/gradle/wrapper/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + + - name: AVD cache + uses: actions/cache@v4 + id: avd-cache + with: + path: | + ~/.android/avd/* + ~/.android/adb* + key: avd-api-36-x86_64 + + - name: Create AVD and generate snapshot for caching + if: steps.avd-cache.outputs.cache-hit != 'true' + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: 36 + target: google_apis_playstore + arch: x86_64 + profile: pixel_7 + force-avd-creation: false + emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim + disable-animations: false + enable-hw-keyboard: true + script: echo "Generated AVD snapshot for caching." + + - name: Start Metro + run: yarn example start & + + - name: Run E2E tests + id: e2e-tests + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: 36 + target: google_apis_playstore + arch: x86_64 + profile: pixel_7 + force-avd-creation: false + emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim + disable-animations: true + disable-spellchecker: true + enable-hw-keyboard: true + script: EMULATOR_SERIAL=emulator-5554 .maestro/scripts/run-tests-ci-android.sh + env: + JAVA_OPTS: '-XX:MaxHeapSize=6g' + + - name: Upload test artifacts + if: ${{ !cancelled() && (steps.e2e-tests.outcome == 'success' || steps.e2e-tests.outcome == 'failure') }} + uses: actions/upload-artifact@v4 + with: + name: e2e-android-artifacts + if-no-files-found: warn + path: | + reports/ + .maestro/enrichedInput/screenshots/android/*_diff.png + .maestro/enrichedText/screenshots/android/*_diff.png diff --git a/.gitignore b/.gitignore index 7d511d167..0ed153df0 100644 --- a/.gitignore +++ b/.gitignore @@ -91,6 +91,7 @@ nitrogen/ # Maestro screenshot diffs .maestro/**/*_diff.png +reports/ # Claude skills .claude/skills/*-internal.md \ No newline at end of file diff --git a/.maestro/enrichedInput/flows/checkbox_toggle.yaml b/.maestro/enrichedInput/flows/checkbox_toggle.yaml index d49957cf4..0d350e689 100644 --- a/.maestro/enrichedInput/flows/checkbox_toggle.yaml +++ b/.maestro/enrichedInput/flows/checkbox_toggle.yaml @@ -11,13 +11,22 @@ appId: swmansion.enriched.example - tapOn: id: "toolbar-checkbox-list" -- inputText: "Item one" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "Item one" - pressKey: Enter -- inputText: "Item two" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "Item two" - pressKey: Enter - pressKey: Backspace -- inputText: "Plain text" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "Plain text" - pressKey: Enter - tapOn: diff --git a/.maestro/enrichedInput/flows/codeblock_no_link_detection.yaml b/.maestro/enrichedInput/flows/codeblock_no_link_detection.yaml index 585913519..8840d54c3 100644 --- a/.maestro/enrichedInput/flows/codeblock_no_link_detection.yaml +++ b/.maestro/enrichedInput/flows/codeblock_no_link_detection.yaml @@ -12,7 +12,10 @@ appId: swmansion.enriched.example - tapOn: id: "toolbar-code-block" -- inputText: "Hello example.com" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "Hello example.com" - assertVisible: id: "toolbar-link" diff --git a/.maestro/enrichedInput/flows/codeblock_style_blocking.yaml b/.maestro/enrichedInput/flows/codeblock_style_blocking.yaml index 962b2f769..708851235 100644 --- a/.maestro/enrichedInput/flows/codeblock_style_blocking.yaml +++ b/.maestro/enrichedInput/flows/codeblock_style_blocking.yaml @@ -14,7 +14,10 @@ appId: swmansion.enriched.example - tapOn: id: "toolbar-code-block" -- inputText: "ABC example.com" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "ABC example.com" - assertVisible: id: "toolbar-bold" diff --git a/.maestro/enrichedInput/flows/conflicting_paragraph_merge.yaml b/.maestro/enrichedInput/flows/conflicting_paragraph_merge.yaml index 6ed6ff1e3..cd1bb1f74 100644 --- a/.maestro/enrichedInput/flows/conflicting_paragraph_merge.yaml +++ b/.maestro/enrichedInput/flows/conflicting_paragraph_merge.yaml @@ -11,14 +11,20 @@ appId: swmansion.enriched.example - tapOn: id: "toolbar-code-block" -- inputText: "Code text" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "Code text" - pressKey: Enter - tapOn: id: "toolbar-code-block" - tapOn: id: "toolbar-heading-1" -- inputText: "H1" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "H1" # Position cursor at start of H1 line - tapOn: @@ -30,7 +36,10 @@ appId: swmansion.enriched.example - runFlow: commands: - pressKey: Backspace -- inputText: " " +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: " " - tapOn: id: "editor-input" @@ -42,14 +51,20 @@ appId: swmansion.enriched.example - tapOn: id: "toolbar-inline-code" -- inputText: "Inline code" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "Inline code" - tapOn: id: "editor-input" point: "5%, 75%" - pressKey: Backspace -- inputText: " " +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: " " - runFlow: file: "../subflows/capture_or_assert_screenshot.yaml" diff --git a/.maestro/enrichedInput/flows/extending_paragraph_style_on_paste_after_copy.yaml b/.maestro/enrichedInput/flows/extending_paragraph_style_on_paste_after_copy.yaml index 9b8dde963..cd2cb97ab 100644 --- a/.maestro/enrichedInput/flows/extending_paragraph_style_on_paste_after_copy.yaml +++ b/.maestro/enrichedInput/flows/extending_paragraph_style_on_paste_after_copy.yaml @@ -1,45 +1,63 @@ appId: swmansion.enriched.example tags: - - android-only + - android-only --- - launchApp - tapOn: - id: "toggle-screen-button" + id: 'toggle-screen-button' - tapOn: - id: "focus-button" + id: 'focus-button' -- inputText: "EADING" -- doubleTapOn: - id: "editor-input" - point: "10%, 50%" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'EADING' +- runFlow: + when: + platform: iOS + commands: + - doubleTapOn: + id: 'editor-input' + point: '10%, 50%' +- runFlow: + when: + platform: Android + commands: + - longPressOn: + id: 'editor-input' + point: '10%, 50%' + - tapOn: + text: 'Select all' - tapOn: - id: "android:id/floating_toolbar_menu_item_text" - text: "Copy" + text: 'Copy' # Dismiss toolbar with Copy/Cut etc. options - tapOn: - id: "editor-input" + id: 'editor-input' - tapOn: - id: "clear-button" + id: 'clear-button' - tapOn: - id: "focus-button" + id: 'focus-button' - tapOn: - id: "toolbar-heading-1" + id: 'toolbar-heading-1' -- inputText: "H" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'H' - longPressOn: - id: "editor-input" - point: "50%, 50%" + id: 'editor-input' + point: '50%, 50%' - tapOn: - id: "android:id/floating_toolbar_menu_item_text" - text: "Paste" + id: 'android:id/floating_toolbar_menu_item_text' + text: 'Paste' - runFlow: - file: "../subflows/capture_or_assert_screenshot.yaml" + file: '../subflows/capture_or_assert_screenshot.yaml' env: - SCREENSHOT_NAME: "extending_paragraph_style_on_paste_after_copy" + SCREENSHOT_NAME: 'extending_paragraph_style_on_paste_after_copy' diff --git a/.maestro/enrichedInput/flows/extending_paragraph_style_on_paste_after_cut.yaml b/.maestro/enrichedInput/flows/extending_paragraph_style_on_paste_after_cut.yaml index 7f6d54852..e7375e5cd 100644 --- a/.maestro/enrichedInput/flows/extending_paragraph_style_on_paste_after_cut.yaml +++ b/.maestro/enrichedInput/flows/extending_paragraph_style_on_paste_after_cut.yaml @@ -1,37 +1,55 @@ appId: swmansion.enriched.example tags: - - android-only + - android-only --- - launchApp - tapOn: - id: "toggle-screen-button" + id: 'toggle-screen-button' - tapOn: - id: "focus-button" + id: 'focus-button' -- inputText: "EADING" -- doubleTapOn: - id: "editor-input" - point: "10%, 50%" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'EADING' +- runFlow: + when: + platform: iOS + commands: + - doubleTapOn: + id: 'editor-input' + point: '10%, 50%' +- runFlow: + when: + platform: Android + commands: + - longPressOn: + id: 'editor-input' + point: '10%, 50%' + - tapOn: + text: 'Select all' - tapOn: - id: "android:id/floating_toolbar_menu_item_text" - text: "Cut" + text: 'Cut' - tapOn: - id: "toolbar-heading-1" + id: 'toolbar-heading-1' -- inputText: "H" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'H' - longPressOn: - id: "editor-input" - point: "50%, 50%" + id: 'editor-input' + point: '50%, 50%' - tapOn: - id: "android:id/floating_toolbar_menu_item_text" - text: "Paste" + id: 'android:id/floating_toolbar_menu_item_text' + text: 'Paste' - runFlow: - file: "../subflows/capture_or_assert_screenshot.yaml" + file: '../subflows/capture_or_assert_screenshot.yaml' env: - SCREENSHOT_NAME: "extending_paragraph_style_on_paste_after_cut" + SCREENSHOT_NAME: 'extending_paragraph_style_on_paste_after_cut' diff --git a/.maestro/enrichedInput/flows/font_scaling.yaml b/.maestro/enrichedInput/flows/font_scaling.yaml index bbd06a669..81bbac47f 100644 --- a/.maestro/enrichedInput/flows/font_scaling.yaml +++ b/.maestro/enrichedInput/flows/font_scaling.yaml @@ -15,39 +15,69 @@ tags: - tapOn: id: "editor-input" -- inputText: "Plain " +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "Plain " - tapOn: id: "toolbar-bold" -- inputText: "bold" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "bold" - tapOn: id: "toolbar-bold" -- inputText: " " +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: " " - tapOn: id: "toolbar-italic" -- inputText: "italic" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "italic" - tapOn: id: "toolbar-italic" -- inputText: " " +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: " " - tapOn: id: "toolbar-underline" -- inputText: "underline" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "underline" - tapOn: id: "toolbar-underline" -- inputText: " " +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: " " - tapOn: id: "toolbar-strikethrough" -- inputText: "strike-through" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "strike-through" - tapOn: id: "toolbar-strikethrough" -- inputText: " " +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: " " - tapOn: id: "toolbar-inline-code" -- inputText: "code" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "code" - tapOn: id: "toolbar-inline-code" diff --git a/.maestro/enrichedInput/flows/html_link_not_extended.yaml b/.maestro/enrichedInput/flows/html_link_not_extended.yaml index ebacaddfe..4131a8a66 100644 --- a/.maestro/enrichedInput/flows/html_link_not_extended.yaml +++ b/.maestro/enrichedInput/flows/html_link_not_extended.yaml @@ -18,7 +18,10 @@ appId: swmansion.enriched.example id: "editor-input" point: "95%, 50%" -- inputText: " extra" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: " extra" - runFlow: file: "../subflows/capture_or_assert_screenshot.yaml" diff --git a/.maestro/enrichedInput/flows/image_inside_list_parsing.yaml b/.maestro/enrichedInput/flows/image_inside_list_parsing.yaml index 8e20f5235..4eeb28185 100644 --- a/.maestro/enrichedInput/flows/image_inside_list_parsing.yaml +++ b/.maestro/enrichedInput/flows/image_inside_list_parsing.yaml @@ -21,6 +21,12 @@ appId: swmansion.enriched.example - tapOn: id: 'size-max-button' +# Force a delay to ensure the screenshot is loaded +- extendedWaitUntil: + visible: 'fake_element_to_force_delay' + optional: true + timeout: 5000 + - runFlow: file: '../subflows/capture_or_assert_screenshot.yaml' env: diff --git a/.maestro/enrichedInput/flows/image_position_stability.yaml b/.maestro/enrichedInput/flows/image_position_stability.yaml index c9ff9697e..e66926854 100644 --- a/.maestro/enrichedInput/flows/image_position_stability.yaml +++ b/.maestro/enrichedInput/flows/image_position_stability.yaml @@ -6,40 +6,48 @@ appId: swmansion.enriched.example - launchApp - tapOn: - id: "toggle-screen-button" + id: 'toggle-screen-button' - tapOn: - id: "size-max-button" + id: 'size-max-button' - tapOn: - id: "editor-input" + id: 'editor-input' -- inputText: "Paragraph one" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Paragraph one' - pressKey: Enter - pressKey: Enter -- inputText: "Paragraph two" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Paragraph two' - tapOn: - id: "editor-input" - point: "50%,50%" - + id: 'editor-input' + point: '50%,50%' # cursor is now on the blank second line - runFlow: - file: "../subflows/insert_image.yaml" + file: '../subflows/insert_image.yaml' - runFlow: - file: "../subflows/capture_or_assert_screenshot.yaml" + file: '../subflows/capture_or_assert_screenshot.yaml' env: - SCREENSHOT_NAME: "image_position_stability_before_typing" + SCREENSHOT_NAME: 'image_position_stability_before_typing' - tapOn: - id: "editor-input" - point: "50%,50%" -- inputText: "Paragraph in the middle" + id: 'editor-input' + point: '50%,50%' +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Paragraph in the middle' - runFlow: - file: "../subflows/capture_or_assert_screenshot.yaml" + file: '../subflows/capture_or_assert_screenshot.yaml' env: - SCREENSHOT_NAME: "image_position_stability_after_typing" + SCREENSHOT_NAME: 'image_position_stability_after_typing' diff --git a/.maestro/enrichedInput/flows/inline_code_blocking_styles.yaml b/.maestro/enrichedInput/flows/inline_code_blocking_styles.yaml index 67dbfac76..debbe7356 100644 --- a/.maestro/enrichedInput/flows/inline_code_blocking_styles.yaml +++ b/.maestro/enrichedInput/flows/inline_code_blocking_styles.yaml @@ -14,7 +14,10 @@ appId: swmansion.enriched.example - waitForAnimationToEnd -- inputText: "snippet" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "snippet" - assertVisible: id: "toolbar-link" diff --git a/.maestro/enrichedInput/flows/inline_code_paste_into_codeblock.yaml b/.maestro/enrichedInput/flows/inline_code_paste_into_codeblock.yaml index 08be018fb..336f8964f 100644 --- a/.maestro/enrichedInput/flows/inline_code_paste_into_codeblock.yaml +++ b/.maestro/enrichedInput/flows/inline_code_paste_into_codeblock.yaml @@ -11,28 +11,55 @@ appId: swmansion.enriched.example - tapOn: id: 'toolbar-inline-code' -- inputText: 'code' -- tapOn: - id: 'toolbar-inline-code' +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'code' -- pressKey: Enter -- tapOn: - id: 'toolbar-code-block' +- runFlow: + when: + platform: iOS + commands: + - doubleTapOn: + id: 'editor-input' + point: '10%, 30%' +- runFlow: + when: + platform: Android + commands: + - longPressOn: + id: 'editor-input' + point: '10%, 30%' + - tapOn: + text: 'Select all' -- doubleTapOn: +- tapOn: + text: 'Copy' +- tapOn: id: 'editor-input' - point: '10%, 30%' + point: '70%, 30%' - tapOn: - text: 'Copy' + id: 'toolbar-inline-code' +- pressKey: Enter - tapOn: - id: 'editor-input' - point: '10%, 70%' + id: 'toolbar-code-block' -- longPressOn: - id: 'editor-input' - point: '10%, 70%' +- runFlow: + when: + platform: iOS + commands: + - doubleTapOn: + id: 'editor-input' + point: '10%, 70%' +- runFlow: + when: + platform: Android + commands: + - longPressOn: + id: 'editor-input' + point: '10%, 70%' - tapOn: text: 'Paste' diff --git a/.maestro/enrichedInput/flows/inline_styles_merge.yaml b/.maestro/enrichedInput/flows/inline_styles_merge.yaml index ea843121f..53eb3853d 100644 --- a/.maestro/enrichedInput/flows/inline_styles_merge.yaml +++ b/.maestro/enrichedInput/flows/inline_styles_merge.yaml @@ -16,7 +16,10 @@ appId: swmansion.enriched.example - tapOn: id: 'toolbar-underline' -- inputText: 'First line' +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'First line' - pressKey: Enter - tapOn: @@ -25,11 +28,14 @@ appId: swmansion.enriched.example id: 'toolbar-italic' - tapOn: id: 'toolbar-underline' -- inputText: 'Second line' +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Second line' - tapOn: id: 'editor-input' - point: '5%,75%' + point: '4%,75%' - pressKey: Backspace diff --git a/.maestro/enrichedInput/flows/inline_styles_removal.yaml b/.maestro/enrichedInput/flows/inline_styles_removal.yaml index 58faf1d2f..c25ba8643 100644 --- a/.maestro/enrichedInput/flows/inline_styles_removal.yaml +++ b/.maestro/enrichedInput/flows/inline_styles_removal.yaml @@ -18,9 +18,15 @@ appId: swmansion.enriched.example - tapOn: id: 'toolbar-strikethrough' -- inputText: 'First line' +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'First line' - pressKey: Enter -- inputText: 'Second line' +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Second line' - tapOn: id: 'toolbar-code-block' diff --git a/.maestro/enrichedInput/flows/inline_styles_survive_block_toggle.yaml b/.maestro/enrichedInput/flows/inline_styles_survive_block_toggle.yaml index b2e5bfb94..54498b540 100644 --- a/.maestro/enrichedInput/flows/inline_styles_survive_block_toggle.yaml +++ b/.maestro/enrichedInput/flows/inline_styles_survive_block_toggle.yaml @@ -11,11 +11,17 @@ appId: swmansion.enriched.example - tapOn: id: "toolbar-bold" -- inputText: "Bold" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "Bold" - tapOn: id: "toolbar-bold" -- inputText: " regular" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: " regular" - tapOn: id: "toolbar-quote" diff --git a/.maestro/enrichedInput/flows/inline_styles_visual.yaml b/.maestro/enrichedInput/flows/inline_styles_visual.yaml index f8f2719a9..21897a7a4 100644 --- a/.maestro/enrichedInput/flows/inline_styles_visual.yaml +++ b/.maestro/enrichedInput/flows/inline_styles_visual.yaml @@ -8,39 +8,69 @@ appId: swmansion.enriched.example - tapOn: id: "editor-input" -- inputText: "Plain " +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "Plain " - tapOn: id: "toolbar-bold" -- inputText: "bold" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "bold" - tapOn: id: "toolbar-bold" -- inputText: " " +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: " " - tapOn: id: "toolbar-italic" -- inputText: "italic" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "italic" - tapOn: id: "toolbar-italic" -- inputText: " " +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: " " - tapOn: id: "toolbar-underline" -- inputText: "underline" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "underline" - tapOn: id: "toolbar-underline" -- inputText: " " +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: " " - tapOn: id: "toolbar-strikethrough" -- inputText: "strike-through" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "strike-through" - tapOn: id: "toolbar-strikethrough" -- inputText: " " +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: " " - tapOn: id: "toolbar-inline-code" -- inputText: "code" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "code" - tapOn: id: "toolbar-inline-code" diff --git a/.maestro/enrichedInput/flows/line_overlapping.yaml b/.maestro/enrichedInput/flows/line_overlapping.yaml index 575106055..945d3345d 100644 --- a/.maestro/enrichedInput/flows/line_overlapping.yaml +++ b/.maestro/enrichedInput/flows/line_overlapping.yaml @@ -10,15 +10,30 @@ appId: swmansion.enriched.example id: 'editor-input' - pressKey: Enter -- inputText: 'Line one' +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Line one' - pressKey: Enter -- inputText: 'Line two' +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Line two' - pressKey: Enter -- inputText: 'Line three' +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Line three' - pressKey: Enter -- inputText: 'Line four' +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Line four' - pressKey: Enter -- inputText: 'Line five' +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Line five' # Tap on the first line to position cursor there - tapOn: @@ -28,11 +43,17 @@ appId: swmansion.enriched.example - tapOn: id: 'toolbar-bold' -- inputText: 'bold' +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'bold' - pressKey: Enter - pressKey: Enter - pressKey: Enter -- inputText: 'bold2' +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'bold2' - runFlow: file: '../subflows/capture_or_assert_screenshot.yaml' diff --git a/.maestro/enrichedInput/flows/link_not_extended.yaml b/.maestro/enrichedInput/flows/link_not_extended.yaml index a7de9075d..1ff36f6dc 100644 --- a/.maestro/enrichedInput/flows/link_not_extended.yaml +++ b/.maestro/enrichedInput/flows/link_not_extended.yaml @@ -10,7 +10,10 @@ appId: swmansion.enriched.example - tapOn: id: "editor-input" -- inputText: "Hello " +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "Hello " - runFlow: file: "../subflows/insert_link.yaml" @@ -25,7 +28,10 @@ appId: swmansion.enriched.example id: "editor-input" point: "95%, 50%" -- inputText: "ing" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "ing" - runFlow: file: "../subflows/capture_or_assert_screenshot.yaml" diff --git a/.maestro/enrichedInput/flows/links_visual.yaml b/.maestro/enrichedInput/flows/links_visual.yaml index bf3ad4c47..cfef16534 100644 --- a/.maestro/enrichedInput/flows/links_visual.yaml +++ b/.maestro/enrichedInput/flows/links_visual.yaml @@ -7,14 +7,30 @@ appId: swmansion.enriched.example id: 'toggle-screen-button' - tapOn: - id: "editor-input" + id: 'editor-input' # autolinks break on text change or paste -- inputText: 'swmansion.com' +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'swmansion.com' -- doubleTapOn: - id: 'editor-input' - point: '20%, 50%' +- runFlow: + when: + platform: iOS + commands: + - doubleTapOn: + id: 'editor-input' + point: '20%, 50%' +- runFlow: + when: + platform: Android + commands: + - longPressOn: + id: 'editor-input' + point: '20%, 50%' + - tapOn: + text: 'Select all' - tapOn: text: 'Copy' @@ -28,15 +44,11 @@ appId: swmansion.enriched.example point: '50%, 70%' - tapOn: text: 'Paste' -- inputText: 'm' -- pressKey: Enter -- inputText: 'swm' -- longPressOn: - id: 'editor-input' - point: '50%, 75%' -- tapOn: - text: 'Paste' +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'm' - runFlow: file: '../subflows/capture_or_assert_screenshot.yaml' @@ -49,9 +61,22 @@ appId: swmansion.enriched.example env: VALUE: '

example.com

' -- doubleTapOn: - id: 'editor-input' - point: '20%, 50%' +- runFlow: + when: + platform: iOS + commands: + - doubleTapOn: + id: 'editor-input' + point: '20%, 50%' +- runFlow: + when: + platform: Android + commands: + - longPressOn: + id: 'editor-input' + point: '20%, 50%' + - tapOn: + text: 'Select all' - tapOn: text: 'Copy' diff --git a/.maestro/enrichedInput/flows/list_newline_insertion.yaml b/.maestro/enrichedInput/flows/list_newline_insertion.yaml index 79e0dfd1b..84a57084c 100644 --- a/.maestro/enrichedInput/flows/list_newline_insertion.yaml +++ b/.maestro/enrichedInput/flows/list_newline_insertion.yaml @@ -16,7 +16,10 @@ appId: swmansion.enriched.example when: platform: android commands: - - inputText: "XXXXXXXXXXXXXXXXXXXXXXXX" + - runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "XXXXXXXXXXXXXXXXXXXXXXXX" - tapOn: id: "editor-input" point: "50%,50%" @@ -29,7 +32,10 @@ appId: swmansion.enriched.example when: platform: ios commands: - - inputText: "XXXXXXXXXXX XXXXXXXXXXXXX" + - runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "XXXXXXXXXXX XXXXXXXXXXXXX" - tapOn: id: "editor-input" point: "50%,50%" diff --git a/.maestro/enrichedInput/flows/mention_popup_closing_on_cursor_travel.yaml b/.maestro/enrichedInput/flows/mention_popup_closing_on_cursor_travel.yaml index c3cf07e74..38e02cf8e 100644 --- a/.maestro/enrichedInput/flows/mention_popup_closing_on_cursor_travel.yaml +++ b/.maestro/enrichedInput/flows/mention_popup_closing_on_cursor_travel.yaml @@ -5,41 +5,44 @@ appId: swmansion.enriched.example - launchApp - tapOn: - id: "toggle-screen-button" + id: 'toggle-screen-button' - tapOn: - id: "editor-input" + id: 'editor-input' -- inputText: "mentions #gen @J" +- runFlow: + file: '../subflows/set_editor_value.yaml' + env: + VALUE: 'mentions #gen @J' # user popup visible - runFlow: - file: "../subflows/capture_or_assert_fullscreen_screenshot.yaml" + file: '../subflows/capture_or_assert_fullscreen_screenshot.yaml' env: - SCREENSHOT_NAME: "mention_popup_closing_on_cursor_travel_1" + SCREENSHOT_NAME: 'mention_popup_closing_on_cursor_travel_1' - tapOn: - id: "focus-button" + id: 'focus-button' - tapOn: - id: "editor-input" - point: "30%, 50%" + id: 'editor-input' + point: '30%, 50%' # channel popup visible - runFlow: - file: "../subflows/capture_or_assert_fullscreen_screenshot.yaml" + file: '../subflows/capture_or_assert_fullscreen_screenshot.yaml' env: - SCREENSHOT_NAME: "mention_popup_closing_on_cursor_travel_2" + SCREENSHOT_NAME: 'mention_popup_closing_on_cursor_travel_2' - tapOn: - id: "focus-button" + id: 'focus-button' - tapOn: - id: "editor-input" - point: "10%, 50%" + id: 'editor-input' + point: '10%, 50%' # no popup visible - runFlow: - file: "../subflows/capture_or_assert_fullscreen_screenshot.yaml" + file: '../subflows/capture_or_assert_fullscreen_screenshot.yaml' env: - SCREENSHOT_NAME: "mention_popup_closing_on_cursor_travel_3" + SCREENSHOT_NAME: 'mention_popup_closing_on_cursor_travel_3' diff --git a/.maestro/enrichedInput/flows/ordered_list_renumbering.yaml b/.maestro/enrichedInput/flows/ordered_list_renumbering.yaml index 9865c2693..d0edf64c4 100644 --- a/.maestro/enrichedInput/flows/ordered_list_renumbering.yaml +++ b/.maestro/enrichedInput/flows/ordered_list_renumbering.yaml @@ -12,11 +12,20 @@ appId: swmansion.enriched.example - tapOn: id: "toolbar-ordered-list" -- inputText: "A" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "A" - pressKey: Enter -- inputText: "B" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "B" - pressKey: Enter -- inputText: "C" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "C" # Tap on the second line to position cursor there - tapOn: diff --git a/.maestro/enrichedInput/flows/paragraph_style_removal.yaml b/.maestro/enrichedInput/flows/paragraph_style_removal.yaml index c749a0054..81e31164f 100644 --- a/.maestro/enrichedInput/flows/paragraph_style_removal.yaml +++ b/.maestro/enrichedInput/flows/paragraph_style_removal.yaml @@ -14,11 +14,20 @@ appId: swmansion.enriched.example - tapOn: id: "toolbar-quote" -- inputText: "A" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "A" - pressKey: Enter -- inputText: "B" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "B" - pressKey: Enter -- inputText: "C" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "C" # Tap on the second line - tapOn: diff --git a/.maestro/enrichedInput/flows/paragraph_style_toggle.yaml b/.maestro/enrichedInput/flows/paragraph_style_toggle.yaml index 4e200abe0..c60e8d597 100644 --- a/.maestro/enrichedInput/flows/paragraph_style_toggle.yaml +++ b/.maestro/enrichedInput/flows/paragraph_style_toggle.yaml @@ -14,11 +14,20 @@ appId: swmansion.enriched.example - tapOn: id: "toolbar-quote" -- inputText: "1" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "1" - pressKey: Enter -- inputText: "2" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "2" - pressKey: Enter -- inputText: "3" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "3" # Tap on the second line - tapOn: diff --git a/.maestro/enrichedInput/flows/paragraph_styles_alignment_visual.yaml b/.maestro/enrichedInput/flows/paragraph_styles_alignment_visual.yaml index ae5d09c57..6ca09c40d 100644 --- a/.maestro/enrichedInput/flows/paragraph_styles_alignment_visual.yaml +++ b/.maestro/enrichedInput/flows/paragraph_styles_alignment_visual.yaml @@ -10,33 +10,51 @@ appId: swmansion.enriched.example id: 'editor-input' # Left-aligned text -- inputText: 'Left aligned' +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Left aligned' - pressKey: Enter # Centre-aligned - tapOn: id: 'toolbar-align-center' -- inputText: 'Centre aligned' +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Centre aligned' - pressKey: Enter # Heading 6 - tapOn: id: 'toolbar-heading-6' -- inputText: 'Heading 6' +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Heading 6' - pressKey: Enter # Right-aligned text - tapOn: id: 'toolbar-align-right' -- inputText: 'Right aligned' +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Right aligned' - pressKey: Enter # List with right-aligned items - tapOn: id: 'toolbar-ordered-list' -- inputText: 'Element 1' +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Element 1' - pressKey: Enter -- inputText: 'Element 2' +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Element 2' - runFlow: file: '../subflows/capture_or_assert_screenshot.yaml' diff --git a/.maestro/enrichedInput/flows/paragraph_styles_blocks_visual.yaml b/.maestro/enrichedInput/flows/paragraph_styles_blocks_visual.yaml index 1a437c12f..f00637781 100644 --- a/.maestro/enrichedInput/flows/paragraph_styles_blocks_visual.yaml +++ b/.maestro/enrichedInput/flows/paragraph_styles_blocks_visual.yaml @@ -12,21 +12,36 @@ appId: swmansion.enriched.example - tapOn: id: "toolbar-quote" -- inputText: "Quote 1" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "Quote 1" - pressKey: Enter -- inputText: "Quote 2" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "Quote 2" - pressKey: Enter - tapOn: id: "toolbar-quote" -- inputText: "Normal paragraph" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "Normal paragraph" - pressKey: Enter - tapOn: id: "toolbar-code-block" -- inputText: "Code 1" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "Code 1" - pressKey: Enter -- inputText: "Code 2" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "Code 2" - runFlow: file: "../subflows/capture_or_assert_screenshot.yaml" diff --git a/.maestro/enrichedInput/flows/paragraph_styles_headings_visual.yaml b/.maestro/enrichedInput/flows/paragraph_styles_headings_visual.yaml index 70c426fd4..c396b06a7 100644 --- a/.maestro/enrichedInput/flows/paragraph_styles_headings_visual.yaml +++ b/.maestro/enrichedInput/flows/paragraph_styles_headings_visual.yaml @@ -4,43 +4,61 @@ appId: swmansion.enriched.example - launchApp - tapOn: - id: "toggle-screen-button" + id: 'toggle-screen-button' - tapOn: - id: "editor-input" + id: 'editor-input' - tapOn: - id: "toolbar-heading-1" -- inputText: "H1" + id: 'toolbar-heading-1' +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'H1' - pressKey: Enter - tapOn: - id: "toolbar-heading-2" -- inputText: "H2" + id: 'toolbar-heading-2' +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'H2' - pressKey: Enter - tapOn: - id: "toolbar-heading-3" -- inputText: "H3" + id: 'toolbar-heading-3' +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'H3' - pressKey: Enter - tapOn: - id: "toolbar-heading-4" -- inputText: "H4" + id: 'toolbar-heading-4' +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'H4' - pressKey: Enter - tapOn: - id: "toolbar-heading-5" -- inputText: "H5" + id: 'toolbar-heading-5' +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'H5' - pressKey: Enter - tapOn: - id: "toolbar-heading-6" -- inputText: "H6" + id: 'toolbar-heading-6' +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'H6' - tapOn: - id: "size-max-button" + id: 'size-max-button' - runFlow: - file: "../subflows/capture_or_assert_screenshot.yaml" + file: '../subflows/capture_or_assert_screenshot.yaml' env: - SCREENSHOT_NAME: "paragraph_styles_headings" + SCREENSHOT_NAME: 'paragraph_styles_headings' diff --git a/.maestro/enrichedInput/flows/paragraph_styles_lists_visual.yaml b/.maestro/enrichedInput/flows/paragraph_styles_lists_visual.yaml index 4368ef3dc..3db909101 100644 --- a/.maestro/enrichedInput/flows/paragraph_styles_lists_visual.yaml +++ b/.maestro/enrichedInput/flows/paragraph_styles_lists_visual.yaml @@ -11,33 +11,57 @@ appId: swmansion.enriched.example - tapOn: id: "toolbar-ordered-list" -- inputText: "First" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "First" - pressKey: Enter -- inputText: "Second" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "Second" - pressKey: Enter - tapOn: id: "toolbar-ordered-list" -- inputText: "Normal" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "Normal" - pressKey: Enter - tapOn: id: "toolbar-unordered-list" -- inputText: "First" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "First" - pressKey: Enter -- inputText: "Second" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "Second" - pressKey: Enter - tapOn: id: "toolbar-unordered-list" -- inputText: "Normal" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "Normal" - pressKey: Enter - tapOn: id: "toolbar-checkbox-list" -- inputText: "First" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "First" - pressKey: Enter -- inputText: "Second" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "Second" - tapOn: id: "size-max-button" diff --git a/.maestro/enrichedInput/flows/paragraph_styles_no_crash.yaml b/.maestro/enrichedInput/flows/paragraph_styles_no_crash.yaml index 4710b5257..88664c2de 100644 --- a/.maestro/enrichedInput/flows/paragraph_styles_no_crash.yaml +++ b/.maestro/enrichedInput/flows/paragraph_styles_no_crash.yaml @@ -11,42 +11,60 @@ appId: swmansion.enriched.example - tapOn: id: "toolbar-unordered-list" -- inputText: "Unordered" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "Unordered" - pressKey: Enter - tapOn: id: "toolbar-unordered-list" - tapOn: id: "toolbar-ordered-list" -- inputText: "Ordered" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "Ordered" - pressKey: Enter - tapOn: id: "toolbar-ordered-list" - tapOn: id: "toolbar-checkbox-list" -- inputText: "Checkbox" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "Checkbox" - pressKey: Enter - tapOn: id: "toolbar-checkbox-list" - tapOn: id: "toolbar-code-block" -- inputText: "Code" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "Code" - pressKey: Enter - tapOn: id: "toolbar-code-block" - tapOn: id: "toolbar-quote" -- inputText: "Quote" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "Quote" - pressKey: Enter - tapOn: id: "toolbar-quote" - tapOn: id: "toolbar-heading-1" -- inputText: "Heading" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: "Heading" - assertVisible: id: "editor-input" diff --git a/.maestro/enrichedInput/flows/scrolling_after_typing.yaml b/.maestro/enrichedInput/flows/scrolling_after_typing.yaml index e4711a8d4..ea294e234 100644 --- a/.maestro/enrichedInput/flows/scrolling_after_typing.yaml +++ b/.maestro/enrichedInput/flows/scrolling_after_typing.yaml @@ -1,67 +1,98 @@ appId: swmansion.enriched.example -# Tests basic scrollability +# Tests basic scrollability --- - - launchApp - tapOn: - id: "toggle-screen-button" + id: 'toggle-screen-button' - tapOn: - id: "editor-input" + id: 'editor-input' -- inputText: "Line one" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Line one' - pressKey: Enter -- inputText: "Line two" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Line two' - pressKey: Enter -- inputText: "Line three" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Line three' - pressKey: Enter -- inputText: "Line four" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Line four' - pressKey: Enter -- inputText: "Line five" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Line five' - pressKey: Enter -- inputText: "Line six" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Line six' - pressKey: Enter -- inputText: "Line seven" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Line seven' - pressKey: Enter -- inputText: "Line eight" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Line eight' - pressKey: Enter -- inputText: "Line nine" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Line nine' - pressKey: Enter -- inputText: "Line ten" - - runFlow: - file: "../subflows/capture_or_assert_screenshot.yaml" + file: '../../subflows/input_text.yaml' env: - SCREENSHOT_NAME: "scroll_after_typing_long_content_bottom" - -- tapOn: - id: "focus-button" + TEXT: 'Line ten' - swipe: from: - id: "editor-input" + id: 'editor-input' direction: DOWN - waitForAnimationToEnd +# Force a delay to ensure the scrollbar is invisible +- extendedWaitUntil: + visible: 'fake_element_to_force_delay' + optional: true + timeout: 200 + - runFlow: - file: "../subflows/capture_or_assert_screenshot.yaml" + file: '../subflows/capture_or_assert_screenshot.yaml' env: - SCREENSHOT_NAME: "scroll_after_typing_long_content_top" + SCREENSHOT_NAME: 'scroll_after_typing_long_content_top' - tapOn: - id: "editor-input" - point: "0%,0%" + id: 'editor-input' + point: '0%,0%' - swipe: from: - id: "editor-input" + id: 'editor-input' direction: UP - waitForAnimationToEnd +- tapOn: + id: 'blur-button' +- waitForAnimationToEnd + - runFlow: - file: "../subflows/capture_or_assert_screenshot.yaml" + file: '../subflows/capture_or_assert_screenshot.yaml' env: - SCREENSHOT_NAME: "scroll_after_typing_long_content_bottom" + SCREENSHOT_NAME: 'scroll_after_typing_long_content_bottom' diff --git a/.maestro/enrichedInput/flows/scrolling_with_paragraph_styles.yaml b/.maestro/enrichedInput/flows/scrolling_with_paragraph_styles.yaml index 96e987fe1..9d5c0529f 100644 --- a/.maestro/enrichedInput/flows/scrolling_with_paragraph_styles.yaml +++ b/.maestro/enrichedInput/flows/scrolling_with_paragraph_styles.yaml @@ -4,71 +4,108 @@ appId: swmansion.enriched.example - launchApp - tapOn: - id: "toggle-screen-button" + id: 'toggle-screen-button' - tapOn: - id: "editor-input" + id: 'editor-input' - tapOn: - id: "toolbar-unordered-list" -- inputText: "Bullet item one" + id: 'toolbar-unordered-list' +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Bullet item one' - pressKey: Enter -- inputText: "Bullet item two" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Bullet item two' - pressKey: Enter -- inputText: "Bullet item three" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Bullet item three' - pressKey: Enter - pressKey: Enter - tapOn: - id: "toolbar-quote" -- inputText: "Quoted line one" + id: 'toolbar-quote' +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Quoted line one' - pressKey: Enter -- inputText: "Quoted line two" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Quoted line two' - pressKey: Enter -- inputText: "Quoted line three" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Quoted line three' - pressKey: Enter - tapOn: - id: "toolbar-quote" + id: 'toolbar-quote' - tapOn: - id: "toolbar-ordered-list" -- inputText: "Numbered item one" + id: 'toolbar-ordered-list' +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Numbered item one' - pressKey: Enter -- inputText: "Numbered item two" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Numbered item two' - pressKey: Enter -- inputText: "Numbered item three" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Numbered item three' - pressKey: Enter - pressKey: Enter - pressKey: Backspace -- inputText: "Plain text line one" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Plain text line one' - pressKey: Enter -- inputText: "Plain text final" +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: 'Plain text final' - swipe: from: - id: "editor-input" + id: 'editor-input' direction: DOWN +- waitForAnimationToEnd + - runFlow: - file: "../subflows/capture_or_assert_screenshot.yaml" + file: '../subflows/capture_or_assert_screenshot.yaml' env: - SCREENSHOT_NAME: "scrolling_paragraph_styles_top" + SCREENSHOT_NAME: 'scrolling_paragraph_styles_top' - tapOn: - id: "focus-button" + id: 'focus-button' - tapOn: - id: "editor-input" - point: "0%,0%" + id: 'editor-input' + point: '0%,0%' - swipe: from: - id: "editor-input" + id: 'editor-input' direction: UP +- waitForAnimationToEnd + - runFlow: - file: "../subflows/capture_or_assert_screenshot.yaml" + file: '../subflows/capture_or_assert_screenshot.yaml' env: - SCREENSHOT_NAME: "scrolling_paragraph_styles_bottom" + SCREENSHOT_NAME: 'scrolling_paragraph_styles_bottom' diff --git a/.maestro/enrichedInput/screenshots/android/checkbox_toggle.png b/.maestro/enrichedInput/screenshots/android/checkbox_toggle.png index b3b661a85..82aba0c3f 100644 Binary files a/.maestro/enrichedInput/screenshots/android/checkbox_toggle.png and b/.maestro/enrichedInput/screenshots/android/checkbox_toggle.png differ diff --git a/.maestro/enrichedInput/screenshots/android/codeblock_no_link_detection.png b/.maestro/enrichedInput/screenshots/android/codeblock_no_link_detection.png index 78e27577d..ebd809209 100644 Binary files a/.maestro/enrichedInput/screenshots/android/codeblock_no_link_detection.png and b/.maestro/enrichedInput/screenshots/android/codeblock_no_link_detection.png differ diff --git a/.maestro/enrichedInput/screenshots/android/codeblock_style_blocking.png b/.maestro/enrichedInput/screenshots/android/codeblock_style_blocking.png index 44ae70724..c9c7014bd 100644 Binary files a/.maestro/enrichedInput/screenshots/android/codeblock_style_blocking.png and b/.maestro/enrichedInput/screenshots/android/codeblock_style_blocking.png differ diff --git a/.maestro/enrichedInput/screenshots/android/conflicting_paragraph_merge.png b/.maestro/enrichedInput/screenshots/android/conflicting_paragraph_merge.png index 074a56c79..5cb1db832 100644 Binary files a/.maestro/enrichedInput/screenshots/android/conflicting_paragraph_merge.png and b/.maestro/enrichedInput/screenshots/android/conflicting_paragraph_merge.png differ diff --git a/.maestro/enrichedInput/screenshots/android/empty_element_parsing.png b/.maestro/enrichedInput/screenshots/android/empty_element_parsing.png index 7e28ad4ea..3270f5705 100644 Binary files a/.maestro/enrichedInput/screenshots/android/empty_element_parsing.png and b/.maestro/enrichedInput/screenshots/android/empty_element_parsing.png differ diff --git a/.maestro/enrichedInput/screenshots/android/empty_html_block_parsing.png b/.maestro/enrichedInput/screenshots/android/empty_html_block_parsing.png index d0fa3c3d1..68dfb0506 100644 Binary files a/.maestro/enrichedInput/screenshots/android/empty_html_block_parsing.png and b/.maestro/enrichedInput/screenshots/android/empty_html_block_parsing.png differ diff --git a/.maestro/enrichedInput/screenshots/android/empty_lists_parsing.png b/.maestro/enrichedInput/screenshots/android/empty_lists_parsing.png index d777b0b24..08997a780 100644 Binary files a/.maestro/enrichedInput/screenshots/android/empty_lists_parsing.png and b/.maestro/enrichedInput/screenshots/android/empty_lists_parsing.png differ diff --git a/.maestro/enrichedInput/screenshots/android/extending_paragraph_style_on_paste_after_copy.png b/.maestro/enrichedInput/screenshots/android/extending_paragraph_style_on_paste_after_copy.png index f717ac4fa..a4d787fe4 100644 Binary files a/.maestro/enrichedInput/screenshots/android/extending_paragraph_style_on_paste_after_copy.png and b/.maestro/enrichedInput/screenshots/android/extending_paragraph_style_on_paste_after_copy.png differ diff --git a/.maestro/enrichedInput/screenshots/android/extending_paragraph_style_on_paste_after_cut.png b/.maestro/enrichedInput/screenshots/android/extending_paragraph_style_on_paste_after_cut.png index f717ac4fa..a4d787fe4 100644 Binary files a/.maestro/enrichedInput/screenshots/android/extending_paragraph_style_on_paste_after_cut.png and b/.maestro/enrichedInput/screenshots/android/extending_paragraph_style_on_paste_after_cut.png differ diff --git a/.maestro/enrichedInput/screenshots/android/font_scaling.png b/.maestro/enrichedInput/screenshots/android/font_scaling.png index 6b955aa4e..b75174700 100644 Binary files a/.maestro/enrichedInput/screenshots/android/font_scaling.png and b/.maestro/enrichedInput/screenshots/android/font_scaling.png differ diff --git a/.maestro/enrichedInput/screenshots/android/font_scaling_placeholder.png b/.maestro/enrichedInput/screenshots/android/font_scaling_placeholder.png index 1288cc4b3..024799772 100644 Binary files a/.maestro/enrichedInput/screenshots/android/font_scaling_placeholder.png and b/.maestro/enrichedInput/screenshots/android/font_scaling_placeholder.png differ diff --git a/.maestro/enrichedInput/screenshots/android/html_link_not_extended.png b/.maestro/enrichedInput/screenshots/android/html_link_not_extended.png index d0198a17d..183e46f60 100644 Binary files a/.maestro/enrichedInput/screenshots/android/html_link_not_extended.png and b/.maestro/enrichedInput/screenshots/android/html_link_not_extended.png differ diff --git a/.maestro/enrichedInput/screenshots/android/image_inside_list_parsing.png b/.maestro/enrichedInput/screenshots/android/image_inside_list_parsing.png index 8c7af1ca3..8cd47a926 100644 Binary files a/.maestro/enrichedInput/screenshots/android/image_inside_list_parsing.png and b/.maestro/enrichedInput/screenshots/android/image_inside_list_parsing.png differ diff --git a/.maestro/enrichedInput/screenshots/android/image_position_stability_after_typing.png b/.maestro/enrichedInput/screenshots/android/image_position_stability_after_typing.png index c0a316c11..9a7741f52 100644 Binary files a/.maestro/enrichedInput/screenshots/android/image_position_stability_after_typing.png and b/.maestro/enrichedInput/screenshots/android/image_position_stability_after_typing.png differ diff --git a/.maestro/enrichedInput/screenshots/android/image_position_stability_before_typing.png b/.maestro/enrichedInput/screenshots/android/image_position_stability_before_typing.png index 063a9ad02..a1643511d 100644 Binary files a/.maestro/enrichedInput/screenshots/android/image_position_stability_before_typing.png and b/.maestro/enrichedInput/screenshots/android/image_position_stability_before_typing.png differ diff --git a/.maestro/enrichedInput/screenshots/android/initial_html_parsing.png b/.maestro/enrichedInput/screenshots/android/initial_html_parsing.png index 628395281..b2b09a80a 100644 Binary files a/.maestro/enrichedInput/screenshots/android/initial_html_parsing.png and b/.maestro/enrichedInput/screenshots/android/initial_html_parsing.png differ diff --git a/.maestro/enrichedInput/screenshots/android/initial_placeholder.png b/.maestro/enrichedInput/screenshots/android/initial_placeholder.png index 63fdb011d..cab2068d5 100644 Binary files a/.maestro/enrichedInput/screenshots/android/initial_placeholder.png and b/.maestro/enrichedInput/screenshots/android/initial_placeholder.png differ diff --git a/.maestro/enrichedInput/screenshots/android/inline_code_paste_into_codeblock.png b/.maestro/enrichedInput/screenshots/android/inline_code_paste_into_codeblock.png index 995be24f8..72f505e64 100644 Binary files a/.maestro/enrichedInput/screenshots/android/inline_code_paste_into_codeblock.png and b/.maestro/enrichedInput/screenshots/android/inline_code_paste_into_codeblock.png differ diff --git a/.maestro/enrichedInput/screenshots/android/inline_styles.png b/.maestro/enrichedInput/screenshots/android/inline_styles.png index 818443706..a06f96772 100644 Binary files a/.maestro/enrichedInput/screenshots/android/inline_styles.png and b/.maestro/enrichedInput/screenshots/android/inline_styles.png differ diff --git a/.maestro/enrichedInput/screenshots/android/inline_styles_merge.png b/.maestro/enrichedInput/screenshots/android/inline_styles_merge.png index e1b1cece0..1a331a1ac 100644 Binary files a/.maestro/enrichedInput/screenshots/android/inline_styles_merge.png and b/.maestro/enrichedInput/screenshots/android/inline_styles_merge.png differ diff --git a/.maestro/enrichedInput/screenshots/android/inline_styles_removal.png b/.maestro/enrichedInput/screenshots/android/inline_styles_removal.png index 731ac2b2a..4211172a6 100644 Binary files a/.maestro/enrichedInput/screenshots/android/inline_styles_removal.png and b/.maestro/enrichedInput/screenshots/android/inline_styles_removal.png differ diff --git a/.maestro/enrichedInput/screenshots/android/inline_styles_survive_block_toggle.png b/.maestro/enrichedInput/screenshots/android/inline_styles_survive_block_toggle.png index e98448191..250e317e9 100644 Binary files a/.maestro/enrichedInput/screenshots/android/inline_styles_survive_block_toggle.png and b/.maestro/enrichedInput/screenshots/android/inline_styles_survive_block_toggle.png differ diff --git a/.maestro/enrichedInput/screenshots/android/line_overlapping.png b/.maestro/enrichedInput/screenshots/android/line_overlapping.png index 760674223..adcac1661 100644 Binary files a/.maestro/enrichedInput/screenshots/android/line_overlapping.png and b/.maestro/enrichedInput/screenshots/android/line_overlapping.png differ diff --git a/.maestro/enrichedInput/screenshots/android/link_not_extended.png b/.maestro/enrichedInput/screenshots/android/link_not_extended.png index 8fba4d554..16db13bd1 100644 Binary files a/.maestro/enrichedInput/screenshots/android/link_not_extended.png and b/.maestro/enrichedInput/screenshots/android/link_not_extended.png differ diff --git a/.maestro/enrichedInput/screenshots/android/links_visual_auto.png b/.maestro/enrichedInput/screenshots/android/links_visual_auto.png index 369f3a2ea..8cba8aebc 100644 Binary files a/.maestro/enrichedInput/screenshots/android/links_visual_auto.png and b/.maestro/enrichedInput/screenshots/android/links_visual_auto.png differ diff --git a/.maestro/enrichedInput/screenshots/android/links_visual_manual.png b/.maestro/enrichedInput/screenshots/android/links_visual_manual.png index cc265a9db..adcbe4381 100644 Binary files a/.maestro/enrichedInput/screenshots/android/links_visual_manual.png and b/.maestro/enrichedInput/screenshots/android/links_visual_manual.png differ diff --git a/.maestro/enrichedInput/screenshots/android/list_newline_insertion.png b/.maestro/enrichedInput/screenshots/android/list_newline_insertion.png index 12b3b0384..50f0da4e2 100644 Binary files a/.maestro/enrichedInput/screenshots/android/list_newline_insertion.png and b/.maestro/enrichedInput/screenshots/android/list_newline_insertion.png differ diff --git a/.maestro/enrichedInput/screenshots/android/mention_parsing_single_quoted_attributes.png b/.maestro/enrichedInput/screenshots/android/mention_parsing_single_quoted_attributes.png index a8d68a2cd..e3656cca6 100644 Binary files a/.maestro/enrichedInput/screenshots/android/mention_parsing_single_quoted_attributes.png and b/.maestro/enrichedInput/screenshots/android/mention_parsing_single_quoted_attributes.png differ diff --git a/.maestro/enrichedInput/screenshots/android/mention_popup_closing_on_cursor_travel_1.png b/.maestro/enrichedInput/screenshots/android/mention_popup_closing_on_cursor_travel_1.png index 74947bcfd..9f26d4154 100644 Binary files a/.maestro/enrichedInput/screenshots/android/mention_popup_closing_on_cursor_travel_1.png and b/.maestro/enrichedInput/screenshots/android/mention_popup_closing_on_cursor_travel_1.png differ diff --git a/.maestro/enrichedInput/screenshots/android/mention_popup_closing_on_cursor_travel_2.png b/.maestro/enrichedInput/screenshots/android/mention_popup_closing_on_cursor_travel_2.png index 7a053e6c5..a0679f176 100644 Binary files a/.maestro/enrichedInput/screenshots/android/mention_popup_closing_on_cursor_travel_2.png and b/.maestro/enrichedInput/screenshots/android/mention_popup_closing_on_cursor_travel_2.png differ diff --git a/.maestro/enrichedInput/screenshots/android/mention_popup_closing_on_cursor_travel_3.png b/.maestro/enrichedInput/screenshots/android/mention_popup_closing_on_cursor_travel_3.png index d80b9a756..1ea1f331a 100644 Binary files a/.maestro/enrichedInput/screenshots/android/mention_popup_closing_on_cursor_travel_3.png and b/.maestro/enrichedInput/screenshots/android/mention_popup_closing_on_cursor_travel_3.png differ diff --git a/.maestro/enrichedInput/screenshots/android/ordered_list_renumbering_after_deleting_second_line.png b/.maestro/enrichedInput/screenshots/android/ordered_list_renumbering_after_deleting_second_line.png index 5d00fb1ce..ed5633b75 100644 Binary files a/.maestro/enrichedInput/screenshots/android/ordered_list_renumbering_after_deleting_second_line.png and b/.maestro/enrichedInput/screenshots/android/ordered_list_renumbering_after_deleting_second_line.png differ diff --git a/.maestro/enrichedInput/screenshots/android/ordered_list_renumbering_after_emptying_second_line.png b/.maestro/enrichedInput/screenshots/android/ordered_list_renumbering_after_emptying_second_line.png index 53049a519..0b37c1a1c 100644 Binary files a/.maestro/enrichedInput/screenshots/android/ordered_list_renumbering_after_emptying_second_line.png and b/.maestro/enrichedInput/screenshots/android/ordered_list_renumbering_after_emptying_second_line.png differ diff --git a/.maestro/enrichedInput/screenshots/android/paragraph_style_after_removal.png b/.maestro/enrichedInput/screenshots/android/paragraph_style_after_removal.png index 5f5e0c7af..3a711c478 100644 Binary files a/.maestro/enrichedInput/screenshots/android/paragraph_style_after_removal.png and b/.maestro/enrichedInput/screenshots/android/paragraph_style_after_removal.png differ diff --git a/.maestro/enrichedInput/screenshots/android/paragraph_style_toggle.png b/.maestro/enrichedInput/screenshots/android/paragraph_style_toggle.png index 756cfe7e5..d84824aaf 100644 Binary files a/.maestro/enrichedInput/screenshots/android/paragraph_style_toggle.png and b/.maestro/enrichedInput/screenshots/android/paragraph_style_toggle.png differ diff --git a/.maestro/enrichedInput/screenshots/android/paragraph_styles_alignment.png b/.maestro/enrichedInput/screenshots/android/paragraph_styles_alignment.png index 31828ca25..a68cb3811 100644 Binary files a/.maestro/enrichedInput/screenshots/android/paragraph_styles_alignment.png and b/.maestro/enrichedInput/screenshots/android/paragraph_styles_alignment.png differ diff --git a/.maestro/enrichedInput/screenshots/android/paragraph_styles_blocks.png b/.maestro/enrichedInput/screenshots/android/paragraph_styles_blocks.png index 4d075df95..5396defc6 100644 Binary files a/.maestro/enrichedInput/screenshots/android/paragraph_styles_blocks.png and b/.maestro/enrichedInput/screenshots/android/paragraph_styles_blocks.png differ diff --git a/.maestro/enrichedInput/screenshots/android/paragraph_styles_headings.png b/.maestro/enrichedInput/screenshots/android/paragraph_styles_headings.png index d94481f0a..67f0a0a57 100644 Binary files a/.maestro/enrichedInput/screenshots/android/paragraph_styles_headings.png and b/.maestro/enrichedInput/screenshots/android/paragraph_styles_headings.png differ diff --git a/.maestro/enrichedInput/screenshots/android/paragraph_styles_lists.png b/.maestro/enrichedInput/screenshots/android/paragraph_styles_lists.png index 7bb6e38db..ff5677f6c 100644 Binary files a/.maestro/enrichedInput/screenshots/android/paragraph_styles_lists.png and b/.maestro/enrichedInput/screenshots/android/paragraph_styles_lists.png differ diff --git a/.maestro/enrichedInput/screenshots/android/paragraph_styles_no_crash.png b/.maestro/enrichedInput/screenshots/android/paragraph_styles_no_crash.png index 3278d7428..1cb05225e 100644 Binary files a/.maestro/enrichedInput/screenshots/android/paragraph_styles_no_crash.png and b/.maestro/enrichedInput/screenshots/android/paragraph_styles_no_crash.png differ diff --git a/.maestro/enrichedInput/screenshots/android/scroll_after_typing_long_content_bottom.png b/.maestro/enrichedInput/screenshots/android/scroll_after_typing_long_content_bottom.png index adf2bd9cc..6dc88b27d 100644 Binary files a/.maestro/enrichedInput/screenshots/android/scroll_after_typing_long_content_bottom.png and b/.maestro/enrichedInput/screenshots/android/scroll_after_typing_long_content_bottom.png differ diff --git a/.maestro/enrichedInput/screenshots/android/scroll_after_typing_long_content_top.png b/.maestro/enrichedInput/screenshots/android/scroll_after_typing_long_content_top.png index 0fb8b9b36..7d33f2aad 100644 Binary files a/.maestro/enrichedInput/screenshots/android/scroll_after_typing_long_content_top.png and b/.maestro/enrichedInput/screenshots/android/scroll_after_typing_long_content_top.png differ diff --git a/.maestro/enrichedInput/screenshots/android/scrolling_paragraph_styles_bottom.png b/.maestro/enrichedInput/screenshots/android/scrolling_paragraph_styles_bottom.png index 9c2dd9795..9064d483a 100644 Binary files a/.maestro/enrichedInput/screenshots/android/scrolling_paragraph_styles_bottom.png and b/.maestro/enrichedInput/screenshots/android/scrolling_paragraph_styles_bottom.png differ diff --git a/.maestro/enrichedInput/screenshots/android/scrolling_paragraph_styles_top.png b/.maestro/enrichedInput/screenshots/android/scrolling_paragraph_styles_top.png index 3b946339f..e86256624 100644 Binary files a/.maestro/enrichedInput/screenshots/android/scrolling_paragraph_styles_top.png and b/.maestro/enrichedInput/screenshots/android/scrolling_paragraph_styles_top.png differ diff --git a/.maestro/enrichedInput/screenshots/android/scrolling_set_value_bottom.png b/.maestro/enrichedInput/screenshots/android/scrolling_set_value_bottom.png index adf2bd9cc..6dc88b27d 100644 Binary files a/.maestro/enrichedInput/screenshots/android/scrolling_set_value_bottom.png and b/.maestro/enrichedInput/screenshots/android/scrolling_set_value_bottom.png differ diff --git a/.maestro/enrichedInput/screenshots/android/scrolling_set_value_top.png b/.maestro/enrichedInput/screenshots/android/scrolling_set_value_top.png index 0fb8b9b36..7d33f2aad 100644 Binary files a/.maestro/enrichedInput/screenshots/android/scrolling_set_value_top.png and b/.maestro/enrichedInput/screenshots/android/scrolling_set_value_top.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/checkbox_toggle.png b/.maestro/enrichedInput/screenshots/ios/checkbox_toggle.png index 64e25fbe9..9e93238f8 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/checkbox_toggle.png and b/.maestro/enrichedInput/screenshots/ios/checkbox_toggle.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/codeblock_br_preservation.png b/.maestro/enrichedInput/screenshots/ios/codeblock_br_preservation.png index 28727a10e..5c7adec73 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/codeblock_br_preservation.png and b/.maestro/enrichedInput/screenshots/ios/codeblock_br_preservation.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/codeblock_no_link_detection.png b/.maestro/enrichedInput/screenshots/ios/codeblock_no_link_detection.png index f78d43e34..d6f84b23c 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/codeblock_no_link_detection.png and b/.maestro/enrichedInput/screenshots/ios/codeblock_no_link_detection.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/codeblock_style_blocking.png b/.maestro/enrichedInput/screenshots/ios/codeblock_style_blocking.png index 0b0fd68ef..782462fb2 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/codeblock_style_blocking.png and b/.maestro/enrichedInput/screenshots/ios/codeblock_style_blocking.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/conflicting_paragraph_merge.png b/.maestro/enrichedInput/screenshots/ios/conflicting_paragraph_merge.png index b9decd9f7..d011cd7b5 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/conflicting_paragraph_merge.png and b/.maestro/enrichedInput/screenshots/ios/conflicting_paragraph_merge.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/empty_element_parsing.png b/.maestro/enrichedInput/screenshots/ios/empty_element_parsing.png index ea9dd3310..86433dc2b 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/empty_element_parsing.png and b/.maestro/enrichedInput/screenshots/ios/empty_element_parsing.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/empty_html_block_parsing.png b/.maestro/enrichedInput/screenshots/ios/empty_html_block_parsing.png index 9dd93697f..3cbcf5785 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/empty_html_block_parsing.png and b/.maestro/enrichedInput/screenshots/ios/empty_html_block_parsing.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/empty_lists_parsing.png b/.maestro/enrichedInput/screenshots/ios/empty_lists_parsing.png index 015e7d397..efcee0bee 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/empty_lists_parsing.png and b/.maestro/enrichedInput/screenshots/ios/empty_lists_parsing.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/font_scaling.png b/.maestro/enrichedInput/screenshots/ios/font_scaling.png index ccc86279c..ed139b3f5 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/font_scaling.png and b/.maestro/enrichedInput/screenshots/ios/font_scaling.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/font_scaling_placeholder.png b/.maestro/enrichedInput/screenshots/ios/font_scaling_placeholder.png index 99c329c32..4b890dbc0 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/font_scaling_placeholder.png and b/.maestro/enrichedInput/screenshots/ios/font_scaling_placeholder.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/html_link_not_extended.png b/.maestro/enrichedInput/screenshots/ios/html_link_not_extended.png index 42920d325..b1952b89a 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/html_link_not_extended.png and b/.maestro/enrichedInput/screenshots/ios/html_link_not_extended.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/image_inside_list_parsing.png b/.maestro/enrichedInput/screenshots/ios/image_inside_list_parsing.png index 599bd6522..2eb105b59 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/image_inside_list_parsing.png and b/.maestro/enrichedInput/screenshots/ios/image_inside_list_parsing.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/initial_html_parsing.png b/.maestro/enrichedInput/screenshots/ios/initial_html_parsing.png index 8bbe3f484..fc3efe516 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/initial_html_parsing.png and b/.maestro/enrichedInput/screenshots/ios/initial_html_parsing.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/initial_placeholder.png b/.maestro/enrichedInput/screenshots/ios/initial_placeholder.png index 7a6729d42..d133a8656 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/initial_placeholder.png and b/.maestro/enrichedInput/screenshots/ios/initial_placeholder.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/inline_code_paste_into_codeblock.png b/.maestro/enrichedInput/screenshots/ios/inline_code_paste_into_codeblock.png index d739d1720..137c32ee0 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/inline_code_paste_into_codeblock.png and b/.maestro/enrichedInput/screenshots/ios/inline_code_paste_into_codeblock.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/inline_styles.png b/.maestro/enrichedInput/screenshots/ios/inline_styles.png index 9a9acc094..7494bae8d 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/inline_styles.png and b/.maestro/enrichedInput/screenshots/ios/inline_styles.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/inline_styles_merge.png b/.maestro/enrichedInput/screenshots/ios/inline_styles_merge.png index a52dbeef6..211ac8cba 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/inline_styles_merge.png and b/.maestro/enrichedInput/screenshots/ios/inline_styles_merge.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/inline_styles_removal.png b/.maestro/enrichedInput/screenshots/ios/inline_styles_removal.png index a7b19f9c8..de3c3a1b5 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/inline_styles_removal.png and b/.maestro/enrichedInput/screenshots/ios/inline_styles_removal.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/inline_styles_survive_block_toggle.png b/.maestro/enrichedInput/screenshots/ios/inline_styles_survive_block_toggle.png index 0058f528b..34e14d48d 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/inline_styles_survive_block_toggle.png and b/.maestro/enrichedInput/screenshots/ios/inline_styles_survive_block_toggle.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/line_overlapping.png b/.maestro/enrichedInput/screenshots/ios/line_overlapping.png index fa0eac630..05cd63217 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/line_overlapping.png and b/.maestro/enrichedInput/screenshots/ios/line_overlapping.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/link_not_extended.png b/.maestro/enrichedInput/screenshots/ios/link_not_extended.png index cc91179c8..00660f2db 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/link_not_extended.png and b/.maestro/enrichedInput/screenshots/ios/link_not_extended.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/links_visual_auto.png b/.maestro/enrichedInput/screenshots/ios/links_visual_auto.png index 2efbdbf07..ae885fe67 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/links_visual_auto.png and b/.maestro/enrichedInput/screenshots/ios/links_visual_auto.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/links_visual_manual.png b/.maestro/enrichedInput/screenshots/ios/links_visual_manual.png index bb0bd58f7..bbab12b9d 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/links_visual_manual.png and b/.maestro/enrichedInput/screenshots/ios/links_visual_manual.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/list_newline_insertion.png b/.maestro/enrichedInput/screenshots/ios/list_newline_insertion.png index ea1bdc616..23dde0f10 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/list_newline_insertion.png and b/.maestro/enrichedInput/screenshots/ios/list_newline_insertion.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/mention_parsing_single_quoted_attributes.png b/.maestro/enrichedInput/screenshots/ios/mention_parsing_single_quoted_attributes.png index 8933d2de9..433116806 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/mention_parsing_single_quoted_attributes.png and b/.maestro/enrichedInput/screenshots/ios/mention_parsing_single_quoted_attributes.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/mention_popup_closing_on_cursor_travel_1.png b/.maestro/enrichedInput/screenshots/ios/mention_popup_closing_on_cursor_travel_1.png index 7f0cfabe9..59976788b 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/mention_popup_closing_on_cursor_travel_1.png and b/.maestro/enrichedInput/screenshots/ios/mention_popup_closing_on_cursor_travel_1.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/mention_popup_closing_on_cursor_travel_2.png b/.maestro/enrichedInput/screenshots/ios/mention_popup_closing_on_cursor_travel_2.png index a32731ece..56543b8a5 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/mention_popup_closing_on_cursor_travel_2.png and b/.maestro/enrichedInput/screenshots/ios/mention_popup_closing_on_cursor_travel_2.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/mention_popup_closing_on_cursor_travel_3.png b/.maestro/enrichedInput/screenshots/ios/mention_popup_closing_on_cursor_travel_3.png index b0c1a44ca..0f7eb9c11 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/mention_popup_closing_on_cursor_travel_3.png and b/.maestro/enrichedInput/screenshots/ios/mention_popup_closing_on_cursor_travel_3.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/ordered_list_renumbering_after_deleting_second_line.png b/.maestro/enrichedInput/screenshots/ios/ordered_list_renumbering_after_deleting_second_line.png index d72a13061..67c0e9664 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/ordered_list_renumbering_after_deleting_second_line.png and b/.maestro/enrichedInput/screenshots/ios/ordered_list_renumbering_after_deleting_second_line.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/ordered_list_renumbering_after_emptying_second_line.png b/.maestro/enrichedInput/screenshots/ios/ordered_list_renumbering_after_emptying_second_line.png index 431d95210..c4564e363 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/ordered_list_renumbering_after_emptying_second_line.png and b/.maestro/enrichedInput/screenshots/ios/ordered_list_renumbering_after_emptying_second_line.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/paragraph_style_after_removal.png b/.maestro/enrichedInput/screenshots/ios/paragraph_style_after_removal.png index 8bf9c8233..6f7a1ba7c 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/paragraph_style_after_removal.png and b/.maestro/enrichedInput/screenshots/ios/paragraph_style_after_removal.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/paragraph_style_toggle.png b/.maestro/enrichedInput/screenshots/ios/paragraph_style_toggle.png index 7c2dbefc8..bb568d634 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/paragraph_style_toggle.png and b/.maestro/enrichedInput/screenshots/ios/paragraph_style_toggle.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/paragraph_styles_alignment.png b/.maestro/enrichedInput/screenshots/ios/paragraph_styles_alignment.png index 28f837a59..9e52c64b5 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/paragraph_styles_alignment.png and b/.maestro/enrichedInput/screenshots/ios/paragraph_styles_alignment.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/paragraph_styles_blocks.png b/.maestro/enrichedInput/screenshots/ios/paragraph_styles_blocks.png index 4b7ff996e..41377403d 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/paragraph_styles_blocks.png and b/.maestro/enrichedInput/screenshots/ios/paragraph_styles_blocks.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/paragraph_styles_headings.png b/.maestro/enrichedInput/screenshots/ios/paragraph_styles_headings.png index 4aeb94c42..8f4bfe57f 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/paragraph_styles_headings.png and b/.maestro/enrichedInput/screenshots/ios/paragraph_styles_headings.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/paragraph_styles_lists.png b/.maestro/enrichedInput/screenshots/ios/paragraph_styles_lists.png index 2bee088d8..8acceb4a0 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/paragraph_styles_lists.png and b/.maestro/enrichedInput/screenshots/ios/paragraph_styles_lists.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/paragraph_styles_no_crash.png b/.maestro/enrichedInput/screenshots/ios/paragraph_styles_no_crash.png index c54bd5738..6a15e587f 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/paragraph_styles_no_crash.png and b/.maestro/enrichedInput/screenshots/ios/paragraph_styles_no_crash.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/scroll_after_typing_long_content_bottom.png b/.maestro/enrichedInput/screenshots/ios/scroll_after_typing_long_content_bottom.png index 09b5ec7eb..5d1413b6a 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/scroll_after_typing_long_content_bottom.png and b/.maestro/enrichedInput/screenshots/ios/scroll_after_typing_long_content_bottom.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/scroll_after_typing_long_content_top.png b/.maestro/enrichedInput/screenshots/ios/scroll_after_typing_long_content_top.png index 1ef3751a7..ce1bc9584 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/scroll_after_typing_long_content_top.png and b/.maestro/enrichedInput/screenshots/ios/scroll_after_typing_long_content_top.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/scrolling_paragraph_styles_bottom.png b/.maestro/enrichedInput/screenshots/ios/scrolling_paragraph_styles_bottom.png index 96087f395..86d569b7e 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/scrolling_paragraph_styles_bottom.png and b/.maestro/enrichedInput/screenshots/ios/scrolling_paragraph_styles_bottom.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/scrolling_paragraph_styles_top.png b/.maestro/enrichedInput/screenshots/ios/scrolling_paragraph_styles_top.png index 241461ace..541b646ca 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/scrolling_paragraph_styles_top.png and b/.maestro/enrichedInput/screenshots/ios/scrolling_paragraph_styles_top.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/scrolling_set_value_bottom.png b/.maestro/enrichedInput/screenshots/ios/scrolling_set_value_bottom.png index 09b5ec7eb..5d1413b6a 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/scrolling_set_value_bottom.png and b/.maestro/enrichedInput/screenshots/ios/scrolling_set_value_bottom.png differ diff --git a/.maestro/enrichedInput/screenshots/ios/scrolling_set_value_top.png b/.maestro/enrichedInput/screenshots/ios/scrolling_set_value_top.png index 1ef3751a7..ce1bc9584 100644 Binary files a/.maestro/enrichedInput/screenshots/ios/scrolling_set_value_top.png and b/.maestro/enrichedInput/screenshots/ios/scrolling_set_value_top.png differ diff --git a/.maestro/enrichedInput/subflows/capture_or_assert_fullscreen_screenshot.yaml b/.maestro/enrichedInput/subflows/capture_or_assert_fullscreen_screenshot.yaml index f51d04b5a..fd8bc5692 100644 --- a/.maestro/enrichedInput/subflows/capture_or_assert_fullscreen_screenshot.yaml +++ b/.maestro/enrichedInput/subflows/capture_or_assert_fullscreen_screenshot.yaml @@ -3,6 +3,14 @@ appId: swmansion.enriched.example - tapOn: id: 'blur-button' +- waitForAnimationToEnd + +# Force a delay to ensure the selection cursor is invisible +- extendedWaitUntil: + visible: 'fake_element_to_force_delay' + optional: true + timeout: 1000 + - runFlow: file: '../../subflows/capture_or_assert_screenshot.yaml' env: diff --git a/.maestro/enrichedInput/subflows/capture_or_assert_screenshot.yaml b/.maestro/enrichedInput/subflows/capture_or_assert_screenshot.yaml index ea7b9e800..596e99b5a 100644 --- a/.maestro/enrichedInput/subflows/capture_or_assert_screenshot.yaml +++ b/.maestro/enrichedInput/subflows/capture_or_assert_screenshot.yaml @@ -3,6 +3,12 @@ appId: swmansion.enriched.example - tapOn: id: 'blur-button' +# Force a delay to ensure the selection cursor is invisible +- extendedWaitUntil: + visible: 'fake_element_to_force_delay' + optional: true + timeout: 200 + - runFlow: file: '../../subflows/capture_or_assert_screenshot.yaml' env: diff --git a/.maestro/enrichedInput/subflows/insert_image.yaml b/.maestro/enrichedInput/subflows/insert_image.yaml index d8804279e..37127018e 100644 --- a/.maestro/enrichedInput/subflows/insert_image.yaml +++ b/.maestro/enrichedInput/subflows/insert_image.yaml @@ -1,20 +1,19 @@ appId: swmansion.enriched.example --- - - tapOn: - id: "toolbar-image" + id: 'toolbar-image' - waitForAnimationToEnd - extendedWaitUntil: visible: - id: "image-modal-submit-button" + id: 'image-modal-submit-button' timeout: 10000 - addMedia: - - "../../assets/sample_image.jpg" + - '../../assets/sample_image.jpg' - tapOn: - id: "image-modal-submit-button" + id: 'image-modal-submit-button' - runFlow: - file: "pick_first_image.yaml" + file: 'pick_first_image.yaml' diff --git a/.maestro/enrichedInput/subflows/insert_link.yaml b/.maestro/enrichedInput/subflows/insert_link.yaml index 744d98514..feeffff51 100644 --- a/.maestro/enrichedInput/subflows/insert_link.yaml +++ b/.maestro/enrichedInput/subflows/insert_link.yaml @@ -13,12 +13,18 @@ appId: swmansion.enriched.example - tapOn: id: "link-modal-text-input" -- inputText: ${LINK_TEXT} +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: ${LINK_TEXT} - tapOn: id: "link-modal-url-input" -- inputText: ${LINK_URL} +- runFlow: + file: '../../subflows/input_text.yaml' + env: + TEXT: ${LINK_URL} - tapOn: id: "link-modal-submit-button" diff --git a/.maestro/enrichedInput/subflows/set_editor_value.yaml b/.maestro/enrichedInput/subflows/set_editor_value.yaml index 67b459db1..e87c5d33e 100644 --- a/.maestro/enrichedInput/subflows/set_editor_value.yaml +++ b/.maestro/enrichedInput/subflows/set_editor_value.yaml @@ -1,19 +1,26 @@ appId: swmansion.enriched.example --- - - tapOn: - id: "set-value-button" + id: 'set-value-button' - waitForAnimationToEnd - extendedWaitUntil: visible: - id: "value-modal-input" + id: 'value-modal-input' timeout: 10000 - tapOn: - id: "value-modal-input" + id: 'value-modal-input' - inputText: ${VALUE} - tapOn: - id: "value-modal-submit-button" + id: 'value-modal-submit-button' + +# Wait until the modal is gone +- extendedWaitUntil: + notVisible: + id: 'value-modal-submit-button' + timeout: 10000 + +- waitForAnimationToEnd diff --git a/.maestro/enrichedText/flows/alignment_visual.yaml b/.maestro/enrichedText/flows/alignment_visual.yaml index cef9fa546..2a3384dfc 100644 --- a/.maestro/enrichedText/flows/alignment_visual.yaml +++ b/.maestro/enrichedText/flows/alignment_visual.yaml @@ -12,17 +12,7 @@ appId: swmansion.enriched.example - runFlow: file: '../subflows/set_enriched_text_value.yaml' env: - VALUE: > - -

Left aligned

-

Centre aligned

-
Heading 6
-

Right aligned

-
    -
  1. Element 1
  2. -
  3. Element 2
  4. -
- + VALUE: '

Left aligned

Centre aligned

Heading 6

Right aligned

  1. Element 1
  2. Element 2
' - runFlow: file: '../subflows/capture_or_assert_screenshot.yaml' diff --git a/.maestro/enrichedText/flows/custom_styles_display.yaml b/.maestro/enrichedText/flows/custom_styles_display.yaml index 84c65a802..811098e96 100644 --- a/.maestro/enrichedText/flows/custom_styles_display.yaml +++ b/.maestro/enrichedText/flows/custom_styles_display.yaml @@ -12,12 +12,13 @@ appId: swmansion.enriched.example - runFlow: file: '../subflows/set_enriched_text_value.yaml' env: - VALUE: > - -

Link

-

@John Doe

-

- + VALUE: '

Link

@John Doe

' + +# Force a delay to ensure the screenshot is loaded +- extendedWaitUntil: + visible: 'fake_element_to_force_delay' + optional: true + timeout: 5000 - runFlow: file: '../subflows/capture_or_assert_screenshot.yaml' diff --git a/.maestro/enrichedText/flows/ellipsize_mode.yaml b/.maestro/enrichedText/flows/ellipsize_mode.yaml index 02c95a76e..5292f2367 100644 --- a/.maestro/enrichedText/flows/ellipsize_mode.yaml +++ b/.maestro/enrichedText/flows/ellipsize_mode.yaml @@ -12,8 +12,7 @@ appId: swmansion.enriched.example - runFlow: file: '../subflows/set_enriched_text_value.yaml' env: - VALUE: > -

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

+ VALUE: '

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

' # numberOfLines: all - runFlow: diff --git a/.maestro/enrichedText/flows/empty_list_elements_display.yaml b/.maestro/enrichedText/flows/empty_list_elements_display.yaml index d0a23a8bd..319d8833c 100644 --- a/.maestro/enrichedText/flows/empty_list_elements_display.yaml +++ b/.maestro/enrichedText/flows/empty_list_elements_display.yaml @@ -12,24 +12,7 @@ appId: swmansion.enriched.example - runFlow: file: '../subflows/set_enriched_text_value.yaml' env: - VALUE: > - -
    -
  1. First
  2. -
  3. -
  4. Third
  5. -
- - - + VALUE:
  1. First
  2. Third
- runFlow: file: '../subflows/capture_or_assert_screenshot.yaml' diff --git a/.maestro/enrichedText/flows/font_scaling.yaml b/.maestro/enrichedText/flows/font_scaling.yaml index a871d08be..2f5dc347a 100644 --- a/.maestro/enrichedText/flows/font_scaling.yaml +++ b/.maestro/enrichedText/flows/font_scaling.yaml @@ -14,18 +14,13 @@ tags: - runFlow: file: '../subflows/set_enriched_text_value.yaml' env: - VALUE: > - -

Example

-

Text

-
Heading 6
-
    -
  1. Element 1
  2. -
  3. Element 2
  4. -
- + VALUE:

Example

Text

Heading 6
  1. Element 1
  2. Element 2
-- scroll +- swipe: + direction: UP + waitToSettleTimeoutMs: 1000 + +- waitForAnimationToEnd - runFlow: file: '../subflows/capture_or_assert_screenshot.yaml' diff --git a/.maestro/enrichedText/flows/inline_styles_display.yaml b/.maestro/enrichedText/flows/inline_styles_display.yaml index d9046d9e8..f4e48f0dc 100644 --- a/.maestro/enrichedText/flows/inline_styles_display.yaml +++ b/.maestro/enrichedText/flows/inline_styles_display.yaml @@ -12,12 +12,7 @@ appId: swmansion.enriched.example - runFlow: file: '../subflows/set_enriched_text_value.yaml' env: - VALUE: > - -

Plain text

-

Bold Italic Underline Strike Code

-

Combined

- + VALUE: '

Plain text

Bold Italic Underline Strike Code

Combined

' - runFlow: file: '../subflows/capture_or_assert_screenshot.yaml' diff --git a/.maestro/enrichedText/flows/link_press.yaml b/.maestro/enrichedText/flows/link_press.yaml index 406eadd64..c53a0577e 100644 --- a/.maestro/enrichedText/flows/link_press.yaml +++ b/.maestro/enrichedText/flows/link_press.yaml @@ -18,6 +18,7 @@ appId: swmansion.enriched.example id: 'enriched-text' point: '5%,50%' +- waitForAnimationToEnd - runFlow: file: '../subflows/capture_or_assert_screenshot.yaml' env: diff --git a/.maestro/enrichedText/flows/mention_press.yaml b/.maestro/enrichedText/flows/mention_press.yaml index 0092dbfb1..68c59823a 100644 --- a/.maestro/enrichedText/flows/mention_press.yaml +++ b/.maestro/enrichedText/flows/mention_press.yaml @@ -18,6 +18,7 @@ appId: swmansion.enriched.example id: 'enriched-text' point: '5%,50%' +- waitForAnimationToEnd - runFlow: file: '../subflows/capture_or_assert_screenshot.yaml' env: diff --git a/.maestro/enrichedText/flows/paragraph_styles_display.yaml b/.maestro/enrichedText/flows/paragraph_styles_display.yaml index 3187d55be..e5e8907b7 100644 --- a/.maestro/enrichedText/flows/paragraph_styles_display.yaml +++ b/.maestro/enrichedText/flows/paragraph_styles_display.yaml @@ -12,32 +12,13 @@ appId: swmansion.enriched.example - runFlow: file: '../subflows/set_enriched_text_value.yaml' env: - VALUE: > - -

Heading 1

-

Heading 2

-

Heading 3

-

Heading 4

-
Heading 5
-
Heading 6
- -

Code block

-
-
-

Blockquote

-
- -
    -
  1. Ordered list
  2. -
- - + VALUE: '

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Code block

Blockquote

  1. Ordered list
' -- scroll +- swipe: + direction: UP + waitToSettleTimeoutMs: 1000 + +- waitForAnimationToEnd - runFlow: file: '../subflows/capture_or_assert_screenshot.yaml' diff --git a/.maestro/enrichedText/screenshots/android/alignment_visual.png b/.maestro/enrichedText/screenshots/android/alignment_visual.png index c3e03756a..db59c8cd1 100644 Binary files a/.maestro/enrichedText/screenshots/android/alignment_visual.png and b/.maestro/enrichedText/screenshots/android/alignment_visual.png differ diff --git a/.maestro/enrichedText/screenshots/android/custom_styles_display.png b/.maestro/enrichedText/screenshots/android/custom_styles_display.png index 97f2e6a81..f77160a17 100644 Binary files a/.maestro/enrichedText/screenshots/android/custom_styles_display.png and b/.maestro/enrichedText/screenshots/android/custom_styles_display.png differ diff --git a/.maestro/enrichedText/screenshots/android/ellipsize_head_1.png b/.maestro/enrichedText/screenshots/android/ellipsize_head_1.png index 5ad750173..245198008 100644 Binary files a/.maestro/enrichedText/screenshots/android/ellipsize_head_1.png and b/.maestro/enrichedText/screenshots/android/ellipsize_head_1.png differ diff --git a/.maestro/enrichedText/screenshots/android/ellipsize_head_all.png b/.maestro/enrichedText/screenshots/android/ellipsize_head_all.png index e9a429392..a74f1947c 100644 Binary files a/.maestro/enrichedText/screenshots/android/ellipsize_head_all.png and b/.maestro/enrichedText/screenshots/android/ellipsize_head_all.png differ diff --git a/.maestro/enrichedText/screenshots/android/ellipsize_middle_1.png b/.maestro/enrichedText/screenshots/android/ellipsize_middle_1.png index 7dd3f5723..7faa1e818 100644 Binary files a/.maestro/enrichedText/screenshots/android/ellipsize_middle_1.png and b/.maestro/enrichedText/screenshots/android/ellipsize_middle_1.png differ diff --git a/.maestro/enrichedText/screenshots/android/ellipsize_middle_all.png b/.maestro/enrichedText/screenshots/android/ellipsize_middle_all.png index e9a429392..a74f1947c 100644 Binary files a/.maestro/enrichedText/screenshots/android/ellipsize_middle_all.png and b/.maestro/enrichedText/screenshots/android/ellipsize_middle_all.png differ diff --git a/.maestro/enrichedText/screenshots/android/ellipsize_tail_1.png b/.maestro/enrichedText/screenshots/android/ellipsize_tail_1.png index 9fe8f4426..3023ae18a 100644 Binary files a/.maestro/enrichedText/screenshots/android/ellipsize_tail_1.png and b/.maestro/enrichedText/screenshots/android/ellipsize_tail_1.png differ diff --git a/.maestro/enrichedText/screenshots/android/ellipsize_tail_2.png b/.maestro/enrichedText/screenshots/android/ellipsize_tail_2.png index 3f2618a67..6b340de88 100644 Binary files a/.maestro/enrichedText/screenshots/android/ellipsize_tail_2.png and b/.maestro/enrichedText/screenshots/android/ellipsize_tail_2.png differ diff --git a/.maestro/enrichedText/screenshots/android/ellipsize_tail_all.png b/.maestro/enrichedText/screenshots/android/ellipsize_tail_all.png index e9a429392..a74f1947c 100644 Binary files a/.maestro/enrichedText/screenshots/android/ellipsize_tail_all.png and b/.maestro/enrichedText/screenshots/android/ellipsize_tail_all.png differ diff --git a/.maestro/enrichedText/screenshots/android/empty_list_elements_display.png b/.maestro/enrichedText/screenshots/android/empty_list_elements_display.png index 62859c08e..dd18a359f 100644 Binary files a/.maestro/enrichedText/screenshots/android/empty_list_elements_display.png and b/.maestro/enrichedText/screenshots/android/empty_list_elements_display.png differ diff --git a/.maestro/enrichedText/screenshots/android/external_html_parsing.png b/.maestro/enrichedText/screenshots/android/external_html_parsing.png index 09e5bf7ce..7c6a550e0 100644 Binary files a/.maestro/enrichedText/screenshots/android/external_html_parsing.png and b/.maestro/enrichedText/screenshots/android/external_html_parsing.png differ diff --git a/.maestro/enrichedText/screenshots/android/font_scaling.png b/.maestro/enrichedText/screenshots/android/font_scaling.png index 488791012..82c3ca95c 100644 Binary files a/.maestro/enrichedText/screenshots/android/font_scaling.png and b/.maestro/enrichedText/screenshots/android/font_scaling.png differ diff --git a/.maestro/enrichedText/screenshots/android/inline_styles_display.png b/.maestro/enrichedText/screenshots/android/inline_styles_display.png index fe658211f..22878055b 100644 Binary files a/.maestro/enrichedText/screenshots/android/inline_styles_display.png and b/.maestro/enrichedText/screenshots/android/inline_styles_display.png differ diff --git a/.maestro/enrichedText/screenshots/android/link_press.png b/.maestro/enrichedText/screenshots/android/link_press.png index 0a6f60821..48877080b 100644 Binary files a/.maestro/enrichedText/screenshots/android/link_press.png and b/.maestro/enrichedText/screenshots/android/link_press.png differ diff --git a/.maestro/enrichedText/screenshots/android/mention_press.png b/.maestro/enrichedText/screenshots/android/mention_press.png index d480c2e1e..f83ea9b2f 100644 Binary files a/.maestro/enrichedText/screenshots/android/mention_press.png and b/.maestro/enrichedText/screenshots/android/mention_press.png differ diff --git a/.maestro/enrichedText/screenshots/android/paragraph_styles_display.png b/.maestro/enrichedText/screenshots/android/paragraph_styles_display.png index 112148d77..790afc239 100644 Binary files a/.maestro/enrichedText/screenshots/android/paragraph_styles_display.png and b/.maestro/enrichedText/screenshots/android/paragraph_styles_display.png differ diff --git a/.maestro/enrichedText/screenshots/ios/alignment_visual.png b/.maestro/enrichedText/screenshots/ios/alignment_visual.png index cffcfac4b..6e085a743 100644 Binary files a/.maestro/enrichedText/screenshots/ios/alignment_visual.png and b/.maestro/enrichedText/screenshots/ios/alignment_visual.png differ diff --git a/.maestro/enrichedText/screenshots/ios/custom_styles_display.png b/.maestro/enrichedText/screenshots/ios/custom_styles_display.png index 2ac807c3e..4ed800f00 100644 Binary files a/.maestro/enrichedText/screenshots/ios/custom_styles_display.png and b/.maestro/enrichedText/screenshots/ios/custom_styles_display.png differ diff --git a/.maestro/enrichedText/screenshots/ios/ellipsize_head_1.png b/.maestro/enrichedText/screenshots/ios/ellipsize_head_1.png index 71889c7c7..7fd71cbf4 100644 Binary files a/.maestro/enrichedText/screenshots/ios/ellipsize_head_1.png and b/.maestro/enrichedText/screenshots/ios/ellipsize_head_1.png differ diff --git a/.maestro/enrichedText/screenshots/ios/ellipsize_head_2.png b/.maestro/enrichedText/screenshots/ios/ellipsize_head_2.png index bbf5a646e..0c56793a2 100644 Binary files a/.maestro/enrichedText/screenshots/ios/ellipsize_head_2.png and b/.maestro/enrichedText/screenshots/ios/ellipsize_head_2.png differ diff --git a/.maestro/enrichedText/screenshots/ios/ellipsize_head_all.png b/.maestro/enrichedText/screenshots/ios/ellipsize_head_all.png index db3859730..1b61138a0 100644 Binary files a/.maestro/enrichedText/screenshots/ios/ellipsize_head_all.png and b/.maestro/enrichedText/screenshots/ios/ellipsize_head_all.png differ diff --git a/.maestro/enrichedText/screenshots/ios/ellipsize_middle_1.png b/.maestro/enrichedText/screenshots/ios/ellipsize_middle_1.png index 0414fcd60..eba801ffb 100644 Binary files a/.maestro/enrichedText/screenshots/ios/ellipsize_middle_1.png and b/.maestro/enrichedText/screenshots/ios/ellipsize_middle_1.png differ diff --git a/.maestro/enrichedText/screenshots/ios/ellipsize_middle_2.png b/.maestro/enrichedText/screenshots/ios/ellipsize_middle_2.png index d6d6b878b..420d34ba6 100644 Binary files a/.maestro/enrichedText/screenshots/ios/ellipsize_middle_2.png and b/.maestro/enrichedText/screenshots/ios/ellipsize_middle_2.png differ diff --git a/.maestro/enrichedText/screenshots/ios/ellipsize_middle_all.png b/.maestro/enrichedText/screenshots/ios/ellipsize_middle_all.png index db3859730..1b61138a0 100644 Binary files a/.maestro/enrichedText/screenshots/ios/ellipsize_middle_all.png and b/.maestro/enrichedText/screenshots/ios/ellipsize_middle_all.png differ diff --git a/.maestro/enrichedText/screenshots/ios/ellipsize_tail_1.png b/.maestro/enrichedText/screenshots/ios/ellipsize_tail_1.png index 34451e3e2..1783d09ae 100644 Binary files a/.maestro/enrichedText/screenshots/ios/ellipsize_tail_1.png and b/.maestro/enrichedText/screenshots/ios/ellipsize_tail_1.png differ diff --git a/.maestro/enrichedText/screenshots/ios/ellipsize_tail_2.png b/.maestro/enrichedText/screenshots/ios/ellipsize_tail_2.png index 038030e52..9dc6af975 100644 Binary files a/.maestro/enrichedText/screenshots/ios/ellipsize_tail_2.png and b/.maestro/enrichedText/screenshots/ios/ellipsize_tail_2.png differ diff --git a/.maestro/enrichedText/screenshots/ios/ellipsize_tail_all.png b/.maestro/enrichedText/screenshots/ios/ellipsize_tail_all.png index db3859730..1b61138a0 100644 Binary files a/.maestro/enrichedText/screenshots/ios/ellipsize_tail_all.png and b/.maestro/enrichedText/screenshots/ios/ellipsize_tail_all.png differ diff --git a/.maestro/enrichedText/screenshots/ios/empty_list_elements_display.png b/.maestro/enrichedText/screenshots/ios/empty_list_elements_display.png index 03dcbd827..86aa4ce1e 100644 Binary files a/.maestro/enrichedText/screenshots/ios/empty_list_elements_display.png and b/.maestro/enrichedText/screenshots/ios/empty_list_elements_display.png differ diff --git a/.maestro/enrichedText/screenshots/ios/external_html_parsing.png b/.maestro/enrichedText/screenshots/ios/external_html_parsing.png index 5dc1f9aa4..90caca662 100644 Binary files a/.maestro/enrichedText/screenshots/ios/external_html_parsing.png and b/.maestro/enrichedText/screenshots/ios/external_html_parsing.png differ diff --git a/.maestro/enrichedText/screenshots/ios/font_scaling.png b/.maestro/enrichedText/screenshots/ios/font_scaling.png index 95d5c5808..3d780dcb9 100644 Binary files a/.maestro/enrichedText/screenshots/ios/font_scaling.png and b/.maestro/enrichedText/screenshots/ios/font_scaling.png differ diff --git a/.maestro/enrichedText/screenshots/ios/inline_styles_display.png b/.maestro/enrichedText/screenshots/ios/inline_styles_display.png index 974d833f7..3c7f09f62 100644 Binary files a/.maestro/enrichedText/screenshots/ios/inline_styles_display.png and b/.maestro/enrichedText/screenshots/ios/inline_styles_display.png differ diff --git a/.maestro/enrichedText/screenshots/ios/link_press.png b/.maestro/enrichedText/screenshots/ios/link_press.png index 4a664d37f..40ea794ca 100644 Binary files a/.maestro/enrichedText/screenshots/ios/link_press.png and b/.maestro/enrichedText/screenshots/ios/link_press.png differ diff --git a/.maestro/enrichedText/screenshots/ios/mention_press.png b/.maestro/enrichedText/screenshots/ios/mention_press.png index 0ec98e5fa..b1032ff97 100644 Binary files a/.maestro/enrichedText/screenshots/ios/mention_press.png and b/.maestro/enrichedText/screenshots/ios/mention_press.png differ diff --git a/.maestro/enrichedText/screenshots/ios/paragraph_styles_display.png b/.maestro/enrichedText/screenshots/ios/paragraph_styles_display.png index 8abd1b2af..3f7e0eb9d 100644 Binary files a/.maestro/enrichedText/screenshots/ios/paragraph_styles_display.png and b/.maestro/enrichedText/screenshots/ios/paragraph_styles_display.png differ diff --git a/.maestro/enrichedText/subflows/run_ellipsize_case.yaml b/.maestro/enrichedText/subflows/run_ellipsize_case.yaml index 4984c5b4b..9e5b93b97 100644 --- a/.maestro/enrichedText/subflows/run_ellipsize_case.yaml +++ b/.maestro/enrichedText/subflows/run_ellipsize_case.yaml @@ -1,16 +1,17 @@ appId: swmansion.enriched.example --- - tapOn: - id: "number-of-lines-${NOL_BUTTON}-button" + id: 'number-of-lines-${NOL_BUTTON}-button' -- assertVisible: "numberOfLines: ${NOL_LABEL}" +- assertVisible: 'numberOfLines: ${NOL_LABEL}' - tapOn: - id: "ellipsize-${ELLIPSIZE_MODE}-button" + id: 'ellipsize-${ELLIPSIZE_MODE}-button' -- assertVisible: "ellipsizeMode: ${ELLIPSIZE_MODE}" +- assertVisible: 'ellipsizeMode: ${ELLIPSIZE_MODE}' +- waitForAnimationToEnd - runFlow: - file: "./capture_or_assert_screenshot.yaml" + file: './capture_or_assert_screenshot.yaml' env: - SCREENSHOT_NAME: "${SCREENSHOT_NAME}" + SCREENSHOT_NAME: '${SCREENSHOT_NAME}' diff --git a/.maestro/enrichedText/subflows/set_enriched_text_value.yaml b/.maestro/enrichedText/subflows/set_enriched_text_value.yaml index b03f48bcd..a199c3fed 100644 --- a/.maestro/enrichedText/subflows/set_enriched_text_value.yaml +++ b/.maestro/enrichedText/subflows/set_enriched_text_value.yaml @@ -1,19 +1,26 @@ appId: swmansion.enriched.example --- - - tapOn: - id: "set-enriched-text-button" + id: 'set-enriched-text-button' - waitForAnimationToEnd - extendedWaitUntil: visible: - id: "value-modal-input" + id: 'value-modal-input' timeout: 10000 - tapOn: - id: "value-modal-input" + id: 'value-modal-input' - inputText: ${VALUE} - tapOn: - id: "value-modal-submit-button" + id: 'value-modal-submit-button' + +# Wait until the modal is gone +- extendedWaitUntil: + notVisible: + id: 'value-modal-submit-button' + timeout: 10000 + +- waitForAnimationToEnd diff --git a/.maestro/scripts/run-tests-ci-android.sh b/.maestro/scripts/run-tests-ci-android.sh new file mode 100755 index 000000000..26c442d9e --- /dev/null +++ b/.maestro/scripts/run-tests-ci-android.sh @@ -0,0 +1,113 @@ +#!/bin/bash +# run-tests-ci-android.sh - CI-only script for running Android E2E tests. +# +# Designed to run inside reactivecircus/android-emulator-runner's `script` context +# where the emulator is already booted. Builds the app, installs it, and runs +# maestro tests. +# +# The emulator serial is passed via EMULATOR_SERIAL (defaults to emulator-5554). + +set -euo pipefail + +SERIAL="${EMULATOR_SERIAL:-emulator-5554}" + +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)" +MAESTRO_ROOT="$REPO_ROOT/.maestro" +SCREENSHOT_ROOT="$MAESTRO_ROOT" +BUNDLE_ID="swmansion.enriched.example" + +DEFAULT_MAESTRO_RUNNER="$HOME/.maestro-runner/bin/maestro-runner" +if [ -n "${MAESTRO_RUNNER:-}" ]; then + MAESTRO_BIN="$MAESTRO_RUNNER" +elif [ -x "$DEFAULT_MAESTRO_RUNNER" ]; then + MAESTRO_BIN="$DEFAULT_MAESTRO_RUNNER" +elif command -v maestro-runner >/dev/null 2>&1; then + MAESTRO_BIN="$(command -v maestro-runner)" +else + echo "Error: maestro-runner not found." >&2 + exit 1 +fi + +echo "=== Using maestro-runner: $MAESTRO_BIN ===" +"$MAESTRO_BIN" --version || true + +echo "=== Waiting for emulator to be ready ===" +adb -s "$SERIAL" wait-for-device +until adb -s "$SERIAL" shell getprop sys.boot_completed 2>/dev/null | grep -q "^1$"; do + sleep 2 +done + +adb -s "$SERIAL" shell pm disable-user --user 0 com.google.android.inputmethod.latin 2>/dev/null || true +adb -s "$SERIAL" shell settings put secure spell_checker_enabled 0 + +echo "=== Building and installing app ===" +yarn example android --device "$SERIAL" + +set_font_scale() { + case "$1" in + default) adb -s "$SERIAL" shell settings put system font_scale 1.0 ;; + large) adb -s "$SERIAL" shell settings put system font_scale 1.5 ;; + esac +} + +trap 'set_font_scale default' EXIT +set_font_scale default + +FLOWS=".maestro/enrichedInput/flows .maestro/enrichedText/flows" +ASSETS_DIR="$MAESTRO_ROOT/assets" +[ -d "$ASSETS_DIR" ] && FLOWS="$ASSETS_DIR $FLOWS" + +EXTRA="--env SCREENSHOT_ROOT=$SCREENSHOT_ROOT --exclude-tags ios-only" +DRIVER_ARGS="--driver devicelab" + +run_maestro() { + local tmp rc attempt max_attempts=3 + for attempt in $(seq 1 "$max_attempts"); do + tmp=$(mktemp) + local cmd + # shellcheck disable=SC2086 + cmd=$(printf '%q ' "$MAESTRO_BIN" --platform android --device "$SERIAL" $DRIVER_ARGS $EXTRA "$@" test $FLOWS) + script -qec "$cmd" /dev/null 2>&1 | tee "$tmp" + rc=${PIPESTATUS[0]} + + if [ "$rc" -eq 0 ]; then + rm -f "$tmp" + return 0 + fi + + if sed 's/\x1b\[[0-9;]*[a-zA-Z]//g; s/\r//g' "$tmp" | grep -Eqi "did not match any [Ff]lows|no flows matched"; then + echo "warn: no flows matched the tag filter — treating as success" >&2 + rm -f "$tmp" + return 0 + fi + + if [ "$attempt" -lt "$max_attempts" ] && sed 's/\x1b\[[0-9;]*[a-zA-Z]//g; s/\r//g' "$tmp" | grep -Eqi 'failed to create driver|driver crashed on startup|DeviceLab driver crashed'; then + echo "warn: driver crashed on startup (attempt $attempt/$max_attempts), retrying in 10s..." >&2 + local sock="/tmp/devicelab-driver-${SERIAL}.sock" + adb -s "$SERIAL" forward --remove "localfilesystem:$sock" 2>/dev/null || true + adb -s "$SERIAL" shell am force-stop dev.devicelab.driver.android.test 2>/dev/null || true + sleep 10 + rm -f "$tmp" + continue + fi + + rm -f "$tmp" + return "$rc" + done +} + +set +e + +echo "=== Running maestro tests ===" +run_maestro --exclude-tags accessibility +EXIT_REGULAR=$? + +echo "=== Running maestro accessibility tests ===" +set_font_scale large +run_maestro --include-tags accessibility +EXIT_A11Y=$? + +set -e + +exit $(( EXIT_REGULAR != 0 || EXIT_A11Y != 0 )) diff --git a/.maestro/scripts/run-tests.sh b/.maestro/scripts/run-tests.sh index afaf96887..12c0805e6 100755 --- a/.maestro/scripts/run-tests.sh +++ b/.maestro/scripts/run-tests.sh @@ -16,20 +16,26 @@ # ./run-tests.sh --platform ios # ./run-tests.sh --platform android --update-screenshots .maestro/enrichedInput/flows/core_controls_smoke.yaml # ./run-tests.sh --platform ios --rebuild +# +# Uses the local maestro-runner binary: +# Android → --driver devicelab +# iOS → default driver +# +# In CI on Android, driver startup crashes are retried twice (3 runs total). set -euo pipefail -MIN_MAESTRO_VERSION="2.3.0" - -if ! command -v maestro >/dev/null 2>&1; then - echo "Error: maestro CLI not found." >&2 - exit 1 -fi +DEFAULT_MAESTRO_RUNNER="$HOME/.maestro-runner/bin/maestro-runner" -MAESTRO_VERSION=$(maestro --version) -# Compare versions by sorting them; if the minimum sorts after the actual, it's too old. -if [ "$(printf '%s\n' "$MIN_MAESTRO_VERSION" "$MAESTRO_VERSION" | sort -V | head -n1)" != "$MIN_MAESTRO_VERSION" ]; then - echo "Error: maestro $MAESTRO_VERSION is too old, minimum required is $MIN_MAESTRO_VERSION" >&2 +if [ -n "${MAESTRO_RUNNER:-}" ]; then + MAESTRO_BIN="$MAESTRO_RUNNER" +elif [ -x "$DEFAULT_MAESTRO_RUNNER" ]; then + MAESTRO_BIN="$DEFAULT_MAESTRO_RUNNER" +elif command -v maestro-runner >/dev/null 2>&1; then + MAESTRO_BIN="$(command -v maestro-runner)" +else + echo "Error: maestro-runner not found." >&2 + echo "Install it locally (expected at $DEFAULT_MAESTRO_RUNNER) or set MAESTRO_RUNNER." >&2 exit 1 fi @@ -61,7 +67,21 @@ case "$PLATFORM" in *) echo "Error: --platform must be ios or android" >&2; exit 1 ;; esac -DEVICE_ID=$("$SETUP" | tee /dev/tty | grep "^DEVICE_ID=" | cut -d= -f2) +DEVICE_ID=$("$SETUP" | tee /dev/stderr | grep "^DEVICE_ID=" | cut -d= -f2) + +# Android uses DeviceLab; iOS keeps the runner default driver. +DRIVER_ARGS="" +if [ "$PLATFORM" = android ]; then + DRIVER_ARGS="--driver devicelab" +fi + +echo "=== Using maestro-runner: $MAESTRO_BIN ===" +"$MAESTRO_BIN" --version || true +if [ -n "$DRIVER_ARGS" ]; then + echo "=== Driver: devicelab (android) ===" +else + echo "=== Driver: default (ios) ===" +fi app_installed() { if [ "$PLATFORM" = ios ]; then @@ -120,35 +140,91 @@ ASSETS_DIR="$MAESTRO_ROOT/assets" # leaving the device scaled. Force a known state before the normal tests. set_font_scale default -# maestro exits non-zero when the tag filter matches zero flows. That's not a -# real failure for us (e.g. running a single flow that has no accessibility -# variant), and letting it propagate aborts latter test suites. +# maestro-runner exits non-zero when the tag filter matches zero flows. That's +# not a real failure for us (e.g. running a single flow that has no +# accessibility variant), and letting it propagate aborts later test suites. +is_ci_android() { + [ "$PLATFORM" = android ] && { [ -n "${CI:-}" ] || [ -n "${GITHUB_ACTIONS:-}" ]; } +} + +is_driver_startup_crash() { + # Strip ANSI escape sequences and carriage returns before matching — `script` + # wraps output in terminal control codes that can trip up grep. + sed 's/\x1b\[[0-9;]*[a-zA-Z]//g; s/\r//g' "$1" | grep -Eqi 'failed to create driver|driver crashed on startup|DeviceLab driver crashed' +} + +cleanup_devicelab_driver() { + [ "$PLATFORM" != android ] && return 0 + local sock="/tmp/devicelab-driver-${DEVICE_ID}.sock" + adb -s "$DEVICE_ID" forward --remove "localfilesystem:$sock" 2>/dev/null || true + adb -s "$DEVICE_ID" shell am force-stop dev.devicelab.driver.android.test 2>/dev/null || true + sleep 8 +} + run_maestro() { - local tmp rc - tmp=$(mktemp) - # `script` allocates a pseudo-TTY so maestro keeps - # ANSI colors when piped through `tee`. - if [[ "$OSTYPE" == darwin* ]]; then - script -q /dev/null maestro test "$@" 2>&1 | tee "$tmp" + local max_attempts rc tmp attempt=1 delayed_retry=0 + if [ -n "${MAESTRO_MAX_RETRIES:-}" ]; then + max_attempts="$MAESTRO_MAX_RETRIES" + elif is_ci_android; then + max_attempts=3 # 1 initial run + 2 retries else - local cmd - cmd=$(printf '%q ' maestro test "$@") - script -qc "$cmd" /dev/null 2>&1 | tee "$tmp" + max_attempts=1 fi - rc=${PIPESTATUS[0]} - if [ "$rc" -ne 0 ] && grep -q "did not match any Flows" "$tmp"; then - echo "warn: no flows matched the tag filter — treating as success" >&2 - rc=0 - fi - rm -f "$tmp" - return "$rc" + + while true; do + tmp=$(mktemp) + # `script` allocates a pseudo-TTY so the runner keeps + # ANSI colors when piped through `tee`. + # Global flags (--device, --driver, --env, tags) come before `test`. + if [[ "$OSTYPE" == darwin* ]]; then + # shellcheck disable=SC2086 + script -q /dev/null "$MAESTRO_BIN" --platform "$PLATFORM" --device "$DEVICE_ID" $DRIVER_ARGS $EXTRA "$@" test $FLOWS 2>&1 | tee "$tmp" + else + local cmd + # shellcheck disable=SC2086 + cmd=$(printf '%q ' "$MAESTRO_BIN" --platform "$PLATFORM" --device "$DEVICE_ID" $DRIVER_ARGS $EXTRA "$@" test $FLOWS) + script -qec "$cmd" /dev/null 2>&1 | tee "$tmp" + fi + rc=${PIPESTATUS[0]} + + if [ "$rc" -eq 0 ]; then + rm -f "$tmp" + return 0 + fi + + if sed 's/\x1b\[[0-9;]*[a-zA-Z]//g; s/\r//g' "$tmp" | grep -Eqi "did not match any [Ff]lows|no flows matched"; then + echo "warn: no flows matched the tag filter — treating as success" >&2 + rm -f "$tmp" + return 0 + fi + + if is_driver_startup_crash "$tmp"; then + if [ "$attempt" -lt "$max_attempts" ]; then + echo "warn: driver crashed on startup (attempt $attempt/$max_attempts), retrying..." >&2 + cleanup_devicelab_driver + attempt=$((attempt + 1)) + rm -f "$tmp" + continue + fi + if [ "$delayed_retry" -eq 0 ] && is_ci_android; then + echo "warn: driver still failing, waiting before delayed retry..." >&2 + delayed_retry=1 + cleanup_devicelab_driver + sleep 10 + rm -f "$tmp" + continue + fi + fi + + rm -f "$tmp" + return "$rc" + done } set +e echo "=== Running maestro tests ===" -# shellcheck disable=SC2086 -run_maestro --device "$DEVICE_ID" --exclude-tags accessibility $EXTRA $FLOWS +run_maestro --exclude-tags accessibility EXIT_REGULAR=$? # These are the tests that require changing the system's settings @@ -156,8 +232,7 @@ EXIT_REGULAR=$? echo "=== Running maestro accessibility tests ===" set_font_scale large -# shellcheck disable=SC2086 -run_maestro --device "$DEVICE_ID" --include-tags accessibility $EXTRA $FLOWS +run_maestro --include-tags accessibility EXIT_A11Y=$? set -e diff --git a/.maestro/scripts/setup-android-emulator.sh b/.maestro/scripts/setup-android-emulator.sh index 605c8f6bd..c834a60a2 100755 --- a/.maestro/scripts/setup-android-emulator.sh +++ b/.maestro/scripts/setup-android-emulator.sh @@ -2,7 +2,7 @@ set -euo pipefail API_LEVEL="36" -DEVICE_ID="pixel_9" +DEVICE_ID="pixel_7" ARCH=$(uname -m) if [ "$ARCH" = "arm64" ] || [ "$ARCH" = "aarch64" ]; then ABI="arm64-v8a" @@ -11,7 +11,7 @@ else fi TAG="google_apis_playstore" SYSTEM_IMAGE="system-images;android-${API_LEVEL};${TAG};${ABI}" -AVD_NAME="Pixel9-API${API_LEVEL}-Enriched" +AVD_NAME="Pixel7-API${API_LEVEL}-Enriched" PORT=5570 SERIAL="emulator-${PORT}" @@ -20,6 +20,11 @@ if [ -z "$ANDROID_HOME" ]; then exit 1 fi +# Ensure avdmanager and emulator use the same AVD directory regardless of +# what ANDROID_SDK_HOME is set to on the host (e.g. GitHub Actions runners). +export ANDROID_AVD_HOME="$HOME/.android/avd" +mkdir -p "$ANDROID_AVD_HOME" + for tool in sdkmanager avdmanager emulator adb; do if ! command -v "$tool" &>/dev/null; then echo "Error: '$tool' not found. Ensure Android SDK tools are installed and in PATH." @@ -41,19 +46,20 @@ fi if ! avdmanager list avd -c | grep -qx "${AVD_NAME}"; then echo "Creating AVD '$AVD_NAME'..." - echo "no" | avdmanager create avd \ - --name "$AVD_NAME" \ - --device "$DEVICE_ID" \ - --package "$SYSTEM_IMAGE" \ - --skin "$DEVICE_ID" + CREATE_CMD=(avdmanager create avd --name "$AVD_NAME" --device "$DEVICE_ID" --package "$SYSTEM_IMAGE") + # Skin is cosmetic (phone frame). Skip it on CI since the runner has no skin files + # and the emulator runs headless anyway. + [ -z "${CI:-}" ] && CREATE_CMD+=(--skin "$DEVICE_ID") + echo "no" | "${CREATE_CMD[@]}" fi AVD_CONFIG="$HOME/.android/avd/${AVD_NAME}.avd/config.ini" if [ -f "$AVD_CONFIG" ]; then - sed -i '' 's/^hw\.keyboard=.*/hw.keyboard=yes/' "$AVD_CONFIG" + sed -i.bak 's/^hw\.keyboard=.*/hw.keyboard=yes/' "$AVD_CONFIG" grep -q "^hw.keyboard=" "$AVD_CONFIG" || echo "hw.keyboard=yes" >> "$AVD_CONFIG" - sed -i '' 's/^hw\.mainKeys=.*/hw.mainKeys=yes/' "$AVD_CONFIG" + sed -i.bak 's/^hw\.mainKeys=.*/hw.mainKeys=yes/' "$AVD_CONFIG" grep -q "^hw.mainKeys=" "$AVD_CONFIG" || echo "hw.mainKeys=yes" >> "$AVD_CONFIG" + rm -f "$AVD_CONFIG.bak" fi if pgrep -f "emulator.*${AVD_NAME}" > /dev/null 2>&1; then @@ -63,11 +69,16 @@ if pgrep -f "emulator.*${AVD_NAME}" > /dev/null 2>&1; then fi echo "Starting emulator '$AVD_NAME'..." -emulator "@${AVD_NAME}" -port "$PORT" > /dev/null 2>&1 & +EMULATOR_ARGS=("@${AVD_NAME}" -port "$PORT") +if [ -n "${CI:-}" ]; then + EMULATOR_ARGS+=(-no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim) +fi + +emulator "${EMULATOR_ARGS[@]}" > /dev/null 2>&1 & echo "Waiting for emulator ($SERIAL) to connect to ADB..." -if ! timeout 120 adb -s "$SERIAL" wait-for-device; then - echo "Error: Emulator did not connect to ADB after 120s." +if ! timeout 300 adb -s "$SERIAL" wait-for-device; then + echo "Error: Emulator did not connect to ADB after 300s." exit 1 fi diff --git a/.maestro/subflows/capture_or_assert_screenshot.yaml b/.maestro/subflows/capture_or_assert_screenshot.yaml index ffb517426..f5eb41442 100644 --- a/.maestro/subflows/capture_or_assert_screenshot.yaml +++ b/.maestro/subflows/capture_or_assert_screenshot.yaml @@ -5,16 +5,16 @@ appId: swmansion.enriched.example true: ${UPDATE_SCREENSHOTS === "true"} commands: - takeScreenshot: - path: "${SCREENSHOT_ROOT}/${SCREENSHOT_PREFIX}/screenshots/${maestro.platform}/${SCREENSHOT_NAME}" + path: '${SCREENSHOT_ROOT}/${SCREENSHOT_PREFIX}/screenshots/${maestro.platform}/${SCREENSHOT_NAME}' cropOn: - id: "${ELEMENT_ID}" + id: '${ELEMENT_ID}' - runFlow: when: true: ${UPDATE_SCREENSHOTS !== "true"} commands: - assertScreenshot: - path: "${SCREENSHOT_ROOT}/${SCREENSHOT_PREFIX}/screenshots/${maestro.platform}/${SCREENSHOT_NAME}" - thresholdPercentage: 100 + path: '${SCREENSHOT_ROOT}/${SCREENSHOT_PREFIX}/screenshots/${maestro.platform}/${SCREENSHOT_NAME}' + thresholdPercentage: 99.9 cropOn: - id: "${ELEMENT_ID}" + id: '${ELEMENT_ID}' diff --git a/.maestro/subflows/input_text.yaml b/.maestro/subflows/input_text.yaml new file mode 100644 index 000000000..7103ccfb7 --- /dev/null +++ b/.maestro/subflows/input_text.yaml @@ -0,0 +1,16 @@ +appId: swmansion.enriched.example +--- + +- runFlow: + when: + platform: Android + commands: + - inputText: + text: ${TEXT} + keyPress: true + +- runFlow: + when: + platform: iOS + commands: + - inputText: ${TEXT} diff --git a/apps/example/src/screens/TestScreen.tsx b/apps/example/src/screens/TestScreen.tsx index 160fda327..378034285 100644 --- a/apps/example/src/screens/TestScreen.tsx +++ b/apps/example/src/screens/TestScreen.tsx @@ -71,8 +71,8 @@ export function TestScreen({ htmlStyle={htmlStyle} placeholder="Type something here..." placeholderTextColor="rgb(0, 26, 114)" - selectionColor="deepskyblue" - cursorColor="dodgerblue" + selectionColor="transparent" + cursorColor="transparent" autoCapitalize="sentences" linkRegex={LINK_REGEX} onChangeText={(e) => editor.handleChangeText(e.nativeEvent)} @@ -212,6 +212,7 @@ const styles = StyleSheet.create({ fontFamily: 'Nunito-Regular', paddingVertical: 12, paddingHorizontal: 14, + tintColor: 'transparent', }, editorInputMax: { maxHeight: 400,