---
id: w5/m16/t005
title: Tests for the manual-scaling stepper
worker: worker5
status: done
estimate: 30m
depends_on: [w5/m16/t004]
---

## Objective

Add tests to `services.$serviceId.settings.test.tsx`: stepper renders the current count, submits the correct mutation, handles the suspend-wins interaction (scaling a suspended service updates the spec but the service stays at 0 running instances).

## Context

- Backend's suspend-wins contract: `w2/m12/t003` — `spec.replicas` is desired-when-awake, `suspended` overrides to 0.

## Steps

1. Test: stepper shows the current `replicas` value from the query.
2. Test: submitting a new count calls `scaleService` with the right arguments.
3. Test: a suspended service's stepper submit still succeeds (spec updates) without implying pods are running.
4. Test: cron-job services never render the stepper (regression for t004).

## Files

- `dashboard/src/routes/__tests__/services.$serviceId.settings.test.tsx`

## Acceptance criteria

- [ ] All four cases above are covered and green.

## Out of scope

- Backend test coverage (already shipped in `w2/m12`).
