@mobilewright/test 0.0.30 → 0.0.32
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/README.md +15 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -144,6 +144,7 @@ screen.getByText(/welcome/i) // RegExp match
|
|
|
144
144
|
screen.getByText('welcome', { exact: false }) // substring match
|
|
145
145
|
screen.getByType('TextField') // element type
|
|
146
146
|
screen.getByRole('button', { name: 'Sign In' }) // semantic role + name filter
|
|
147
|
+
screen.getByPlaceholder('Search...') // placeholder text
|
|
147
148
|
```
|
|
148
149
|
|
|
149
150
|
**Direct actions:**
|
|
@@ -168,6 +169,8 @@ await locator.tap()
|
|
|
168
169
|
await locator.doubleTap()
|
|
169
170
|
await locator.longPress({ duration: 1000 })
|
|
170
171
|
await locator.fill('hello@example.com') // tap to focus + type text
|
|
172
|
+
await locator.swipe({ direction: 'left' }) // swipe on a specific element
|
|
173
|
+
await locator.scrollIntoViewIfNeeded() // scroll until element is visible
|
|
171
174
|
```
|
|
172
175
|
|
|
173
176
|
**Queries:**
|
|
@@ -218,7 +221,8 @@ await device.goto('myapp://settings');
|
|
|
218
221
|
await device.openUrl('https://example.com');
|
|
219
222
|
|
|
220
223
|
// App lifecycle
|
|
221
|
-
await device.launchApp('com.example.app', { locale: 'fr_FR' });
|
|
224
|
+
await device.launchApp('com.example.app', { locale: 'fr_FR' }); // waits until app is in foreground
|
|
225
|
+
await device.launchApp('com.example.app', { noWaitAfter: true }); // skip foreground wait
|
|
222
226
|
await device.terminateApp('com.example.app');
|
|
223
227
|
const apps = await device.listApps();
|
|
224
228
|
const foreground = await device.getForegroundApp();
|
|
@@ -390,6 +394,16 @@ Need real phones in the cloud? [mobile-use.com](https://mobile-use.com) gives yo
|
|
|
390
394
|
|
|
391
395
|
mobile-use.com is the only device cloud with native Mobilewright support.
|
|
392
396
|
|
|
397
|
+
## Telemetry
|
|
398
|
+
|
|
399
|
+
Mobilewright collects anonymous usage telemetry via PostHog. To disable it, set the `MOBILEWRIGHT_DISABLE_TELEMETRY` environment variable:
|
|
400
|
+
|
|
401
|
+
```bash
|
|
402
|
+
MOBILEWRIGHT_DISABLE_TELEMETRY=1 npx mobilewright test
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
When telemetry is enabled, a random identifier is generated and stored in `~/.config/mobilenext/mobilewright/config.json`. No personal information or test data is ever collected.
|
|
406
|
+
|
|
393
407
|
## Contributing
|
|
394
408
|
|
|
395
409
|
```bash
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mobilewright/test",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.32",
|
|
4
4
|
"description": "Test fixtures for Mobilewright",
|
|
5
5
|
"homepage": "https://mobilewright.dev",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"dist"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@mobilewright/core": "^0.0.
|
|
33
|
-
"@mobilewright/protocol": "^0.0.
|
|
32
|
+
"@mobilewright/core": "^0.0.32",
|
|
33
|
+
"@mobilewright/protocol": "^0.0.32",
|
|
34
34
|
"@playwright/test": "1.58.2",
|
|
35
35
|
"debug": "^4.4.3",
|
|
36
|
-
"mobilewright": "^0.0.
|
|
36
|
+
"mobilewright": "^0.0.32"
|
|
37
37
|
}
|
|
38
38
|
}
|