@balazsbarta/mp-skills 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/brainstorming/SKILL.md +201 -0
- package/.agents/skills/brainstorming/references/option-evaluation.md +64 -0
- package/.agents/skills/brainstorming/references/questioning-playbook.md +57 -0
- package/.agents/skills/brainstorming/references/repo-analysis.md +60 -0
- package/.agents/skills/conventional-commits/SKILL.md +124 -0
- package/.agents/skills/conventional-commits/references/commit-types-scopes.md +75 -0
- package/.agents/skills/conventional-commits/references/semantic-release.md +71 -0
- package/.agents/skills/jest/SKILL.md +219 -0
- package/.agents/skills/jest/references/common-errors.md +274 -0
- package/.agents/skills/jest/references/configuration.md +175 -0
- package/.agents/skills/jest/references/embedded-docs.md +44 -0
- package/.agents/skills/jest/references/mocking.md +206 -0
- package/.agents/skills/jest/references/remote-docs.md +19 -0
- package/.agents/skills/jest/references/snapshot-testing.md +181 -0
- package/.agents/skills/jest/references/transforms.md +216 -0
- package/.agents/skills/maestro/SKILL.md +230 -0
- package/.agents/skills/maestro/references/assertions-commands.md +259 -0
- package/.agents/skills/maestro/references/common-errors.md +273 -0
- package/.agents/skills/maestro/references/eas-ci-integration.md +219 -0
- package/.agents/skills/maestro/references/flow-authoring.md +224 -0
- package/.agents/skills/maestro/references/remote-docs.md +23 -0
- package/.agents/skills/mastra/SKILL.md +159 -0
- package/.agents/skills/mastra/references/common-errors.md +535 -0
- package/.agents/skills/mastra/references/create-mastra.md +220 -0
- package/.agents/skills/mastra/references/embedded-docs.md +123 -0
- package/.agents/skills/mastra/references/migration-guide.md +180 -0
- package/.agents/skills/mastra/references/remote-docs.md +193 -0
- package/.agents/skills/next-js/SKILL.md +209 -0
- package/.agents/skills/next-js/references/api-routes.md +213 -0
- package/.agents/skills/next-js/references/app-router.md +206 -0
- package/.agents/skills/next-js/references/caching-revalidation.md +211 -0
- package/.agents/skills/next-js/references/common-errors.md +251 -0
- package/.agents/skills/next-js/references/embedded-docs.md +43 -0
- package/.agents/skills/next-js/references/metadata-seo.md +257 -0
- package/.agents/skills/next-js/references/remote-docs.md +22 -0
- package/.agents/skills/playwright/SKILL.md +218 -0
- package/.agents/skills/playwright/references/ci-configuration.md +208 -0
- package/.agents/skills/playwright/references/common-errors.md +258 -0
- package/.agents/skills/playwright/references/embedded-docs.md +41 -0
- package/.agents/skills/playwright/references/fixtures-assertions.md +208 -0
- package/.agents/skills/playwright/references/page-objects.md +167 -0
- package/.agents/skills/playwright/references/remote-docs.md +23 -0
- package/.agents/skills/playwright/references/visual-regression.md +206 -0
- package/.agents/skills/pull-request-lifecycle/SKILL.md +116 -0
- package/.agents/skills/pull-request-lifecycle/references/changelog-versioning.md +72 -0
- package/.agents/skills/pull-request-lifecycle/references/merge-strategies.md +33 -0
- package/.agents/skills/pull-request-lifecycle/references/pr-description-template.md +72 -0
- package/.agents/skills/pull-request-lifecycle/references/review-process.md +54 -0
- package/.agents/skills/pull-request-lifecycle/scripts/code_review.py +220 -0
- package/.agents/skills/react-native-expo/SKILL.md +212 -0
- package/.agents/skills/react-native-expo/references/common-errors.md +251 -0
- package/.agents/skills/react-native-expo/references/eas-build-submit.md +238 -0
- package/.agents/skills/react-native-expo/references/embedded-docs.md +42 -0
- package/.agents/skills/react-native-expo/references/native-modules.md +181 -0
- package/.agents/skills/react-native-expo/references/navigation-setup.md +229 -0
- package/.agents/skills/react-native-expo/references/remote-docs.md +23 -0
- package/.agents/skills/supabase/SKILL.md +216 -0
- package/.agents/skills/supabase/references/auth-setup.md +206 -0
- package/.agents/skills/supabase/references/common-errors.md +285 -0
- package/.agents/skills/supabase/references/edge-functions.md +178 -0
- package/.agents/skills/supabase/references/embedded-docs.md +43 -0
- package/.agents/skills/supabase/references/migrations.md +193 -0
- package/.agents/skills/supabase/references/remote-docs.md +24 -0
- package/.agents/skills/supabase/references/rls-policies.md +187 -0
- package/.agents/skills/supabase/references/storage.md +182 -0
- package/.agents/skills/task-breakdown/SKILL.md +179 -0
- package/.agents/skills/task-breakdown/references/acceptance-criteria.md +165 -0
- package/.agents/skills/task-breakdown/references/epic-story-format.md +209 -0
- package/.agents/skills/task-breakdown/references/estimation-guide.md +140 -0
- package/.agents/skills/vitest/SKILL.md +219 -0
- package/.agents/skills/vitest/references/common-errors.md +271 -0
- package/.agents/skills/vitest/references/component-testing.md +182 -0
- package/.agents/skills/vitest/references/configuration.md +184 -0
- package/.agents/skills/vitest/references/coverage.md +179 -0
- package/.agents/skills/vitest/references/embedded-docs.md +43 -0
- package/.agents/skills/vitest/references/mocking.md +182 -0
- package/.agents/skills/vitest/references/remote-docs.md +22 -0
- package/README.md +235 -0
- package/package.json +20 -0
- package/scripts/skills.mjs +849 -0
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maestro
|
|
3
|
+
description: "Maestro mobile testing guide. Covers flow authoring, assertions and commands, EAS CI integration, and common errors. Use this skill when writing or debugging Maestro E2E tests for mobile applications."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
author: Balazs Barta
|
|
7
|
+
version: "2.0.0"
|
|
8
|
+
repository: https://github.com/balazsbarta/mp-skills
|
|
9
|
+
tags:
|
|
10
|
+
- maestro
|
|
11
|
+
- mobile-testing
|
|
12
|
+
- e2e
|
|
13
|
+
- ios
|
|
14
|
+
- android
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Maestro Guide
|
|
18
|
+
|
|
19
|
+
Write end-to-end mobile tests with Maestro.
|
|
20
|
+
|
|
21
|
+
## ⚠️ Critical: Do not trust internal knowledge
|
|
22
|
+
|
|
23
|
+
**Everything you know about Maestro may be outdated or wrong. Never rely on memory. Always verify against current documentation.**
|
|
24
|
+
|
|
25
|
+
Maestro commands, assertions, and CI integrations evolve. Always check the references in this skill for current syntax.
|
|
26
|
+
|
|
27
|
+
## Prerequisites
|
|
28
|
+
|
|
29
|
+
**Before writing tests**, verify Maestro is installed:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
maestro --version
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
If not installed:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# macOS
|
|
39
|
+
curl -Ls "https://get.maestro.mobile.dev" | bash
|
|
40
|
+
|
|
41
|
+
# Or via Homebrew
|
|
42
|
+
brew tap mobile-dev-inc/tap
|
|
43
|
+
brew install maestro
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Ensure a simulator/emulator is running:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# iOS simulator
|
|
50
|
+
xcrun simctl list devices | grep Booted
|
|
51
|
+
|
|
52
|
+
# Android emulator
|
|
53
|
+
adb devices
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Documentation lookup guide
|
|
57
|
+
|
|
58
|
+
### Quick reference
|
|
59
|
+
|
|
60
|
+
| User Question | First Check | How To |
|
|
61
|
+
| --- | --- | --- |
|
|
62
|
+
| "How do I write a test flow?" | [`references/flow-authoring.md`](references/flow-authoring.md) | YAML syntax, tap/scroll/input commands |
|
|
63
|
+
| "What assertions are available?" | [`references/assertions-commands.md`](references/assertions-commands.md) | Visibility, text, and state assertions |
|
|
64
|
+
| "How do I run in CI with EAS?" | [`references/eas-ci-integration.md`](references/eas-ci-integration.md) | EAS Build + Maestro Cloud setup |
|
|
65
|
+
| "I'm getting an error..." | [`references/common-errors.md`](references/common-errors.md) | Common errors and solutions |
|
|
66
|
+
| "I need canonical command syntax" | [`references/remote-docs.md`](references/remote-docs.md) | Verify with official Maestro docs |
|
|
67
|
+
|
|
68
|
+
### Priority order for writing tests
|
|
69
|
+
|
|
70
|
+
1. **Local environment checks first**
|
|
71
|
+
|
|
72
|
+
- Verify CLI version and active device/emulator.
|
|
73
|
+
- Confirm app identifiers in local project config.
|
|
74
|
+
|
|
75
|
+
2. **Local skill references second**
|
|
76
|
+
|
|
77
|
+
- Use flow/assertions/CI/common-errors references in this skill.
|
|
78
|
+
|
|
79
|
+
3. **Official docs third**
|
|
80
|
+
|
|
81
|
+
- Use `references/remote-docs.md` for canonical command behavior.
|
|
82
|
+
|
|
83
|
+
## Core concepts
|
|
84
|
+
|
|
85
|
+
### Flow structure
|
|
86
|
+
|
|
87
|
+
A Maestro flow is a YAML file with sequential commands:
|
|
88
|
+
|
|
89
|
+
```yaml
|
|
90
|
+
# flows/login.yaml
|
|
91
|
+
appId: com.example.myapp
|
|
92
|
+
---
|
|
93
|
+
- launchApp
|
|
94
|
+
- tapOn: "Log in"
|
|
95
|
+
- tapOn: "Email"
|
|
96
|
+
- inputText: "user@example.com"
|
|
97
|
+
- tapOn: "Password"
|
|
98
|
+
- inputText: "password123"
|
|
99
|
+
- tapOn: "Submit"
|
|
100
|
+
- assertVisible: "Dashboard"
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Key commands
|
|
104
|
+
|
|
105
|
+
| Command | Purpose | Example |
|
|
106
|
+
| --- | --- | --- |
|
|
107
|
+
| `tapOn` | Tap an element | `tapOn: "Submit"` |
|
|
108
|
+
| `inputText` | Type text | `inputText: "hello"` |
|
|
109
|
+
| `assertVisible` | Assert element visible | `assertVisible: "Welcome"` |
|
|
110
|
+
| `assertNotVisible` | Assert element hidden | `assertNotVisible: "Loading"` |
|
|
111
|
+
| `scrollUntilVisible` | Scroll to find element | `scrollUntilVisible: { element: "Item 50" }` |
|
|
112
|
+
| `swipe` | Swipe gesture | `swipe: { direction: "LEFT" }` |
|
|
113
|
+
| `back` | Press back button | `back` |
|
|
114
|
+
| `waitForAnimationToEnd` | Wait for animations | `waitForAnimationToEnd` |
|
|
115
|
+
|
|
116
|
+
### Element selection
|
|
117
|
+
|
|
118
|
+
Maestro finds elements by:
|
|
119
|
+
1. **Text content** — `tapOn: "Submit"` matches visible text
|
|
120
|
+
2. **Accessibility ID** — `tapOn: { id: "submit-button" }` matches `testID`/`accessibilityIdentifier`
|
|
121
|
+
3. **Index** — `tapOn: { text: "Item", index: 0 }` for multiple matches
|
|
122
|
+
|
|
123
|
+
## Critical requirements
|
|
124
|
+
|
|
125
|
+
### Set testID on elements
|
|
126
|
+
|
|
127
|
+
For reliable tests, add `testID` to interactive elements:
|
|
128
|
+
|
|
129
|
+
```tsx
|
|
130
|
+
// React Native
|
|
131
|
+
<TouchableOpacity testID="submit-button">
|
|
132
|
+
<Text>Submit</Text>
|
|
133
|
+
</TouchableOpacity>
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### appId must match
|
|
137
|
+
|
|
138
|
+
The `appId` in the flow must match the app's bundle identifier:
|
|
139
|
+
- iOS: `bundleIdentifier` in `app.json`
|
|
140
|
+
- Android: `package` in `app.json`
|
|
141
|
+
|
|
142
|
+
## When you see errors
|
|
143
|
+
|
|
144
|
+
**Most Maestro failures are selector/device/app-id mismatches.**
|
|
145
|
+
|
|
146
|
+
1. Verify `appId` and running device state.
|
|
147
|
+
2. Prefer stable selectors (`id`) over text where possible.
|
|
148
|
+
3. Confirm command syntax in `references/remote-docs.md`.
|
|
149
|
+
|
|
150
|
+
## Step-by-step workflow
|
|
151
|
+
|
|
152
|
+
### 1. Create flows directory
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
mkdir -p .maestro/flows
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### 2. Write a flow
|
|
159
|
+
|
|
160
|
+
```yaml
|
|
161
|
+
# .maestro/flows/login.yaml
|
|
162
|
+
appId: com.example.myapp
|
|
163
|
+
---
|
|
164
|
+
- launchApp
|
|
165
|
+
- tapOn: "Log in"
|
|
166
|
+
- tapOn: { id: "email-input" }
|
|
167
|
+
- inputText: "user@example.com"
|
|
168
|
+
- tapOn: { id: "password-input" }
|
|
169
|
+
- inputText: "password123"
|
|
170
|
+
- tapOn: { id: "submit-button" }
|
|
171
|
+
- assertVisible: "Dashboard"
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### 3. Run the flow
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
maestro test .maestro/flows/login.yaml
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### 4. Run all flows
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
maestro test .maestro/flows/
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### 5. Record (interactive mode)
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
maestro studio
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
## Error handling
|
|
193
|
+
|
|
194
|
+
### Common issues
|
|
195
|
+
|
|
196
|
+
| Symptom | Likely Cause | Fix |
|
|
197
|
+
| --- | --- | --- |
|
|
198
|
+
| "Element not found" | Wrong text or testID | Use `maestro studio` to inspect elements |
|
|
199
|
+
| "App not installed" | Wrong appId or app not on device | Check `appId`, install app first |
|
|
200
|
+
| "Timeout" | Element takes too long to appear | Add `waitForAnimationToEnd` or increase timeout |
|
|
201
|
+
| "No device found" | No simulator/emulator running | Start a simulator or connect a device |
|
|
202
|
+
|
|
203
|
+
## Expected outputs
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
# Successful test run
|
|
207
|
+
Running flow: login.yaml
|
|
208
|
+
✓ launchApp
|
|
209
|
+
✓ tapOn: "Log in"
|
|
210
|
+
✓ tapOn: { id: "email-input" }
|
|
211
|
+
✓ inputText: "user@example.com"
|
|
212
|
+
✓ tapOn: { id: "password-input" }
|
|
213
|
+
✓ inputText: "password123"
|
|
214
|
+
✓ tapOn: { id: "submit-button" }
|
|
215
|
+
✓ assertVisible: "Dashboard"
|
|
216
|
+
|
|
217
|
+
Flow completed successfully
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
## Cross-references
|
|
221
|
+
|
|
222
|
+
- **React Native Expo**: [../react-native-expo/SKILL.md](../react-native-expo/SKILL.md) — Building the mobile apps that Maestro tests
|
|
223
|
+
|
|
224
|
+
## Resources
|
|
225
|
+
|
|
226
|
+
- **Flow authoring**: [`references/flow-authoring.md`](references/flow-authoring.md)
|
|
227
|
+
- **Assertions and commands**: [`references/assertions-commands.md`](references/assertions-commands.md)
|
|
228
|
+
- **EAS CI integration**: [`references/eas-ci-integration.md`](references/eas-ci-integration.md)
|
|
229
|
+
- **Common errors**: [`references/common-errors.md`](references/common-errors.md)
|
|
230
|
+
- **Official docs lookup**: [`references/remote-docs.md`](references/remote-docs.md)
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
# Assertions and Commands
|
|
2
|
+
|
|
3
|
+
Complete reference for Maestro assertions and commands.
|
|
4
|
+
|
|
5
|
+
## When to use this reference
|
|
6
|
+
|
|
7
|
+
- Looking up available assertion types
|
|
8
|
+
- Understanding command syntax
|
|
9
|
+
- Combining assertions for complex validations
|
|
10
|
+
|
|
11
|
+
## Visibility assertions
|
|
12
|
+
|
|
13
|
+
### Assert element is visible
|
|
14
|
+
|
|
15
|
+
```yaml
|
|
16
|
+
- assertVisible: "Welcome"
|
|
17
|
+
- assertVisible: { id: "header" }
|
|
18
|
+
- assertVisible:
|
|
19
|
+
text: "Welcome"
|
|
20
|
+
enabled: true
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Assert element is NOT visible
|
|
24
|
+
|
|
25
|
+
```yaml
|
|
26
|
+
- assertNotVisible: "Loading"
|
|
27
|
+
- assertNotVisible: { id: "spinner" }
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Wait until visible
|
|
31
|
+
|
|
32
|
+
```yaml
|
|
33
|
+
- extendedWaitUntil:
|
|
34
|
+
visible: "Dashboard"
|
|
35
|
+
timeout: 10000
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Wait until NOT visible
|
|
39
|
+
|
|
40
|
+
```yaml
|
|
41
|
+
- extendedWaitUntil:
|
|
42
|
+
notVisible: "Loading..."
|
|
43
|
+
timeout: 10000
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Text assertions
|
|
47
|
+
|
|
48
|
+
### Assert contains text
|
|
49
|
+
|
|
50
|
+
```yaml
|
|
51
|
+
- assertVisible: "Welcome, Alice"
|
|
52
|
+
|
|
53
|
+
# Regex match
|
|
54
|
+
- assertVisible: "Welcome, .*"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Assert text in specific element
|
|
58
|
+
|
|
59
|
+
```yaml
|
|
60
|
+
- assertVisible:
|
|
61
|
+
id: "balance-display"
|
|
62
|
+
text: "$100.00"
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## State assertions
|
|
66
|
+
|
|
67
|
+
### Element is enabled/disabled
|
|
68
|
+
|
|
69
|
+
```yaml
|
|
70
|
+
- assertVisible:
|
|
71
|
+
text: "Submit"
|
|
72
|
+
enabled: true
|
|
73
|
+
|
|
74
|
+
- assertVisible:
|
|
75
|
+
text: "Submit"
|
|
76
|
+
enabled: false
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Element is checked (checkboxes)
|
|
80
|
+
|
|
81
|
+
```yaml
|
|
82
|
+
- assertVisible:
|
|
83
|
+
id: "agree-checkbox"
|
|
84
|
+
checked: true
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Element is selected
|
|
88
|
+
|
|
89
|
+
```yaml
|
|
90
|
+
- assertVisible:
|
|
91
|
+
id: "tab-home"
|
|
92
|
+
selected: true
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Tap commands
|
|
96
|
+
|
|
97
|
+
### Simple tap
|
|
98
|
+
|
|
99
|
+
```yaml
|
|
100
|
+
- tapOn: "Button Text"
|
|
101
|
+
- tapOn: { id: "my-button" }
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Tap with options
|
|
105
|
+
|
|
106
|
+
```yaml
|
|
107
|
+
- tapOn:
|
|
108
|
+
text: "Submit"
|
|
109
|
+
retryTapIfNoChange: true # Retry if screen doesn't change
|
|
110
|
+
longPress: true # Long press
|
|
111
|
+
|
|
112
|
+
- tapOn:
|
|
113
|
+
point: "50%, 80%" # Tap by coordinates (percentage)
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Double tap
|
|
117
|
+
|
|
118
|
+
```yaml
|
|
119
|
+
- doubleTapOn: "Image"
|
|
120
|
+
- doubleTapOn: { id: "zoomable-image" }
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Scroll commands
|
|
124
|
+
|
|
125
|
+
### Basic scroll
|
|
126
|
+
|
|
127
|
+
```yaml
|
|
128
|
+
- scroll # Scroll down (default)
|
|
129
|
+
- scroll:
|
|
130
|
+
direction: "UP"
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Scroll until visible
|
|
134
|
+
|
|
135
|
+
```yaml
|
|
136
|
+
- scrollUntilVisible:
|
|
137
|
+
element: "Load More"
|
|
138
|
+
direction: "DOWN"
|
|
139
|
+
timeout: 30000
|
|
140
|
+
speed: 40 # Scroll speed (0-100)
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Swipe commands
|
|
144
|
+
|
|
145
|
+
```yaml
|
|
146
|
+
# Directional swipe
|
|
147
|
+
- swipe:
|
|
148
|
+
direction: "LEFT"
|
|
149
|
+
duration: 500
|
|
150
|
+
|
|
151
|
+
# Coordinate-based swipe
|
|
152
|
+
- swipe:
|
|
153
|
+
start: "90%, 50%"
|
|
154
|
+
end: "10%, 50%"
|
|
155
|
+
duration: 500
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## Input commands
|
|
159
|
+
|
|
160
|
+
```yaml
|
|
161
|
+
- inputText: "Hello World"
|
|
162
|
+
- clearText
|
|
163
|
+
- clearText: { id: "search-input" }
|
|
164
|
+
- pressKey: "Enter"
|
|
165
|
+
- pressKey: "Backspace"
|
|
166
|
+
- hideKeyboard
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## Navigation commands
|
|
170
|
+
|
|
171
|
+
```yaml
|
|
172
|
+
- launchApp
|
|
173
|
+
- launchApp:
|
|
174
|
+
clearState: true
|
|
175
|
+
clearKeychain: true
|
|
176
|
+
|
|
177
|
+
- stopApp
|
|
178
|
+
- stopApp: { appId: "com.example.myapp" }
|
|
179
|
+
|
|
180
|
+
- back # System back button
|
|
181
|
+
- openLink: "myapp://profile" # Deep link
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
## Wait commands
|
|
185
|
+
|
|
186
|
+
```yaml
|
|
187
|
+
- waitForAnimationToEnd
|
|
188
|
+
- waitForAnimationToEnd:
|
|
189
|
+
timeout: 5000
|
|
190
|
+
|
|
191
|
+
- extendedWaitUntil:
|
|
192
|
+
visible: "Content"
|
|
193
|
+
timeout: 15000
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## Screenshot and recording
|
|
197
|
+
|
|
198
|
+
```yaml
|
|
199
|
+
- takeScreenshot: "step-name"
|
|
200
|
+
# Output: .maestro/screenshots/step-name.png
|
|
201
|
+
|
|
202
|
+
- startRecording: "test-recording"
|
|
203
|
+
# ... commands ...
|
|
204
|
+
- stopRecording
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## Device commands
|
|
208
|
+
|
|
209
|
+
```yaml
|
|
210
|
+
# Set location (simulator only)
|
|
211
|
+
- setLocation:
|
|
212
|
+
latitude: 37.7749
|
|
213
|
+
longitude: -122.4194
|
|
214
|
+
|
|
215
|
+
# Toggle airplane mode (Android only)
|
|
216
|
+
- toggleAirplaneMode
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
## Conditional execution
|
|
220
|
+
|
|
221
|
+
```yaml
|
|
222
|
+
- runFlow:
|
|
223
|
+
when:
|
|
224
|
+
visible: "Accept Cookies"
|
|
225
|
+
commands:
|
|
226
|
+
- tapOn: "Accept"
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
## Repeat
|
|
230
|
+
|
|
231
|
+
```yaml
|
|
232
|
+
- repeat:
|
|
233
|
+
times: 5
|
|
234
|
+
commands:
|
|
235
|
+
- tapOn: "Next"
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
## Assertion command summary
|
|
239
|
+
|
|
240
|
+
| Command | Purpose |
|
|
241
|
+
| --- | --- |
|
|
242
|
+
| `assertVisible` | Element is on screen |
|
|
243
|
+
| `assertNotVisible` | Element is not on screen |
|
|
244
|
+
| `extendedWaitUntil` | Wait for visibility/invisibility |
|
|
245
|
+
| `assertTrue` | Custom JavaScript condition |
|
|
246
|
+
|
|
247
|
+
## Troubleshooting
|
|
248
|
+
|
|
249
|
+
### Assertion timing out
|
|
250
|
+
|
|
251
|
+
- Add `waitForAnimationToEnd` before assertion
|
|
252
|
+
- Increase timeout: `timeout: 30000`
|
|
253
|
+
- Use `maestro studio` to verify element is actually visible
|
|
254
|
+
|
|
255
|
+
### Wrong element matched
|
|
256
|
+
|
|
257
|
+
- Use `id` selector for precision
|
|
258
|
+
- Add `index` for multiple matches
|
|
259
|
+
- Use `below`/`above` for relative positioning
|