diff --git a/src/App.test.tsx b/src/App.test.tsx new file mode 100644 index 0000000..b7aa1f4 --- /dev/null +++ b/src/App.test.tsx @@ -0,0 +1,17 @@ +// @vitest-environment jsdom +// Covers WIZD-02: App renders the correct step component for currentStep 0, 1, 2 +import { describe, it, expect } from 'vitest'; + +describe('App — step routing', () => { + it('renders BackendSelectionStep when currentStep is 0', () => { + expect.fail('not yet implemented'); + }); + + it('renders RemoteConfigStep when currentStep is 1', () => { + expect.fail('not yet implemented'); + }); + + it('renders DeploymentStep when currentStep is 2', () => { + expect.fail('not yet implemented'); + }); +}); diff --git a/src/components/wizard/BackendSelectionStep.test.tsx b/src/components/wizard/BackendSelectionStep.test.tsx new file mode 100644 index 0000000..de17130 --- /dev/null +++ b/src/components/wizard/BackendSelectionStep.test.tsx @@ -0,0 +1,50 @@ +// @vitest-environment jsdom +// Covers WIZD-01: card grid renders Azure Blob, Amazon S3, S3-Compatible (Azure first) +// Covers WIZD-04: remote name field validates alphanumeric/dash/underscore +import { describe, it, expect } from 'vitest'; + +describe('BackendSelectionStep', () => { + describe('WIZD-01: backend card grid', () => { + it('renders Azure Blob Storage card', () => { + expect.fail('not yet implemented'); + }); + + it('renders Amazon S3 card', () => { + expect.fail('not yet implemented'); + }); + + it('renders S3-Compatible card', () => { + expect.fail('not yet implemented'); + }); + + it('Azure Blob is listed before S3 in DOM order', () => { + expect.fail('not yet implemented'); + }); + + it('clicking a backend card dispatches SET_BACKEND_TYPE and SET_STEP', () => { + expect.fail('not yet implemented'); + }); + }); + + describe('WIZD-04: remote name field', () => { + it('renders remote name input at the top of the step', () => { + expect.fail('not yet implemented'); + }); + + it('shows no error before first Next attempt', () => { + expect.fail('not yet implemented'); + }); + + it('shows inline error after first Next attempt with invalid name', () => { + expect.fail('not yet implemented'); + }); + + it('accepts alphanumeric, dashes, and underscores', () => { + expect.fail('not yet implemented'); + }); + + it('rejects names with spaces or special characters', () => { + expect.fail('not yet implemented'); + }); + }); +}); diff --git a/src/components/wizard/RemoteConfigStep.test.tsx b/src/components/wizard/RemoteConfigStep.test.tsx new file mode 100644 index 0000000..e549f9c --- /dev/null +++ b/src/components/wizard/RemoteConfigStep.test.tsx @@ -0,0 +1,45 @@ +// @vitest-environment jsdom +// Covers BACK-01: Azure Blob config form — account + SAS/Key toggle, both values preserved +// Covers BACK-02: Amazon S3 config form — access_key_id, secret_access_key, region +// Covers BACK-03: S3-Compatible config form — same as S3 plus endpoint field +import { describe, it, expect } from 'vitest'; + +describe('RemoteConfigStep', () => { + describe('BACK-01: Azure Blob form', () => { + it('renders Storage Account Name field', () => { + expect.fail('not yet implemented'); + }); + + it('shows SAS URL field by default (default auth method)', () => { + expect.fail('not yet implemented'); + }); + + it('switching auth toggle to Access Key shows key field and hides SAS URL', () => { + expect.fail('not yet implemented'); + }); + + it('switching auth toggle does not clear the hidden field value', () => { + expect.fail('not yet implemented'); + }); + }); + + describe('BACK-02: Amazon S3 form', () => { + it('renders access_key_id field', () => { + expect.fail('not yet implemented'); + }); + + it('renders secret_access_key field', () => { + expect.fail('not yet implemented'); + }); + + it('renders region field', () => { + expect.fail('not yet implemented'); + }); + }); + + describe('BACK-03: S3-Compatible form', () => { + it('renders endpoint field in addition to S3 fields', () => { + expect.fail('not yet implemented'); + }); + }); +}); diff --git a/src/components/wizard/StepIndicator.test.tsx b/src/components/wizard/StepIndicator.test.tsx new file mode 100644 index 0000000..2d1d9b4 --- /dev/null +++ b/src/components/wizard/StepIndicator.test.tsx @@ -0,0 +1,27 @@ +// @vitest-environment jsdom +// Covers WIZD-03: going back preserves remote.params; deployment options are untouched +import { describe, it, expect } from 'vitest'; + +describe('StepIndicator', () => { + describe('WIZD-03: back navigation preserves state', () => { + it('clicking a completed step dispatches SET_STEP', () => { + expect.fail('not yet implemented'); + }); + + it('clicking back to step 0 dispatches SET_REMOTE_PARAMS({}) to clear params', () => { + expect.fail('not yet implemented'); + }); + + it('clicking back to step 0 does NOT dispatch RESET (deployment preserved)', () => { + expect.fail('not yet implemented'); + }); + + it('step 0 shows as active when currentStep is 0', () => { + expect.fail('not yet implemented'); + }); + + it('completed steps are clickable', () => { + expect.fail('not yet implemented'); + }); + }); +});