---
id: w4/m6.5/t007
title: "Test coverage — meaningful tests for the env-vars dashboard behavior"
worker: worker4
status: done
estimate: 30m
depends_on: [w4/m6.5/t005]
---

## Objective

Round out dashboard test coverage for m6.5's behavior: the keys list renders from `envVarKeys`; "Show secret" fetches and reveals a single value via `envVar(key)` (and stays masked until then); add/update/delete call the right mutations and refetch; and the loading / empty / 403 / 503 states render. Tests must assert real behavior and failure modes — never trivial, tautological, or snapshot-everything tests.

## Context

- Standing closing task. Follow the dashboard's existing test setup (see `dashboard/src/features/services/**/__tests__` and `dashboard/src/routes/__tests__`), mocking the Apollo hooks / GraphQL layer as those tests do.

## Steps

1. Gap-scan the DoD + each task's acceptance criteria against existing tests.
2. Add the missing cases, favoring the reveal-on-demand and error states.
3. `dashboard` test suite green.

## Files

- `dashboard/src/features/services/components/__tests__/env-vars-table.test.tsx` (+ hook/route tests)

## Acceptance criteria

- [ ] Every DoD clause + the 403/503/empty states has an asserting test; dashboard tests green.

## Out of scope

- E2E rework (t005 owns the mock-cluster/real-app flow).
