Tests: Re-enable CSM e2e suite on Chromium 148+ and align expectations#28
Tests: Re-enable CSM e2e suite on Chromium 148+ and align expectations#28adamsilverstein wants to merge 1 commit into
Conversation
Re-enable the client-side media processing e2e suite on Chromium 148+ (drop the skip gate added for the Playwright/Chrome upgrade) and correct the test expectations that were exposed when CSM first became active in CI. There is no Chromium 148 or wasm-vips regression: an isolation harness on real Chrome 149 runs every wasm-vips op (rotate, thumbnail, format convert) successfully across main-thread, Web Worker, COOP/COEP, Document-Isolation- Policy `isolate-and-credentialless`, and ArrayBuffer-transfer contexts. The suite simply never ran in CI before (Chrome < 148 has no cross-origin isolation, so CSM stayed inactive and the tests skipped), so several assertions that never matched real CSM behavior were never caught. Corrections: - Resolve `wasm-vips` via `@wordpress/vips` so the UltraHDR probe import works in a clean CI install where the dependency is not hoisted to the root. - PNG-to-JPEG / JPEG-to-WebP: `image_editor_output_format` governs only the generated sub-sizes; the full-size attachment keeps its original MIME type, matching core. Assert the sub-size MIME/URL instead of the main file. - srcset: capture the attachment ID while the editor data store is still loaded (before navigating to the front end) and assert the block settles on a finalized uploaded URL rather than a transient blob URL. EXIF orientation handling is intentionally left as `test.fixme` here; the client-side EXIF sub-size rotation fix and its coverage land separately in PR WordPress#79384.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Size Change: 0 B Total Size: 8.6 MB |
|
closing in favor of WordPress#79385 |
What
Stacked on #79342 (the preview-interstitial DIP fix). Re-enables the client-side media processing (CSM) e2e suite on Chromium 148+ and fixes the non-EXIF test failures that surfaced once CSM became active in CI.
WordPress#79342 currently keeps these tests skipped on Chromium 148+ so its CI is green while scoped to the preview fix. This PR is the follow-up that actually un-skips the suite and corrects the assertions.
Why
There is no Chromium 148 or wasm-vips regression. An isolation harness on real Chrome 149 runs every wasm-vips op (rotate → 768×1024, thumbnail, JPEG→WebP, PNG→JPEG) successfully across main-thread, nested Web Worker, COOP/COEP, Document-Isolation-Policy
isolate-and-credentialless, and ArrayBuffer-transfer-into-worker contexts.The CSM suite simply never ran in CI before: Chrome < 148 does not enable cross-origin isolation, so CSM stayed inactive and these tests skipped. The Playwright/Chrome 148 upgrade (#78632) switched CSM on in CI for the first time, exposing assertions that never matched real CSM behavior.
Fixes
wasm-vipsvia@wordpress/vipsso the dynamic import works in a clean CI install where the dependency is not hoisted to the repo root.image_editor_output_formatgoverns only the generated sub-sizes; the full-size attachment keeps its original MIME type (matching core, which does not changepost_mime_typefor sub-threshold images). Assert the sub-size MIME/URL instead of the main file.window.wp.datadoes not exist) and assert the block settles on a finalized uploaded URL rather than a transientblob:URL.Out of scope
EXIF orientation handling is intentionally left as
test.fixmehere. The client-side EXIF sub-size rotation fix (for AVIF/HEIF whose orientation lives in an EXIF tag rather than a nativeirottransform) and its e2e coverage land separately in #79384 / #79383.The preload and performance specs remain skipped on Chromium 148+; their editor-startup
networkidletimeout under cross-origin isolation is a separate, not-yet-root-caused issue.Validation
Validated on the combined branch (#79381): the CSM suite passes on Chromium 148 with these expectations. The only e2e failures in that run were pre-existing flakes unrelated to CSM (
image.spec.js › should upload external image to media library, a network-dependent external download that bypasses CSM; and aneditor-collaborationcomment-size test).