{
}
// @public
-export type LayoutTemplateim a custom field extension
;
@@ -174,7 +267,7 @@ describe('Stepper', () => {
manifest={manifest}
extensions={[]}
onComplete={jest.fn()}
- transformErrors={transformErrors}
+ FormProps={{ transformErrors }}
/>,
);
@@ -189,6 +282,38 @@ describe('Stepper', () => {
expect(getByText('invalid postcode')).toBeInTheDocument();
});
+ it('should grab the initial formData from the query', async () => {
+ const manifest: TemplateParameterSchema = {
+ steps: [
+ {
+ title: 'Step 1',
+ schema: {
+ properties: {
+ firstName: {
+ type: 'string',
+ },
+ },
+ },
+ },
+ ],
+ title: 'initialize formData',
+ };
+
+ const mockFormData = { firstName: 'John' };
+
+ Object.defineProperty(window, 'location', {
+ value: {
+ search: `?formData=${JSON.stringify(mockFormData)}`,
+ },
+ });
+
+ const { getByRole } = await renderInTestApp(
+