Skip to content

Commit

Permalink
fix: definition name is now called label
Browse files Browse the repository at this point in the history
  • Loading branch information
Nils-Kolvenbach committed May 27, 2024
1 parent 6fafd3b commit 773a577
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions test/valueSchema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('Dynamic zod schema', () => {
const requiredBooleanValueschema = getValueContentSchemaFromDefinition({
id: '',
valueType: 'boolean',
name: {
label: {
en: 'Test',
},
description: {
Expand All @@ -20,7 +20,6 @@ describe('Dynamic zod schema', () => {
inputType: 'toggle',
inputWidth: '12',
isDisabled: false,
isRequired: true,
});

expect(requiredBooleanValueschema.safeParse(true).success).toBe(true);
Expand All @@ -34,7 +33,7 @@ describe('Dynamic zod schema', () => {
const optionalBooleanValueschema = getValueContentSchemaFromDefinition({
id: '',
valueType: 'boolean',
name: {
label: {
en: 'Test',
},
description: {
Expand All @@ -44,7 +43,6 @@ describe('Dynamic zod schema', () => {
inputType: 'toggle',
inputWidth: '12',
isDisabled: false,
isRequired: false,
});

expect(optionalBooleanValueschema.safeParse(true).success).toBe(true);
Expand All @@ -58,7 +56,7 @@ describe('Dynamic zod schema', () => {
const requiredNumberValueschema = getValueContentSchemaFromDefinition({
id: '',
valueType: 'number',
name: {
label: {
en: 'Test',
},
description: {
Expand Down Expand Up @@ -89,7 +87,7 @@ describe('Dynamic zod schema', () => {
const optionalNumberValueschema = getValueContentSchemaFromDefinition({
id: '',
valueType: 'number',
name: {
label: {
en: 'Test',
},
description: {
Expand Down Expand Up @@ -120,7 +118,7 @@ describe('Dynamic zod schema', () => {
const requiredStringValueschema = getValueContentSchemaFromDefinition({
id: '',
valueType: 'string',
name: {
label: {
en: 'Test',
},
description: {
Expand All @@ -146,7 +144,7 @@ describe('Dynamic zod schema', () => {
const optionalStringValueschema = getValueContentSchemaFromDefinition({
id: '',
valueType: 'string',
name: {
label: {
en: 'Test',
},
description: {
Expand All @@ -172,7 +170,7 @@ describe('Dynamic zod schema', () => {
const optionalAssetValueschema = getValueContentSchemaFromDefinition({
id: '',
valueType: 'reference',
name: {
label: {
en: 'Test',
},
description: {
Expand Down Expand Up @@ -213,7 +211,7 @@ describe('Dynamic zod schema', () => {
const optionalAssetValueschema = getValueContentSchemaFromDefinition({
id: '',
valueType: 'reference',
name: {
label: {
en: 'Test',
},
description: {
Expand Down Expand Up @@ -284,17 +282,18 @@ describe('Dynamic zod schema', () => {
const sharedValueschema = getValueContentSchemaFromDefinition({
id: '',
valueType: 'reference',
name: {
label: {
en: 'Test',
},
description: {
en: 'Test',
},
inputType: 'sharedValue',
sharedValueType: 'string',
referenceValueDefinition: {
id: '',
valueType: 'string',
name: {
label: {
en: 'Test',
},
description: {
Expand Down

0 comments on commit 773a577

Please sign in to comment.