Repository navigation
test(e2e): cover CLI, config, runtime, plugin lifecycle, app and dev-server flows - #858
Open
chetan2002 wants to merge 2 commits into
Open
chetan2002 wants to merge 2 commits into
chetan2002 wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
added 2 commits
November 30, 2026 13:24
…t rollback/update side effects - e2e: load every command of every bundled plugin, round-trip certificate generate/fingerprint/verify and config set/get/delete offline with an isolated config file - run e2e on pull requests across Node 20.17.0 (engines minimum), 22.x and 24.x - unit: assert the exact plugins:install/uninstall calls for rollback and update, including declined and accepted confirmation prompts
…server flows Add e2e suites that run the real bin/run in an isolated home, config, data and cache directory, with no Adobe login: - cli: version, help and the rt alias, unknown commands, aio info, telemetry, update notice, autocomplete and bash completion - config: global/local precedence, .env and env overrides, where, console where and auth ctx - runtime: rt property set/get/unset and the no-credentials error - plugins: link/install/run/help/completion/rollback/uninstall of a fixture plugin - app: app init per linter, app info, add/delete ci, delete action, build, pack and the local dev server - network: discover and update --list against the npm registry load-commands.js now also renders help for every command. The e2e script runs e2e/e2e.js and every e2e/*.e2e.js file.
chetan2002
force-pushed
the
e2e-command-coverage
branch
from
November 30, 2026 08:00
8cb9c91 to
422053e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Depends on #857. Until #857 merges, this diff also shows its commit. Review only the last commit.
Adds 35 e2e tests (40 in total, up from 5). They run the real
bin/runwith a temporary home, config, data and cache directory, ignoreAIO_*/WSK_*variables from the shell, and need no Adobe login.cli.e2e.js--version/-v, help, thertalias, unknown commands,aio info, telemetry off/on, the update notice, autocomplete and bash completionconfig.e2e.js.envand env var overrides,config list/set --file,aio where,aio console where,aio auth ctxruntime.e2e.jsrt propertyset/get/unset, the no-credentials errorplugins.e2e.jsrollbackand uninstall of a fixture pluginapp.e2e.jsapp initper linter,app info,app add/delete ci,app delete action,app build(runs the built zip),app pack(excludes.aioand.env),app dev(HTTP 200/404, hot reload, Ctrl+C)network.e2e.jsdiscover(filter and sort) andupdate --listagainst the npm registryload-commands.jsnow also renders help for all 213 bundled commands.npm run e2enow runse2e/e2e.jsand everye2e/*.e2e.jsfile.CONTRIBUTING.mdlists the suites.Related Issue
No issue. Follow-up to #857.
Motivation and Context
Before this PR, e2e did not run
aio info,help, autocomplete,plugins install,rollback,app build,app packorapp dev. A dependency update that broke any of them would not have failed CI.Found while writing the tests. These are upstream plugin bugs, not fixed here:
aio-cli-plugin-runtime8.5.0:rt property setfails withproperties.set is not a functionwhen~/.wskpropsdoes not exist. The test creates the file first.aio-cli-plugin-runtime8.5.0:rt property set --apihost <url>fails withUnexpected argument, because--apihostis a boolean flag.aio-cli-plugin-app14.10.0:app delete action my.app/genericdeletes the code but leaves theapp.config.yamlentry when the package name contains a dot.How Has This Been Tested?
npm run e2e -- --ci --runInBandon Node 20.17.0, 22.23.4, 24.22.3 (macOS)app devtest run 5 times in a rowWSK_CONFIG_FILEpointing at another.wskpropsapp devrequestslocalhost; certificate checks are never turned offsandbox-exec)network.e2e.jstests and the existingcli init testfailed, as expectednpm test(Node 22)Mutation checks. Each change was applied, the suite was run, and the code was restored. Every mutation was caught:
rtalias fromsrc/custom-help.jsformatCommandreturns an empty stringsrc/index.jsrollbackselectslinkplugins instead ofuserrollbackskips the uninstalldiscoversort orderapp devcertificate not issued tolocalhostapp devtest (hostname check fails)Screenshots (if appropriate):
N/A
Types of changes
Test changes only. Runtime code is unchanged.
Checklist: