---
id: w5/m10/t008
title: Test coverage — stub resolvers, not-found route, DNS-instruction fields + panel
worker: worker5
status: done
estimate: 30m
depends_on: [w5/m10/t006]
---

## Objective

Add meaningful tests for the behavior m10 shipped: the backend's DNS-record derivation and verify verb (per `domainType`, per surface), the dashboard's not-found state, and the instructions panel (subdomain vs apex wording, copy, verify re-check). Tests assert real behavior and failure modes — no snapshot-everything or tautologies.

## Context

- Backend analogs: `lego/backend/internal/apps/domains_test.go` (already covers `domainType`/status derivation — extend for DNS-target fields and the verify verb across REST/GraphQL/MCP).
- Dashboard analogs: `custom-domains-section.test.tsx`, `platform-subdomain-section.test.tsx` in `dashboard/src/features/services/components/__tests__/`; route tests per the m8 pattern.
- The stub is a dev tool — cover its per-id resolution with a lightweight node test only if cheap; the dashboard not-found test is the load-bearing check.

## Steps

1. Backend: table-test DNS-record derivation (subdomain/apex/platform-host cases) + verify verb semantics on all three adapters.
2. Dashboard: not-found route test (`null` server → not-found rendered, no service chrome); panel tests for instruction wording, copy, and verify refresh.
3. Run `go test ./...` (backend) and `yarn test` (dashboard).

## Files

- `lego/backend/internal/apps/domains_test.go` (+ adapter test files as needed)
- `dashboard/src/features/services/components/__tests__/`, route test dirs

## Acceptance criteria

- [ ] DNS-record derivation + verify verb covered per surface with failure cases (unknown domain, unverified apex).
- [ ] Not-found route and instructions panel behavior asserted (not snapshots).
- [ ] Backend + dashboard suites green.

## Out of scope

- e2e against a live cluster.
