add noHtml5Validate prop check to NextScaffolder page test
Signed-off-by: Paul Cowan <paul.cowan@cutting.scot>
This commit is contained in:
@@ -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(
|
||||
<Router FormProps={{ transformErrors: transformErrorsMock }} />,
|
||||
<Router FormProps={{ transformErrors: transformErrorsMock, noHtml5Validate: true }} />,
|
||||
{
|
||||
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(
|
||||
|
||||
Reference in New Issue
Block a user