Skip to content

Commit 0639237

Browse files
authored
Merge branch 'mobile-dev-inc:main' into develop
2 parents 78603bd + 509f32f commit 0639237

102 files changed

Lines changed: 3818 additions & 597 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/test.yaml

Lines changed: 25 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -100,64 +100,40 @@ jobs:
100100
retention-days: 1
101101
include-hidden-files: true
102102

103-
ios-integration-test:
104-
name: iOS Integration Test on Java ${{ matrix.java-version }}
103+
ios-driver-lib-test:
104+
name: MaestroDriverLib Unit Tests
105105
runs-on: macos-latest
106-
timeout-minutes: 50
107-
108-
strategy:
109-
fail-fast: false
110-
matrix:
111-
java-version: [17]
106+
timeout-minutes: 10
112107

113108
steps:
114-
- name: Clone repository (only needed for the e2e directory)
109+
- name: Clone repository
115110
uses: actions/checkout@v4
116111

117-
- name: Set up Java
118-
uses: actions/setup-java@v4
119-
with:
120-
distribution: zulu
121-
java-version: ${{ matrix.java-version }}
122-
cache: gradle
123-
124-
- name: Set permission to scripts
125-
run: chmod +x .github/scripts/boot_simulator.sh
126-
127-
- name: Boot Simulator
128-
run: ./.github/scripts/boot_simulator.sh
112+
- name: Run MaestroDriverLib Tests
113+
working-directory: ${{ github.workspace }}/maestro-ios-xctest-runner/MaestroDriverLib
114+
run: swift test
129115

130-
- name: Set Simulator
131-
run: |
132-
SIMULATOR_ID=$(xcrun simctl list -j | jq -r '.devices | to_entries[] | .value[] | select(.isAvailable==true and .state=="Booted") | .udid' | head -n 1)
133-
echo "SIMULATOR_ID=$SIMULATOR_ID" >> $GITHUB_ENV
134-
135-
- name: Download apps
136-
working-directory: ${{ github.workspace }}/e2e
137-
run: ./download_apps iOS
116+
ios-xctest-runner-test:
117+
name: iOS XCTest Runner Unit Tests
118+
runs-on: macos-latest
119+
timeout-minutes: 15
138120

139-
- name: Install apps
140-
working-directory: ${{ github.workspace }}/e2e
141-
run: |
142-
unzip apps/wikipedia.zip
143-
xcrun simctl install $SIMULATOR_ID ./Wikipedia.app
121+
steps:
122+
- name: Clone repository
123+
uses: actions/checkout@v4
144124

145-
- name: Build for Testing
146-
working-directory: ${{ github.workspace }}
147-
run: |
148-
xcodebuild clean build-for-testing \
149-
-project ./maestro-ios-xctest-runner/maestro-driver-ios.xcodeproj \
150-
-derivedDataPath "./driver-verification" \
151-
-scheme driver-verification-tests \
152-
-destination "generic/platform=iOS Simulator"
125+
- name: Select Xcode
126+
run: sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
153127

154-
- name: Run Integration tests
128+
- name: Run iOS Unit Tests
129+
working-directory: ${{ github.workspace }}/maestro-ios-xctest-runner
155130
run: |
156-
XCTESTRUN_FILE=$(find ./driver-verification/Build/Products -name "driver-verification-tests*.xctestrun" | head -n 1)
157-
echo "Running tests on $SIMULATOR_ID"
158-
xcodebuild test-without-building \
159-
-xctestrun "$XCTESTRUN_FILE" \
160-
-destination "id=$SIMULATOR_ID"
131+
xcodebuild test \
132+
-project maestro-driver-ios.xcodeproj \
133+
-scheme maestro-driver-iosTests \
134+
-destination 'platform=iOS Simulator,name=iPhone 16' \
135+
-only-testing:maestro-driver-iosTests \
136+
| xcpretty --color || exit ${PIPESTATUS[0]}
161137
162138
validate-gradle-wrapper:
163139
runs-on: ubuntu-latest
@@ -167,4 +143,4 @@ jobs:
167143
uses: actions/checkout@v4
168144

169145
- name: Validate Gradle Wrapper
170-
uses: gradle/actions/wrapper-validation@v3
146+
uses: gradle/actions/wrapper-validation@v4

.github/workflows/warn_build_xctestrunner.yaml

Lines changed: 0 additions & 14 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
22

33
## Unreleased
44

5+
## 2.2.0
6+
7+
- Add `--screen-size` option to test command, to specify the headless browser window size when testing web flows
8+
- Add `MAESTRO_DEVICE_UDID`, `MAESTRO_SHARD_ID`, and `MAESTRO_SHARD_INDEX` as default environment variables (useful for screenshot filenames when sharding)
9+
- Add step information to HTML test reports via a new `html-detailed` formatter
10+
- Add tags and custom property information to HTML and JUnit test reports
11+
- Add a new `assertScreenshot` command for visual regression testing
12+
- Add a `cropOn` property to the `takeScreenshot` command to crop screenshots to a specific element
13+
- Fix scrolling in Flutter Web
14+
- Fix output of subflows when using `--no-ansi` flag
15+
- Show `maestro hierarchy` and `maestro check-syntax` commands in `maestro --help`
16+
- Fix iOS driver app on Simulators running on Intel-based Macs
17+
- Fix a potential hang between Maestro and the on-device drivers when calls take too long
18+
- Some logging adjustments for less noise during web tests
19+
- Bump web support to Chrome v144
20+
- Bump DataFaker to v2.5.3, GraalJS engine to v24.2.0, log4j to v2.25.3
21+
22+
Thanks to @sazquatch17, @ImL1s, @sidferreira, @SosenWiosen, @TheKohan, @Fl0p, @ff-vivek and @eldare who all contributed changes included in this release ❤️
23+
524
## 2.1.0
625

726
- Add `setPermissions` command, for setting app permissions outside of `launchApp`
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
appId: com.example.example
2+
tags:
3+
- passing
4+
---
5+
- launchApp
6+
- tapOn: "Cropped Screenshot Test"
7+
- waitForAnimationToEnd
8+
9+
- assertScreenshot:
10+
path: workspaces/demo_app/screenshots/assertScreenshotCropped.png
11+
thresholdPercentage: 99.9
12+
cropOn:
13+
id: "testContainer"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
appId: com.example.example
2+
tags:
3+
- failing
4+
---
5+
- launchApp
6+
- tapOn: "Cropped Screenshot Test"
7+
- waitForAnimationToEnd
8+
9+
- assertScreenshot:
10+
path: workspaces/demo_app/screenshots/assertScreenshotCroppedHEIC.heic
11+
cropOn:
12+
id: "testContainer"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
appId: com.example.example
2+
tags:
3+
- passing
4+
---
5+
- launchApp
6+
- tapOn: "Cropped Screenshot Test"
7+
- waitForAnimationToEnd
8+
9+
- assertScreenshot:
10+
path: workspaces/demo_app/screenshots/assertScreenshotCroppedJPG.jpg
11+
thresholdPercentage: 99.9
12+
cropOn:
13+
id: "testContainer"

e2e/workspaces/demo_app/commands/inputRandomEmail.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ appId: com.example.example
22
---
33
- launchApp # For idempotence of sections
44

5-
- tapOn: 'Input Test'
5+
- tapOn: 'Input/Keyboard'
66
- tapOn:
77
id: 'textInput'
88
- inputRandomEmail

e2e/workspaces/demo_app/commands/inputRandomNumber.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ appId: com.example.example
22
---
33
- launchApp # For idempotence of sections
44

5-
- tapOn: 'Input Test'
5+
- tapOn: 'Input/Keyboard'
66
- tapOn:
77
id: 'textInput'
88
- inputRandomNumber

e2e/workspaces/demo_app/commands/inputRandomPersonName.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ appId: com.example.example
22
---
33
- launchApp # For idempotence of sections
44

5-
- tapOn: 'Input Test'
5+
- tapOn: 'Input/Keyboard'
66
- tapOn:
77
id: 'textInput'
88
- inputRandomPersonName

e2e/workspaces/demo_app/commands/inputRandomText.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ appId: com.example.example
22
---
33
- launchApp # For idempotence of sections
44

5-
- tapOn: 'Input Test'
5+
- tapOn: 'Input/Keyboard'
66
- tapOn:
77
id: 'textInput'
88
- inputRandomText

0 commit comments

Comments
 (0)