6.4 KiB
6.4 KiB
phase, plan, type, wave, depends_on, files_modified, autonomous, requirements, must_haves
| phase | plan | type | wave | depends_on | files_modified | autonomous | requirements | must_haves | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 07-validation-ux-polish | 00 | tdd | 1 |
|
true |
|
|
Purpose: Establish the RED state before implementation — tests fail because the validate property and tooltipText property don't exist yet. Output: Augmented RemoteConfigStep.test.tsx with 11 new failing its; all 147 existing tests still pass.
<execution_context> @C:/Users/SebastienQUEROL/.claude/get-shit-done/workflows/execute-plan.md @C:/Users/SebastienQUEROL/.claude/get-shit-done/templates/summary.md </execution_context>
@.planning/PROJECT.md @.planning/ROADMAP.md @.planning/STATE.md @.planning/phases/07-validation-ux-polish/07-CONTEXT.md @.planning/phases/07-validation-ux-polish/07-RESEARCH.mdFrom src/schemas/registry.ts (current — no validate or tooltipText yet):
export type BackendType = 'azureblob' | 's3' | 's3-compatible' | 'onedrive' | 'sftp' | 'gcs' | 'b2';
export interface FieldDef {
key: string;
label: string;
inputType: 'text' | 'password' | 'select' | 'toggle';
required: boolean;
placeholder?: string;
helpText?: string;
options?: { value: string; label: string }[];
// NOTE: validate? and tooltipText? do NOT exist yet — that's why tests will fail
}
From src/schemas/index.ts (current — no regex chaining yet):
function buildZodSchema(backendType: BackendType): z.ZodObject<Record<string, z.ZodTypeAny>>
// Current loop: z.string().min(1, ...) OR z.string().optional()
// No .regex() chaining yet — that's why VALID-01 tests fail
Test file patterns already established (from Phase 5/6):
- userEvent.setup() per test body
- vi.useFakeTimers() in beforeEach + vi.useRealTimers() in afterEach
- WizardConsumerSetup pattern: in-test React component dispatches SET_DEPLOYMENT via useEffect
- Label text used for assertions, not filename text
VALID-01 — S3 region:
- it('rejects S3 region with invalid format (spaces)') → submit with region='us east 1' → expect error text (e.g. 'valid AWS region format')
- it('accepts valid S3 region') → submit with region='us-east-1' → expect no error
VALID-01 — GCS project_number:
- it('rejects GCS project_number with non-digits') → submit with project_number='abc' → expect error (e.g. 'digits only')
- it('accepts valid GCS project_number') → submit with project_number='123456789' → expect no error
UX-01 — Tooltip toggle:
- it('renders ⓘ button on azureblob sas_url field') → render azureblob step → expect button with aria-label matching /more info about SAS URL/i
- it('shows tooltip panel when ⓘ is clicked on sas_url') → click ⓘ → expect tooltip text visible
- it('hides tooltip panel when ⓘ is clicked again') → click twice → expect tooltip text not visible
- it('renders ⓘ button on SFTP auth method section') → render sftp step → expect button with aria-label matching /more info about authentication/i
- it('renders ⓘ button on OneDrive token field') → render onedrive step → expect button with aria-label matching /more info about/i on token field
All new tests: write them to FAIL now (the ⓘ button doesn't exist, regex validation doesn't exist).
Existing 147 tests: MUST still pass after adding these stubs.
Use the existing test setup patterns already in the file (WizardConsumerSetup, userEvent.setup(), vi.useFakeTimers in beforeEach).
Confirm all tests run by running the suite — expect 11 new failures + 147 existing passes.
<success_criteria>
- 11 new failing tests added (RED state for VALID-01 and UX-01)
- 0 pre-existing test regressions
- Test file committed with message:
test(07-00): add failing stubs for VALID-01 and UX-01</success_criteria>