Skip to content

test: broad unit/coverage suite and supporting infrastructure#282

Open
melihsunbul wants to merge 11 commits into
QuackbackIO:mainfrom
ExcellenceCloudGmbH:10-test-coverage
Open

test: broad unit/coverage suite and supporting infrastructure#282
melihsunbul wants to merge 11 commits into
QuackbackIO:mainfrom
ExcellenceCloudGmbH:10-test-coverage

Conversation

@melihsunbul

@melihsunbul melihsunbul commented Jun 22, 2026

Copy link
Copy Markdown

What

The broad unit/integration test suite for the whole branch, plus shared test infrastructure and the residual cross-cutting changes (settings, posts, feedback queues, analytics, chat, client-query plumbing, root routes).

Concepts

  • Coverage — the branch was developed to a high coverage standard (lines across the board; branches on the core server paths). This PR lands the tests that close the changed-line gap for the whole stack, so the project's coverage expectations stay met. CI configuration is unchanged from main.
  • Supporting changes — small, shared edits that several feature PRs depend on but that do not belong to any single feature; grouped here to keep the feature PRs focused.

How it works

  • Test infrastructurevitest.config.ts defaults maxWorkers to 50% (overridable via VITEST_MAX_WORKERS) to stabilise the import-heavy, mock-based suite; packages/widget vitest setup plus v8 coverage; an e2e getOtpCode helper for email-OTP sign-in.
  • Supporting changes — shared settings service/types/widget config; posts (announce/merge/service/user-actions); feedback queues; analytics-queue; chat.notify; user.identify; merge-suggestions; admin-sidebar/settings-nav wiring; __root/admin route shells; api/{chat/stream,import,storage,upload,settings/features}; and client query plumbing (ensure-data, queries/{admin,settings,signals}, mutations/index).
  • Fixrich-text-editor: allow data attributes and skip the second DOMPurify pass under Happy DOM (which strips allowed heading tags in that test DOM); production browsers and server-sanitised TipTap JSON are unaffected.

How to use

  • Nothing to operate. To validate:
bun run test        # full unit/integration suite
bun run typecheck
bun run lint

Verification

  • Full unit/integration suite green locally; bun run typecheck, bun run lint.

Depends on 09-content-visibility. This is the final PR — after it merges, the stack equals the integrated branch.


📚 This is a stacked series — please review & merge in order

These 10 PRs are split by concern and ordered by dependency. Each is opened against main, so until the PRs before it have merged, a PR's diff is cumulative (it also contains the earlier batches). As the earlier PRs merge and we rebase the next branch onto main, each diff reduces to just its own batch. Merging all 10 in order reproduces our integrated branch exactly (verified: the cumulative tip of the series is byte-identical to it).

Order (by branch):

  1. 01-data-model-foundation — data model, TypeIDs, migrations
  2. 02-rbac-authz-teams — RBAC, teams, organisation & auth surfaces
  3. 03-events-audit-webhooks — event dispatch, audit log, webhooks, notifications
  4. 04-ticketing-crm-core — ticketing / CRM core
  5. 05-sla-inboxes-routing — SLA policies, inboxes, business hours, routing
  6. 06-github-sync-and-ticket-email — GitHub ticket sync, ticket email, integration platform
  7. 07-widget-profiles — scoped widget profiles + ticket submission
  8. 08-api-openapi-mcp — OpenAPI surface, MCP tools, conversation actions, API keys
  9. 09-content-visibility — changelog/help-centre visibility, segments, portal tabs
  10. 10-test-coverage — broad unit/integration test suite + supporting infra

Part of the roadmap: #283

@CLAassistant

CLAassistant commented Jun 22, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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