UI testkit browser parity

Contract

v0.1.21 extends pkg/uikit/uikittest with browser-parity helpers. Product modules can mount a fixture, dispatch typed callbacks, and compare server, WASM, and pure-renderer behavior without making every state transition an e2e test.

func TestMountedCounter(t *testing.T) {
	fixture := uikittest.Mount(t, Counter)
	fixture.Click("button")
	fixture.AssertText("button", "Count 1")
	fixture.AssertNoLeakedCallbacks()
}

The browser fixture provides fake browser-global accessors for form values, files, storage, timers, and location/hash values. Tests that need the real browser runtime can still use e2e coverage, but ordinary component behavior should stay in fast Go tests.

Requirements

  • Fixture mounting uses the Go WASM frontend runtime.
  • Fake browser globals match the public adapters from v0.1.16.
  • Parity assertions compare server HTML, mounted output, callback behavior, and cleanup.
  • Failure output names the selector, event, expected state, and observed state.
  • Callback and effect leaks are observable after unmount.

Boundary

This patch does not replace product e2e tests, portal host checks, or provider API tests. It keeps generic browser-bound component behavior unit-testable.