github qawolf/cli v1.13.0

17 hours ago

Minor Changes

  • 2def6d5: Map nested contract inputs to CLI flags.

    A generated command now derives one flag for each leaf of a nested object, for example --metadata-commit-sha for metadata.commitSha. The command reassembles the flag values into the nested input before it validates and sends the request.

    A union of object branches no longer requires a shared literal discriminator. A field that every branch requires stays a required flag. The other fields become optional flags. The contract validates the assembled input locally before the CLI sends a request. Branches that are strict objects reject an invocation that mixes branches.

    The command build fails with a clear error when two fields produce the same flag name, or when union branches disagree on the schema of a shared field.

  • 3dec60a: The qawolf runner group speaks @qawolf/api-contracts 0.27.0, gains four commands, and ships a run's files by walking the flow's imports instead of reading the whole directory.

    qawolf runner run now sends the flow file, everything it imports, and your package.json and tsconfig.json. Nothing else travels. Before this change it read every runnable file under the working directory, so on a project of a few thousand files it built a payload the platform refused on size and the run never started; you had to run from a directory holding the flow and little else. Imports are followed the way a run from the QA Wolf app follows them, including its limits: relative paths and tsconfig.json aliases, resolving .ts and .js, and not following export ... from or require().

    After the first run on a runner, later runs send only the files whose content changed. The baseline lives in .qawolf/runner-files.json. A switch to another runner ignores it, a runner that turns out not to hold what was claimed gets the whole set resent, and --json reports which happened as fileSync.

    qawolf runner run --lines 12-40 runs those lines against the browser as it stands, so you can iterate on one step without paying for the whole flow to reach it again. --lines-file says where the range lives when it is not the flow file, and the positional is now <flowFile> in the usage line because two file paths with one unlabelled is easy to get backwards. --env-file gives the run environment variables from a dotenv file, in the format qawolf flows pull writes.

    qawolf runner inspect reads one thing off the live page and prints it on stdout by itself: element-html --selector, page-html, or variable --name, which is a shorter path to a value than printing it from a snippet and reading it back out of the console stream. qawolf runner stop-run stops what a runner is executing and leaves the runner up. qawolf runner import-package installs a package into a live run so a snippet or a selection can import it without a full run to reinstall dependencies.

    Two breaking changes to the runner group. qawolf runner stop is now qawolf runner terminate, which better separates ending a runner from stopping a run on one. And --name takes a runner family, playwright, android, ios or basic, in place of an image name like node20WithPlaywright. Every runner verb also reports a failure as an outcome of failure with a failureReason, in place of one outcome per condition, so --json consumers reading outcome for a specific condition need to read failureReason instead.

Patch Changes

  • 7b9e665: The managed runtime can now load expect-webdriverio.

    The runtime installs its packages with --legacy-peer-deps, which does not install peer dependencies. expect-webdriverio needs webdriverio, @wdio/globals and @wdio/logger as peers, and the runtime had none of them. An import of expect-webdriverio stopped with ERR_MODULE_NOT_FOUND. The runtime now installs these three packages.

    This does not yet make expect available in an Android flow. The runner does not start the mobile expect, so a flow that calls expect continues to fail. This change removes one of the two causes.

Don't miss a new cli release

NewReleases is sending notifications on new releases.