Repository navigation
test: check the import map on a server-rendered Flex page - #53
Merged
Merged
Conversation
An SSR page prints one import map, ahead of every module, carrying the experience's imports and integrity, and the embed hydrates.
✅ WordPress Plugin Check Report
📊 ReportAll checks passed! No errors or warnings found. 🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check |
Fail when the manifest has no imports or hashes to check, name the module tags that come before the map, and fail clearly on a bad manifest response.
domiebett
marked this pull request as ready for review
October 22, 2026 16:30
Moves the check out of flex-and-ssr.spec.ts into flex-ssr-import-map.spec.ts, with the manifest read and the map assertions as helpers beside the other embed checks. The hydration wait gets the medium timeout, since the runtime loads from the Ceros CDN.
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.
Adds an e2e check that a server-rendered Flex page prints one well-formed import map, ahead of every module, and that the embed hydrates. Until now only the import-map helpers had PHP unit tests; nothing checked the rendered page.
What changed
Flex SSR published pageinflex-and-ssr.spec.ts, run as a logged-out reader on a published post with a Flex SSR block. It checks that:data-flex-ready) with no page errors. This experience does not load a mapped module while hydrating, so this does not show that the map resolves.PublishedPostPagegainsimportMaps,importMap()andmodulesBeforeImportMap();FlexRendergainsssrHydrated.Running
latest: the new test passes 3/3, and the Flex published render tests pass.wp_head, so the footer hoist used for classic themes is not exercised here.