{{ message }}
Repository navigation
feat(administration): introduce admin:test-extensions command - #21822
Open
Gerrit Weiermann (gweiermann) wants to merge 13 commits into
Open
Gerrit Weiermann (gweiermann) wants to merge 13 commits into
Gerrit Weiermann (gweiermann) wants to merge 13 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feat/admin-extension-jest-composer-install #21822 +/- ##
==============================================================================
- Coverage 71.81% 71.81% -0.01%
==============================================================================
Files 5983 5985 +2
Lines 219740 219735 -5
Branches 12115 12115
==============================================================================
- Hits 157812 157805 -7
- Misses 58101 58103 +2
Partials 3827 3827
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
An extension that composes the Administration's Jest config still had to call the Administration's Jest binary by path, or install a Jest of the matching major itself. admin:test-extensions (bin/console administration:test-extensions in a Composer install) runs every selected extension's jest.config.* with the Administration's Jest. Selection works like check-extensions, options after a second "--" go to Jest, and a missing component import map is generated first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
admin:test-extensions now skips extensions installed under vendor/ unless --only (or the interactive picker) names them, and lists the skipped ones in its report. A run in which no Jest config ran exits 1, so a CI job cannot pass without running a spec. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…al extensions Jest's --watch and --watchAll never return, so every config after the first would never run. admin:test-extensions now exits 2 with a usage error when watch mode meets no or several Jest configs, and asks to name one extension via --only. A spec path or name filter usually matches in one extension only. When Jest options go to more than one Jest config, the command adds --passWithNoTests unless it is already given, so the run fails only on a failing spec. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…:test-extensions - The report starts with the setup warnings of the selected extensions, as they may explain a failed run. - The interactive picker shows each extension's location and number of Jest configs. - Watch mode on one extension with several Jest configs names those configs instead of asking for --only. - A ts-node that cannot start fails the component import generation with its error. - Composer's process timeout no longer stops admin:test-extensions. - README and RELEASE_INFO keep the regenerate-after-update guidance and say when test-extensions generates the component import map itself. - The specs are split by concern and cover generator failures, the precedence of a fatal diagnostic over watch mode, the picker, the config lookup, the report lines and the CLI help and usage paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d run testExtensions mixed deciding which Jest configs run, deciding whether the selection is fatal and running Jest, guarded by repeated fatalDiagnostics.length === 0 checks. planTestRun and selectionDiagnostic now take the first two steps, and every fatal case returns early. The behaviour does not change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gerrit Weiermann (gweiermann)
force-pushed
the
feat/admin-extension-test-command
branch
from
October 21, 2026 14:48
7a29c23 to
64c626f
Compare
…ensions isWatchRun treated any --watch or --watchAll option as watch mode, so `--watchAll=false` over several extensions failed with the watch usage error. It now follows Jest's parser: the last occurrence of each flag wins, and `--no-<flag>` or a `false` value turns it off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gerrit Weiermann (gweiermann)
marked this pull request as ready for review
October 21, 2026 14:57
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Gerrit Weiermann (gweiermann)
marked this pull request as draft
October 22, 2026 08:13
…dmin-extension-test-command
…dmin-extension-test-command
…ithout a spec - Count the tests of each Jest run through a --json results file and fail the run when no Jest config ran a spec, also when --passWithNoTests was added for several configs; mark an empty config with "–" - Print "▶ <extension> · <config>" before each Jest run - --all and the non-interactive default now test vendor/ extensions too; --no-vendors leaves them out - Leave type-check and lint warnings, and extensions without a Jest config, out of the report Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…epts test-extensions decides watch mode, --passWithNoTests and its own --json results file from the forwarded Jest options. It now reads kebab-case spellings (--watch-all, --pass-with-no-tests, --output-file), --no-<option> and a separate true/false value (--watch false), and builds the Jest options once per run instead of once per config. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…le line The runner counted the specs of each Jest run with --json --outputFile, and Jest then printed "Test results written to: <temp path>" after every run, for a file that was deleted right after. A results processor now writes the counts, so the output shows only what Jest prints for the specs. A caller's own --json or --outputFile no longer turns the counting off; only their own --testResultsProcessor does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ension's own Jest admin:test-extensions ran every Jest config it found on the Administration's Jest. A config that brings its own Jest setup, such as a preset from the extension's node_modules, failed there and turned --all red for a plugin the developer may not maintain. A config on the harness keeps running on the Administration's Jest. Any other config runs on the Jest the extension installs between the config and the extension root. When a package.json there declares Jest that is not installed, the config does not run: the report marks it with ⊘ and names the npm ci or npm install that installs it, and fails the run only when the extension was named via --only or the picker. The picker marks such an extension too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gerrit Weiermann (gweiermann)
marked this pull request as ready for review
October 27, 2026 16:38
Gerrit Weiermann (gweiermann)
requested review from
David Traum (davidtraum) and
Jannis Leifeld (jleifeld)
October 27, 2026 16:39
…dmin-extension-test-command
This branch has not been deployed
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.

1. Why is this change necessary?
Running specs for a plugin using the shared Jest harness is still fidely and not very convenient:
Instead there should be a new command that abstracts that away.
2. How?
Showcase of the new command:
Help
Run a single plugin
www-data@docker /var/www/html $ bin/console administration:test-extensions -- --only UrCatalog ▶ UrCatalog · custom/plugins/UrCatalog/src/Resources/app/administration/jest.config.mjs PASS src/catalog.spec.js PASS src/own-dependency.spec.js Test Suites: 2 passed, 2 total Tests: 2 passed, 2 total Snapshots: 0 total Time: 3.839 s Ran all test suites. ✓ UrCatalog · custom/plugins/UrCatalog/src/Resources/app/administration/jest.config.mjsRun all
3. Decisions
composer admin:test-extensions(bin/console administration:test-extensionsin a Composer install).shopware/jest.config.mjsare excluded (+ a hint how to make it work)to be followed up
--config=<path>for configs outside the discovered folders, e.g. SwagCommercial'stests/jest/administration4. Repro
With a plugin set up as in #21797, whose
jest.config.mjsimports.shopware/jest.mjs:The plugin needs no Jest of its own.
In a Composer install, run
npm cionce invendor/shopware/administration/Resources/app/administration, then usebin/console administration:test-extensionswith the same options.A plugin with its own Jest setup, for example SwagCmsExtensions (Jest 29 with
@shopware-ag/jest-preset-sw6-admin), before itsnpm ci:After that
npm ci, the run prints✓ SwagCmsExtensions · …/jest.config.js (own Jest).5. Please link to the relevant issues (if any).
6. Checklist
RELEASE_INFO-6.<current major line>.mdin the upcoming version section for informational changes: what changed, who is affected, and how to adapt.UPGRADE-6.<next major>.mdfor breaking changes and deprecations: what changed, who is affected, and how to adapt.