test: repair the extension-tests suite broken by the test/ rename - #135
Merged
Merged
Conversation
#119 renamed test/ to extension-tests/ (and flattened test/helpers/ into extension-tests/) but left several things pointing at the old layout: package.json's test script still globbed test/*.test.js (so npm test silently ran zero tests, in CI too), latest-alias.test.js / next-alias.test.js / static-files.test.js still required ./helpers/latest-versions, and latest-versions.js itself still walked up two directories to find content/ instead of one. Net effect: most of this suite has been dead since #119, always green because nothing ran. Signed-off-by: Lukas Hirt <info@hirt.cz>
Restoring npm test above turned this test back on, which surfaces it: content/ocis/8.0 has a page-aliases entry but isn't in site.yml's ocis source list (only 8.1-8.3 render; site.yml's own comment says an unnamed version folder "could safely be deleted if outdated"). The test walks the whole content/ tree, so it flagged that stale, never- published version as a dangling alias. Skip versions this build doesn't publish, matching the builtOrSkip pattern the rest of the suite already uses; verified it still fails when a real published stub (8.1) is removed. Signed-off-by: Lukas Hirt <info@hirt.cz>
LukasHirt
force-pushed
the
fix/extension-tests-suite
branch
from
September 17, 2026 18:05
67b61c2 to
7bf3ff6
Compare
LukasHirt
added this pull request to stack #136
September 17, 2026 18:07
3 tasks
LukasHirt
removed this pull request from stack #136
September 17, 2026 18:07
oc-tmueller
previously approved these changes
Sep 18, 2026
oc-tmueller
added this pull request to stack #139
September 18, 2026 13:53
oc-tmueller
removed this pull request from stack #139
September 18, 2026 13:56
* feat: re-add mediumzoom as a tracked npm dependency The previous vendored copy of medium-zoom.min.js was reverted (#131) for missing dependency management. Install medium-zoom via npm so it is tracked in package.json/package-lock.json (and covered by Dependabot), and copy its prebuilt browser bundle into ui/supplemental/js/vendor/ via a preantora/preantora-local script, since the site has no client-side bundler of its own. Signed-off-by: Lukas Hirt <info@hirt.cz> * refactor: make sync-vendor-assets.js data-driven Replace the two hardcoded copyFileSync calls with a VENDOR_FILES list, so vendoring another package's browser build later means adding an entry instead of writing a new script. Signed-off-by: Lukas Hirt <info@hirt.cz> * fix: address review on the medium-zoom vendoring approach - Add a build-output guard (extension-tests/static-files.test.js) that fails loudly if ui/supplemental/js/vendor/ wasn't repopulated before the build (e.g. npx antora run directly, bypassing the preantora hook): today it publishes green with a 404'ing <script> and image zoom silently dead site-wide. - Make scripts/sync-vendor-assets.js wipe js/vendor/ before repopulating it, so dropping an entry from VENDOR_FILES actually removes the stale file instead of leaving it on disk in any checkout that already had it. - Narrow the CSS z-index selector to img.medium-zoom-image--opened (the class only the currently-zoomed clone gets) instead of the bare medium-zoom-image class, which stays on every bound image for as long as it's attached and would promote them all to z-index 1000 the moment anything positions a doc image. - Add `body >` to the overlay selector so our rule outranks the library's own .medium-zoom-overlay by specificity rather than by injection order, in case a future medium-zoom release adds its own z-index there. - Document scripts/ and the generated ui/supplemental/js/vendor/ in README.md's layout tree. Signed-off-by: Lukas Hirt <info@hirt.cz> --------- Signed-off-by: Lukas Hirt <info@hirt.cz>
oc-tmueller
approved these changes
Sep 18, 2026
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.
Summary
test/toextension-tests/(and flattenedtest/helpers/into it) but left several things pointing at the old layout, so most of this suite has been silently dead ever since — always green because nothing ran:package.json'stestscript still globbedtest/*.test.js(matches nothing) →npm testran zero tests, in CI too.latest-alias.test.js,next-alias.test.js,static-files.test.jsstillrequire('./helpers/latest-versions'), which no longer exists.latest-versions.jsitself still walked up two directories to findcontent/instead of one, so even a corrected require crashed withENOENT.page-aliases.test.jswalks the entirecontent/tree for:page-aliases:entries, includingcontent/ocis/8.0/, which is on disk but not insite.yml's ocis source list (only 8.1-8.3 render —site.yml's own comment says an unlisted version folder "could safely be deleted if outdated"). The test flagged that stale, never-published version as a dangling alias. Now it skips versions this build doesn't publish, matching thebuiltOrSkippattern already used elsewhere in this suite.test/path reference inAGENTS.md.Found and fixed while working on #133 (the medium-zoom PR needed the suite to actually run for a new guard test to mean anything), split out here since it's unrelated to that feature.
Test plan
npm run antora && npm test: 51 tests run (up from 0), 50 pass, 1 skip, 0 fail.