From 90b677a967db7a7df3087b1268b132ec736e6688 Mon Sep 17 00:00:00 2001 From: Paul Cowan Date: Sat, 17 Dec 2022 11:13:12 +0000 Subject: [PATCH] add noHtml5Validate prop check to NextScaffolder page test Signed-off-by: Paul Cowan --- plugins/scaffolder/src/next/Router/Router.test.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/scaffolder/src/next/Router/Router.test.tsx b/plugins/scaffolder/src/next/Router/Router.test.tsx index 0e890005ac..fb2072c1a0 100644 --- a/plugins/scaffolder/src/next/Router/Router.test.tsx +++ b/plugins/scaffolder/src/next/Router/Router.test.tsx @@ -54,11 +54,11 @@ describe('Router', () => { expect(TemplateWizardPage).toHaveBeenCalled(); }); - it('should pass through the transformErrors property', async () => { + it('should pass through the FormProps property', async () => { const transformErrorsMock = jest.fn(); await renderInTestApp( - , + , { routeEntries: ['/templates/default/foo'], }, @@ -68,13 +68,14 @@ describe('Router', () => { const [ { - FormProps: { transformErrors }, + FormProps, }, ] = mock.mock.calls[0]; - expect(transformErrors).toEqual(transformErrors); + expect(FormProps).toEqual({transformErrors: transformErrorsMock, noHtml5Validate: true}); }); + it('should extract the fieldExtensions and pass them through', async () => { const mockComponent = () => null; const CustomFieldExtension = scaffolderPlugin.provide(