diff --git a/packages/zapp/console/src/components/Launch/LaunchForm/inputHelpers/test/testCases.ts b/packages/zapp/console/src/components/Launch/LaunchForm/inputHelpers/test/testCases.ts index 0cb038323..569958b53 100644 --- a/packages/zapp/console/src/components/Launch/LaunchForm/inputHelpers/test/testCases.ts +++ b/packages/zapp/console/src/components/Launch/LaunchForm/inputHelpers/test/testCases.ts @@ -111,7 +111,6 @@ export const supportedPrimitives: InputTypeDefinition[] = [ inputTypes.integer, inputTypes.schema, inputTypes.struct, - inputTypes.map, ]; export const unsupportedTypes: InputTypeDefinition[] = [ diff --git a/packages/zapp/console/src/components/Launch/LaunchForm/inputHelpers/test/utils.test.ts b/packages/zapp/console/src/components/Launch/LaunchForm/inputHelpers/test/utils.test.ts index d6f4129c9..bd3003d38 100644 --- a/packages/zapp/console/src/components/Launch/LaunchForm/inputHelpers/test/utils.test.ts +++ b/packages/zapp/console/src/components/Launch/LaunchForm/inputHelpers/test/utils.test.ts @@ -1,6 +1,8 @@ import { collectionInputTypeDefinition, + mapInputTypeDefinition, nestedCollectionInputTypeDefinition, + nestedMapInputTypeDefinition, } from '../../__mocks__/utils'; import { InputTypeDefinition } from '../../types'; import { typeIsSupported } from '../utils'; @@ -25,6 +27,16 @@ describe('Launch/inputHelpers/utils', () => { nestedCollectionInputTypeDefinition(typeDefinition), true, ]), + ...supportedPrimitives.map((typeDefinition) => [ + `supports 1-dimension map of type ${typeDefinition.type}`, + mapInputTypeDefinition(typeDefinition), + true, + ]), + ...supportedPrimitives.map((typeDefinition) => [ + `supports 2-dimension map of type: ${typeDefinition.type}`, + nestedMapInputTypeDefinition(typeDefinition), + true, + ]), ...unsupportedTypes.map((typeDefinition) => [ `does NOT support type ${typeDefinition.type}`, typeDefinition, @@ -40,6 +52,16 @@ describe('Launch/inputHelpers/utils', () => { nestedCollectionInputTypeDefinition(typeDefinition), false, ]), + ...unsupportedTypes.map((typeDefinition) => [ + `does NOT support 1-dimension map of type ${typeDefinition.type}`, + mapInputTypeDefinition(typeDefinition), + false, + ]), + ...unsupportedTypes.map((typeDefinition) => [ + `does NOT support 2-dimension map of type: ${typeDefinition.type}`, + nestedMapInputTypeDefinition(typeDefinition), + false, + ]), ]; cases.forEach(([description, value, expected]) => diff --git a/packages/zapp/console/src/components/Launch/LaunchForm/test/constants.ts b/packages/zapp/console/src/components/Launch/LaunchForm/test/constants.ts index d86b78d91..16274440e 100644 --- a/packages/zapp/console/src/components/Launch/LaunchForm/test/constants.ts +++ b/packages/zapp/console/src/components/Launch/LaunchForm/test/constants.ts @@ -7,6 +7,7 @@ export const datetimeInputName = 'simpleDatetime'; export const integerInputName = 'simpleInteger'; export const binaryInputName = 'simpleBinary'; export const errorInputName = 'simpleError'; +export const mapInputName = 'simpleMap'; export const iamRoleString = 'arn:aws:iam::12345678:role/defaultrole'; export const k8sServiceAccountString = 'default-service-account';