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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions packages/rn-tester/.maestro/image-getsize-local-drawables.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
appId: ${APP_ID} # iOS: com.meta.RNTester.localDevelopment | Android: com.facebook.react.uiapp
tags:
- android-only
---
# This flow exercises Android-only behavior (Image.getSize on local drawable
# resources). The RNTester E2E job runs the entire .maestro/ folder on iOS as
# well, so guard the whole flow with a platform condition: on iOS the wrapped
# runFlow is skipped, leaving an empty (passing) flow; on Android it runs in full.
- runFlow:
when:
platform: Android
commands:
# Navigate to Image examples
- runFlow: ./helpers/launch-app-and-search.yml
- inputText:
text: "Image"
- assertVisible:
id: "Image"
- tapOn:
id: "Image"

# Search for the local drawables example
- assertVisible:
id: "example_search"
- tapOn:
id: "example_search"
- inputText:
text: "local drawables"
- hideKeyboard

# Navigate to the example
# RNTester appends " (android only)" to platform-scoped example titles, so
# match with an inline regex rather than the bare title.
- scrollUntilVisible:
element: "Image.getSize with local drawables.*"
direction: DOWN
speed: 40
timeout: 10000
- tapOn: "Image.getSize with local drawables.*"

# Tap the run button
- tapOn: "Run Image.getSize on local drawable resources"

# Assert success results contain dp dimensions
- extendedWaitUntil:
visible: "24x24 dp"
timeout: 10000
- assertVisible: "108x108 dp"

# Assert error case shows error message. The six getSize results render
# asynchronously in callback-completion order, so the non-existent resource
# row may land below the fold; scroll until the error text is visible.
- scrollUntilVisible:
element: "error:.*"
direction: DOWN
speed: 40
timeout: 10000
2 changes: 1 addition & 1 deletion packages/rn-tester/scripts/maestro-test-ios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# LICENSE file in the root directory of this source tree.

UDID=$(xcrun simctl list devices booted -j | jq -r '[.devices[]] | add | first | .udid')
maestro --udid="$UDID" test .maestro/ -e APP_ID=com.meta.RNTester.localDevelopment
maestro --udid="$UDID" test --exclude-tags android-only .maestro/ -e APP_ID=com.meta.RNTester.localDevelopment
Loading