@radhya/mach 2.6.11 → 2.6.12

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.
Files changed (3) hide show
  1. package/README.md +28 -1
  2. package/dist/index.js +138 -133
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -67,7 +67,7 @@ mach build --platform web # Flutter projects
67
67
  | `mach audit` | Check project health, delivery impact, and security locally |
68
68
  | `mach agent` | Manage the local device discovery agent for Install Hub |
69
69
  | `mach host` | Set up S3 static hosting and CloudFront |
70
- | `mach web` | Deploy and manage static web releases through Mach Web Hosting |
70
+ | `mach web` | Deploy, test, and manage static web releases through Mach Web Hosting |
71
71
  | `mach sitemap` | Generate sitemap.xml from Expo Router app routes |
72
72
  | `mach deeplink` | Configure and verify universal links and Android App Links |
73
73
 
@@ -182,6 +182,33 @@ always point to Production for now:
182
182
  mach web domain add --domain www.customer.com
183
183
  ```
184
184
 
185
+ ## Local Playwright Web E2E Testing
186
+
187
+ `mach web test` runs Playwright from the current project on the developer's
188
+ machine or the project's existing CI runner. It never starts a Mach browser
189
+ runner, creates a billable test run, uploads test source or artifacts, or sends
190
+ environment variables to Mach. Browser CPU time, reports, screenshots, and
191
+ traces stay local.
192
+
193
+ Install Playwright as a project development dependency once, then install only
194
+ the browser you intend to test first (Chromium is the recommended default):
195
+
196
+ ```bash
197
+ npm install --save-dev @playwright/test
198
+ npx playwright install chromium
199
+
200
+ # Mach runs the project's existing Playwright configuration locally.
201
+ mach web test
202
+ mach web test --project chromium --trace on-first-retry
203
+ mach web test --base-url https://staging.example.com
204
+ ```
205
+
206
+ `--base-url` sets `PLAYWRIGHT_BASE_URL`; use that variable in the project's
207
+ `playwright.config.ts`. For local applications, Playwright's own `webServer`
208
+ setting should start and wait for the project server. Use
209
+ `mach web test --install-browser chromium` only when you deliberately want to
210
+ download a browser on that machine.
211
+
185
212
  ## Managed Maestro Testing
186
213
 
187
214
  Mach's E2E testing layer is being implemented to run Maestro without requiring Maestro Cloud: