Skip to content

Commit

Permalink
Merge pull request #913 from guhungry/Feature/migrate-to-maestro
Browse files Browse the repository at this point in the history
Feature/migrate to maestro
  • Loading branch information
guhungry authored Aug 20, 2024
2 parents 4b03c3b + 6391107 commit 5b73187
Show file tree
Hide file tree
Showing 26 changed files with 856 additions and 1,412 deletions.
27 changes: 13 additions & 14 deletions .github/workflows/test-and-rebuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ jobs:
- name: Display structure of downloaded files
run: ls -R example/android/app/build/outputs/apk

- uses: dniHze/maestro-test-action@v1

- name: Run Tests
uses: reactivecircus/android-emulator-runner@v2
with:
Expand All @@ -151,7 +153,7 @@ jobs:
build-ios:
name: Build iOS
needs: analyse
runs-on: macos-13
runs-on: macos-latest
env:
TURBO_CACHE_DIR: .turbo/ios

Expand Down Expand Up @@ -201,14 +203,6 @@ jobs:
cd example
bundle install
- name: Install Detox dependencies
run: |
cd example
brew tap wix/brew
brew install applesimutils
yarn detox clean-framework-cache
yarn detox build-framework-cache
- name: Xcode Version
run: |
xcodebuild -version
Expand All @@ -217,12 +211,17 @@ jobs:
- name: Build iOS Release
run: |
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"
cd example/ios && pod install && cd -
cd example/ios && pod install --deployment && cd -
yarn turbo run test:ios:build --cache-dir="${{ env.TURBO_CACHE_DIR }}"
env:
RCT_NEW_ARCH_ENABLED: 0
RCT_NEW_ARCH_ENABLED: 1
USE_HERMES: 1

- name: Test iOS Release
run: |
yarn example test:ios:run
- uses: futureware-tech/simulator-action@v3
with:
model: 'iPhone 15'

- uses: dniHze/maestro-test-action@v1

- name: Run Tests
run: yarn example test:ios:run
85 changes: 0 additions & 85 deletions example/.detoxrc.js

This file was deleted.

33 changes: 33 additions & 0 deletions example/.maestro/batch/batch-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
appId: photomanipulator.example
---
- launchApp

- scrollUntilVisible:
element:
id: "example-exampleBatch"
direction: DOWN
visibilityPercentage: 80
timeout: 50000
speed: 80
- assertVisible:
id: "example-exampleBatch"

- scrollUntilVisible:
element:
id: "batchResult"
direction: DOWN
visibilityPercentage: 80
timeout: 30000
speed: 60
- assertVisible:
id: "batchResult"

- scrollUntilVisible:
element:
id: "batchResultPng"
direction: DOWN
visibilityPercentage: 80
timeout: 30000
speed: 60
- assertVisible:
id: "batchResultPng"
2 changes: 2 additions & 0 deletions example/.maestro/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
flows:
- "*/*"
43 changes: 43 additions & 0 deletions example/.maestro/crop/crop-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
appId: photomanipulator.example
---
- launchApp

- scrollUntilVisible:
element:
id: "example-exampleCrop"
direction: DOWN
visibilityPercentage: 60
timeout: 60000
speed: 80
- assertVisible:
id: "example-exampleCrop"

- scrollUntilVisible:
element:
id: "cropResult"
direction: DOWN
visibilityPercentage: 80
timeout: 30000
speed: 60
- assertVisible:
id: "cropResult"

- scrollUntilVisible:
element:
id: "cropResizeResult"
direction: DOWN
visibilityPercentage: 80
timeout: 30000
speed: 60
- assertVisible:
id: "cropResizeResult"

- scrollUntilVisible:
element:
id: "cropPngResult"
direction: DOWN
visibilityPercentage: 80
timeout: 30000
speed: 60
- assertVisible:
id: "cropPngResult"
43 changes: 43 additions & 0 deletions example/.maestro/flip/flip-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
appId: photomanipulator.example
---
- launchApp

- scrollUntilVisible:
element:
id: "example-exampleFlip"
direction: DOWN
visibilityPercentage: 60
timeout: 60000
speed: 80
- assertVisible:
id: "example-exampleFlip"

- scrollUntilVisible:
element:
id: "flipBothResult"
direction: DOWN
visibilityPercentage: 80
timeout: 30000
speed: 60
- assertVisible:
id: "flipBothResult"

- scrollUntilVisible:
element:
id: "flipHorizontalResult"
direction: DOWN
visibilityPercentage: 80
timeout: 30000
speed: 60
- assertVisible:
id: "flipHorizontalResult"

- scrollUntilVisible:
element:
id: "flipVerticalResult"
direction: DOWN
visibilityPercentage: 80
timeout: 30000
speed: 60
- assertVisible:
id: "flipVerticalResult"
16 changes: 16 additions & 0 deletions example/.maestro/optimize/optimize-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
appId: photomanipulator.example
---
- launchApp

- scrollUntilVisible:
element:
id: "example-exampleOptimize"
direction: DOWN
visibilityPercentage: 60
timeout: 60000
speed: 80
- assertVisible:
id: "example-exampleOptimize"

- assertVisible:
id: "optimizeResult"
26 changes: 26 additions & 0 deletions example/.maestro/overlay/overlay-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
appId: photomanipulator.example
---
- launchApp

- scrollUntilVisible:
element:
id: "example-exampleOverlayImage"
direction: DOWN
visibilityPercentage: 80
timeout: 30000
speed: 80
- assertVisible:
id: "example-exampleOverlayImage"

- assertVisible:
id: "overlayImageResult"

- scrollUntilVisible:
element:
id: "overlayImagePngResult"
direction: DOWN
visibilityPercentage: 80
timeout: 30000
speed: 80
- assertVisible:
id: "overlayImagePngResult"
26 changes: 26 additions & 0 deletions example/.maestro/print-text/print-text-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
appId: photomanipulator.example
---
- launchApp

- scrollUntilVisible:
element:
id: "example-examplePrintText"
direction: DOWN
visibilityPercentage: 70
timeout: 30000
speed: 80
- assertVisible:
id: "example-examplePrintText"

- assertVisible:
id: "printTextResult"

- scrollUntilVisible:
element:
id: "printTextPngResult"
direction: DOWN
visibilityPercentage: 80
timeout: 30000
speed: 80
- assertVisible:
id: "printTextPngResult"
43 changes: 43 additions & 0 deletions example/.maestro/rotate/rotate-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
appId: photomanipulator.example
---
- launchApp

- scrollUntilVisible:
element:
id: "example-exampleRotate"
direction: DOWN
visibilityPercentage: 60
timeout: 60000
speed: 80
- assertVisible:
id: "example-exampleRotate"

- scrollUntilVisible:
element:
id: "rotate90Result"
direction: DOWN
visibilityPercentage: 80
timeout: 30000
speed: 60
- assertVisible:
id: "rotate90Result"

- scrollUntilVisible:
element:
id: "rotate180Result"
direction: DOWN
visibilityPercentage: 80
timeout: 30000
speed: 60
- assertVisible:
id: "rotate180Result"

- scrollUntilVisible:
element:
id: "rotate270Result"
direction: DOWN
visibilityPercentage: 80
timeout: 30000
speed: 60
- assertVisible:
id: "rotate270Result"
Loading

0 comments on commit 5b73187

Please sign in to comment.