Skip to content

test(contrail-e2e): adopt post-PR30 spaces split + community integration#35

Merged
flo-bit merged 1 commit into
flo-bit:feat/another-big-refactorfrom
tompscanlan:fix/e2e-fixtures-spaces-split
May 4, 2026
Merged

test(contrail-e2e): adopt post-PR30 spaces split + community integration#35
flo-bit merged 1 commit into
flo-bit:feat/another-big-refactorfrom
tompscanlan:fix/e2e-fixtures-spaces-split

Conversation

@tompscanlan
Copy link
Copy Markdown
Collaborator

Summary

Brings the apps/contrail-e2e suite back to green under the new package split. 35/35 tests pass against devnet, up from 5 failed / 23 skipped on feat/another-big-refactor as-is.

No source-package changes — only test fixtures + a workspace dep on @atmo-dev/contrail-community.

What broke (and why)

Two layers of test-side migration debt from the package split:

1. spaces config shape (7 files)

Old:

spaces: { type, serviceDid, resolver }

New (per docs/06-spaces.md + the new validator at contrail-base/types.ts:395):

spaces: {
  authority: { type, serviceDid, signing, resolver },
  recordHost: {},
}

The validator throws Invalid config: \community` requires `spaces.authority`when this shape is missing. Even pure spaces tests fail:.space.createSpace` returned 404 because the route wasn't registered.

2. Community integration wiring (4 files)

config.community is now opaque to contrail core (community?: unknown on ContrailConfig). Routes are registered through a CommunityIntegration object built via createCommunityIntegration({ db, config: resolveConfig(...) }) and passed as communityIntegration to the Contrail constructor — same pattern the contrail-community unit tests use.

Test plan

  • pnpm install && pnpm build clean
  • cd apps/contrail-e2e && pnpm stack:up
  • pnpm test:e2eTest Files 10 passed (10) / Tests 35 passed (35)
  • npx tsc --noEmit in apps/contrail-e2e clean
  • No changes outside apps/contrail-e2e/ and pnpm-lock.yaml

Bring the e2e suite back to green under the package split:

- makeSpacesConfig() wraps the old flat { type, serviceDid, resolver }
  shape under authority / recordHost and generates a fresh signing key
  per call. The config validator now requires spaces.authority whenever
  community is set, so this is the minimum viable shape for any test
  that uses spaces.
- setupCommunityContrail() wires the community module via
  createCommunityIntegration({ db, config: resolveConfig(...) }) and
  passes the result as communityIntegration to the Contrail constructor.
  The community config field is now opaque to contrail core; routes are
  registered through the integration option.
- 7 test files updated to use the helpers; 4 community tests pick up a
  workspace dep on @atmo-dev/contrail-community.

35/35 e2e tests pass against devnet. No source-package changes.
@flo-bit flo-bit merged commit c9425dc into flo-bit:feat/another-big-refactor May 4, 2026
1 check 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.

2 participants