Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/inline-wizard-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@astryxdesign/cli': patch
---

[feat] Add the inline wizard page template. (#5797)
@ernestt
4 changes: 4 additions & 0 deletions apps/docsite/src/components/templateComponents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ export const TEMPLATE_COMPONENTS: Record<
() =>
import('../../../../packages/cli/assets/templates/pages/form-two-column/page'),
),
'form-wizard-inline': lazy(
() =>
import('../../../../packages/cli/assets/templates/pages/form-wizard-inline/page'),
),
'gallery-hero': lazy(
() =>
import('../../../../packages/cli/assets/templates/pages/gallery-hero/page'),
Expand Down
24 changes: 24 additions & 0 deletions packages/cli/api/template/inline-wizard-template.test.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.

/**
* @file Regression coverage for the shipped inline wizard template.
* @input The template API and the form-wizard-inline source it exposes.
* @output Assertions that completed steps remain navigable and no dead skip
* action is rendered.
* @position Focused interaction guard for the inline wizard page template.
*/

import {describe, expect, it} from 'vitest';
import {template} from './template.mjs';

describe('inline wizard template interactions', () => {
it('ships step navigation without a dead skip action', async () => {
const result = await template('form-wizard-inline');

expect(result.type).toBe('template.show');
expect(result.data.source).toContain('onStepClick={goToStep}');
expect(result.data.source).not.toContain('without `onStepClick`');
expect(result.data.source).not.toContain('Skip for now');
expect(result.data.source).not.toContain('onClick={() => {}}');
});
});
Loading
Loading