Skip to content
Merged
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
13 changes: 5 additions & 8 deletions examples/test-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,18 +127,15 @@ server from its launcher.
The Maestro prototype suite lives in `examples/test-app/maestro` and runs through
`agent-device replay --maestro`:

```bash
pnpm test-app:maestro:ios -- --open "Agent Device Tester"
pnpm test-app:maestro:android -- --open "Agent Device Tester"
```

When the development build is already open and connected to Metro, omit
`--open` and run the suite against the existing session:

```bash
pnpm test-app:maestro:ios
pnpm test-app:maestro:android
```

The Maestro flow includes `launchApp`, so the suite launches the app inside each
test attempt. Start Metro first when the installed development build needs the
local bundle.

The suite intentionally covers the compat layer syntax used by public Maestro suites:
`runFlow` file/inline blocks, `when.platform`, config hooks, deterministic `repeat.times`,
flow `env`, selectors, input, assertions, and swipe.
3 changes: 3 additions & 0 deletions examples/test-app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"version": "1.0.0",
"orientation": "default",
"userInterfaceStyle": "automatic",
"buildCacheProvider": {
"plugin": "expo-build-disk-cache"
},
"plugins": ["expo-router"],
"ios": {
"supportsTablet": true,
Expand Down
4 changes: 3 additions & 1 deletion examples/test-app/maestro/checkout-form.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ appId: com.callstack.agentdevicelab
env:
CHECKOUT_NAME: Ada Lovelace
CHECKOUT_EMAIL: ada@example.com
PICKUP_TAPS: "2"
PICKUP_TAPS: '2'
onFlowStart:
- launchApp:
clearState: true
- assertVisible: Agent Device Tester
onFlowComplete:
- assertVisible: Delivery choices
Expand Down
3 changes: 3 additions & 0 deletions examples/test-app/maestro/helpers/open-checkout-form.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
---
- scrollUntilVisible:
element:
id: home-open-form
- tapOn:
id: home-open-form
- assertVisible: Checkout form
Expand Down
1 change: 1 addition & 0 deletions examples/test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
},
"devDependencies": {
"@types/react": "~19.2.2",
"expo-build-disk-cache": "^0.7.4",
"typescript": "~6.0.3"
}
}
120 changes: 119 additions & 1 deletion examples/test-app/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 1 addition & 12 deletions scripts/run-test-app-maestro-suite.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const options = {
platform: 'ios',
session: 'test-app-maestro',
flowDir: path.join(repoRoot, 'examples', 'test-app', 'maestro'),
openTarget: '',
close: false,
passthrough: [],
};
Expand All @@ -37,11 +36,6 @@ for (let index = 2; index < process.argv.length; index += 1) {
index += 1;
continue;
}
if (arg === '--open' && process.argv[index + 1]) {
options.openTarget = process.argv[index + 1];
index += 1;
continue;
}
if (arg === '--close') {
options.close = true;
continue;
Expand All @@ -67,14 +61,9 @@ function runAgentDevice(args) {
});
}

if (options.openTarget) {
runAgentDevice(['open', options.openTarget, '--platform', options.platform, ...options.passthrough]);
runAgentDevice(['wait', 'Agent Device Tester', '30000', '--platform', options.platform, ...options.passthrough]);
}

runAgentDevice([
'test',
options.flowDir,
...flows,
'--maestro',
'--platform',
options.platform,
Expand Down
Loading
Loading