create-allwright 0.1.16 → 0.1.18
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 +16 -0
- package/dist/index.js +5 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,4 +20,20 @@ The initializer prompts for:
|
|
|
20
20
|
|
|
21
21
|
It scaffolds a Node project with `package.json`, Vitest config, shared allwright config, starter tests, and a short README for the generated app.
|
|
22
22
|
|
|
23
|
+
Select Mobile iOS interactively, or scaffold it non-interactively:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm init allwright@latest ios-tests -- --yes --ios
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Use `--all` to scaffold Web, Mobile Android, and Mobile iOS together. The
|
|
30
|
+
repeatable `--surface` flag supports the ids `web`, `mobile-android`, and
|
|
31
|
+
`mobile-ios` for explicit combinations.
|
|
32
|
+
|
|
33
|
+
This writes an `iosApp` starter test and configures the public universal
|
|
34
|
+
Simulator IPA at `https://allwright.dev/Flights-simulator.ipa`. On the first
|
|
35
|
+
test run, core installs the `mobile-ios` plugin and its bundled headless XCTest
|
|
36
|
+
agent, then the fixture downloads and installs the sample app. Users do not
|
|
37
|
+
install either component manually.
|
|
38
|
+
|
|
23
39
|
Dependencies are installed automatically with the package manager that ran the initializer. Existing lockfiles take precedence; use `--package-manager npm|yarn|pnpm|bun` to override detection, or `--no-install` to scaffold without installing.
|
package/dist/index.js
CHANGED
|
@@ -103,6 +103,9 @@ function parseArgs(args) {
|
|
|
103
103
|
case "--both":
|
|
104
104
|
options.surfaces.push("web", "mobile-android");
|
|
105
105
|
break;
|
|
106
|
+
case "--all":
|
|
107
|
+
options.surfaces.push("web", "mobile-android", "mobile-ios");
|
|
108
|
+
break;
|
|
106
109
|
case "--surface": {
|
|
107
110
|
const value = args[index + 1];
|
|
108
111
|
if (!value) {
|
|
@@ -159,7 +162,7 @@ async function selectSurfaces(interactive) {
|
|
|
159
162
|
? "browser automation"
|
|
160
163
|
: surface.value === "mobile-android"
|
|
161
164
|
? "Android app automation"
|
|
162
|
-
: "iOS
|
|
165
|
+
: "iOS app automation",
|
|
163
166
|
})),
|
|
164
167
|
required: true,
|
|
165
168
|
});
|
|
@@ -381,7 +384,7 @@ function generatedReadmeContents(surfaces) {
|
|
|
381
384
|
nextSteps.push(`${step++}. Start an Android emulator or connect a device with USB debugging enabled.`, `${step++}. Confirm it is visible with \`adb devices -l\`.`, `${step++}. The first Android run downloads and installs the Airticket demo app configured in \`allwright.config.yaml\`.`);
|
|
382
385
|
}
|
|
383
386
|
if (hasSurface(surfaces, "mobile-ios")) {
|
|
384
|
-
nextSteps.push(`${step++}. Start an iOS Simulator.`, `${step++}. The first
|
|
387
|
+
nextSteps.push(`${step++}. Start an iOS Simulator, or connect a registered physical device with Developer Mode and UI Automation enabled.`, `${step++}. The first Simulator run downloads and installs the Flights IPA configured in \`allwright.config.yaml\`; physical-device apps must use a signed device build. No manual app or agent installation is needed.`);
|
|
385
388
|
}
|
|
386
389
|
nextSteps.push(`${step}. Run \`npm test\`.`);
|
|
387
390
|
return `# allwright project
|