Skip to content

Add the missing e2e probe for #169 (observed component ships) #175

@vivek7405

Description

@vivek7405

Problem

PR #171 (Closes #169) added unit and integration coverage for the cross-module-observation elision fix (a display-only component observed via whenDefined / :defined / instanceof is forced to ship instead of being elided), but the e2e network-probe layer was deferred to #172 and never landed (#172 only added the vendor-never-fetched and inert-route probes). So there is no real-browser proof that an OBSERVED display-only component's module is actually downloaded. This closes the all-test-layers gap on the merged #169 work.

Design / approach

Add a blog fixture plus an e2e probe mirroring the existing build-stamp pattern in test/e2e/e2e.test.mjs:

  • A display-only component (no @event, no non-state reactive prop, no lifecycle override, no signal) that would normally elide.
  • A shipping module that observes it via customElements.whenDefined('the-tag') (or a :defined CSS rule / instanceof), rendered on a blog page.
  • Probe: the browser DOES request the observed component's module (forced to ship), AND the component still SSRs its markup. The negative control (same component without an observer is NOT downloaded) is already proven by the build-stamp probe, so a comment reference suffices.

Acceptance criteria

  • e2e probe asserts an observed display-only component's module IS fetched in a real browser
  • The fixture is genuinely display-only, so the observation is what forces shipping
  • WEBJS_E2E=1 e2e suite passes with the new probe
  • examples/blog/AGENTS.md fixtures section notes the new observed-component fixture

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions