diff --git a/src/components/wizard/BackendSelectionStep.test.tsx b/src/components/wizard/BackendSelectionStep.test.tsx index aa99f3d..f3bfe5b 100644 --- a/src/components/wizard/BackendSelectionStep.test.tsx +++ b/src/components/wizard/BackendSelectionStep.test.tsx @@ -60,6 +60,22 @@ describe('BackendSelectionStep', () => { }); }); + describe('RemoteNamePreview integration', () => { + it('shows empty-state placeholder [my-remote] on initial render', () => { + renderStep(); + expect(screen.getByText('[my-remote]')).toBeDefined(); + }); + + it('updates preview to [test-remote] as user types', async () => { + const user = userEvent.setup(); + renderStep(); + const nameInput = screen.getByRole('textbox'); + await user.clear(nameInput); + await user.type(nameInput, 'test-remote'); + expect(screen.getByText('[test-remote]')).toBeDefined(); + }); + }); + describe('WIZD-04: remote name field', () => { it('renders remote name input at the top of the step', () => { renderStep(); @@ -87,8 +103,9 @@ describe('BackendSelectionStep', () => { await user.click(azureButton); // Error should appear after async validation await waitFor(() => { - expect(screen.getByRole('alert')).toBeDefined(); - expect(screen.getByText(/required/i)).toBeDefined(); + const alert = screen.getByRole('alert'); + expect(alert).toBeDefined(); + expect(alert.textContent).toMatch(/required/i); }); });