---
id: w5/m11/t005
title: Test coverage — Settings renders correct sections by service type
worker: worker5
status: done
estimate: 30m
depends_on: [w5/m11/t003]
---

## Objective

Add tests that assert the Settings page renders the correct sections for each service type: Custom Domains + Idle timeout present for web services, absent for cron jobs; Deploy section (Schedule + Command) present for cron jobs, absent for web services.

## Context

- Dashboard test setup: `yarn test` (vitest or equivalent configured in `dashboard/`)
- Existing test patterns for route components — check `dashboard/src/routes/` for `*.test.tsx` examples

## Steps

1. Find the existing test setup in `dashboard/` (vitest config, test utilities, mock patterns)
2. Write a test for the Settings component with a web-service fixture: asserts Custom Domains section present, Idle timeout present, Deploy section absent
3. Write a test for the Settings component with a cron-job fixture: asserts Custom Domains section absent, Idle timeout absent, Deploy section present with Schedule and Command

## Files

- `dashboard/src/routes/services/$serviceId/settings.test.tsx` (new)

## Acceptance criteria

- [ ] `yarn test` (or `yarn vitest`) passes
- [ ] At least two test cases: web-service settings and cron-job settings
- [ ] Tests assert section presence/absence, not just render-without-crash

## Out of scope

- E2E tests (Playwright) — those are for verification sessions, not CI
