Signed-off-by: Brian Fletcher <brian@roadie.io>
This commit is contained in:
Brian Fletcher
2022-12-12 11:06:06 +00:00
parent db6310b6a0
commit 1dbf2ce24b
@@ -115,6 +115,48 @@ describe('TemplatePage', () => {
expect(rendered.getByText('Test output')).toBeInTheDocument();
});
it('renders action with multipel input types', async () => {
scaffolderApiMock.listActions.mockResolvedValue([
{
id: 'test',
description: 'example description',
schema: {
input: {
type: 'object',
required: ['foobar'],
properties: {
foobar: {
title: 'Test title',
type: ['array', 'number'],
},
},
},
output: {
type: 'object',
properties: {
buzz: {
title: 'Test output',
type: 'string',
},
},
},
},
},
]);
const rendered = await renderInTestApp(
<ApiProvider apis={apis}>
<ActionsPage />
</ApiProvider>,
{
mountedRoutes: {
'/create/actions': rootRouteRef,
},
},
);
expect(rendered.getByText('array')).toBeInTheDocument();
expect(rendered.getByText('number')).toBeInTheDocument();
});
it('renders action with oneOf input', async () => {
scaffolderApiMock.listActions.mockResolvedValue([
{