close
Skip to content

Ensure complete e2e testing for client side media #74367

@adamsilverstein

Description

@adamsilverstein

What problem does this address?

Add comprehensive E2E tests covering all upload scenarios, format conversions, and error conditions.

See the media-experiments plugin's test coverage for inspiration: https://github.com/swissspidy/media-experiments/tree/main/tests/e2e.

Acceptance Criteria:

  • Tests for basic image upload with compression
  • Tests for sub-size generation
  • Tests for uploading multiple images
  • Tests for error scenarios and fallbacks
  • Tests for different browser capabilities
  • Performance regression tests - set and record processing benchmark and add to existing performance dashboard
  • Test all supported mime types, format conversion
  • Test special handling for transparencies, rotated images, oversized images

Skipped tests (client-side media processing disabled)

The following E2E test suites currently disable client-side media processing via the gutenberg-test-plugin-disable-client-side-media-processing plugin.

Document-Isolation-Policy (DIP) agent cluster mismatch (6 test suites)

Test Suite File
Unsynced pattern test/e2e/specs/editor/various/patterns.spec.js:6
Synced pattern test/e2e/specs/editor/various/patterns.spec.js:608
Preview with Custom Fields test/e2e/specs/editor/various/preview.spec.js:260
Post Editor Template Mode test/e2e/specs/editor/various/post-editor-template-mode.spec.js:25
Template Revert test/e2e/specs/site-editor/template-revert.spec.js:17
Site Editor URL Navigation test/e2e/specs/site-editor/site-editor-url-navigation.spec.js:9

Reason: Client-side media processing enables the Document-Isolation-Policy header, which places the editor in its own browser agent cluster. When tests navigate to pages that don't have this header (previews, pattern editing reloads, template operations, site editor navigations), the agent cluster mismatch breaks cross-window/cross-page communication.

Metadata

Metadata

Type

No fields configured for Task.

Projects

Status
✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions