Skip to content

test: validate embedded component communication - #32

Merged
Morten Barklund (barklund) merged 5 commits into
mainfrom
validate-embedded-component-communication-dxa-3715
Jul 10, 2026
Merged

test: validate embedded component communication#32
Morten Barklund (barklund) merged 5 commits into
mainfrom
validate-embedded-component-communication-dxa-3715

Conversation

@barklund

Copy link
Copy Markdown
Member

Summary

Adds browser-based integration coverage for the embedded web component communication contract ahead of the 1.0 release.

This validates that host application API calls are sent through the real iframe postMessage boundary, and that embedded responses and events are surfaced back through the public component API and event stream.

Changes

  • Add a Playwright-routed embedded integration frame for browser tests.
  • Add integration tests covering API request delivery, response resolution, and embedded event dispatch.
  • Allow the web test runner to target Chromium, Firefox, WebKit, or an installed Chromium channel such as Microsoft Edge.
  • Add a Windows GitHub Actions job that runs the integration test against Microsoft Edge.
  • Document test commands for the full suite, watch mode, focused integration test, cross-browser run, and Edge-channel run.

Copilot AI review requested due to automatic review settings July 9, 2026 10:06
@linear-code

linear-code Bot commented Jul 9, 2026

Copy link
Copy Markdown

DXA-3715

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds browser-based integration test coverage for the corti-embedded postMessage contract by running the component against a Playwright-routed iframe, plus documentation and CI coverage (including Edge on Windows) ahead of the 1.0 release.

Changes:

  • Extend web-test-runner Playwright setup to support multi-browser runs and to intercept /embedded with an integration test iframe.
  • Add a new browser integration test validating request/response round-trips and embedded event surfacing through the public component API.
  • Document integration test commands and add a Windows GitHub Actions job to run the integration test in the Microsoft Edge channel.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
web-test-runner.config.js Adds multi-browser Playwright configuration and routes the embedded iframe URL to a local integration frame HTML.
test/corti-embedded.integration.test.ts Introduces browser integration tests for iframe postMessage request/response and embedded event forwarding.
README.md Documents how to run the full suite and the new focused/cross-browser integration test commands.
.github/workflows/release.yml Adds a Windows Edge-channel integration test job and wires it into publish prerequisites.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread web-test-runner.config.js
Comment thread test/corti-embedded.integration.test.ts Outdated
Comment thread test/corti-embedded.integration.test.ts

@hriczzoli Zoltan Hricz (hriczzoli) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great!

@barklund
Morten Barklund (barklund) merged commit de53304 into main Jul 10, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants