chore: update codegen config for enum naming convention (#9751)

Co-authored-by: etiennejouan <jouan.etienne@gmail.com>
This commit is contained in:
Etienne
2025-01-21 11:34:33 +01:00
committed by GitHub
parent d4b038f24a
commit e1731bb31e
222 changed files with 1245 additions and 1235 deletions

View File

@ -26,7 +26,7 @@ describe('formatFieldMetadataItemInput', () => {
label: 'Example Label',
name: 'exampleLabel',
icon: 'example-icon',
type: FieldMetadataType.Select,
type: FieldMetadataType.SELECT,
description: 'Example description',
options,
isLabelSyncedWithName: true,
@ -52,7 +52,7 @@ describe('formatFieldMetadataItemInput', () => {
label: 'Example Label',
name: 'exampleLabel',
icon: 'example-icon',
type: FieldMetadataType.Select,
type: FieldMetadataType.SELECT,
description: 'Example description',
isLabelSyncedWithName: true,
};
@ -94,7 +94,7 @@ describe('formatFieldMetadataItemInput', () => {
label: 'Example Label',
name: 'exampleLabel',
icon: 'example-icon',
type: FieldMetadataType.MultiSelect,
type: FieldMetadataType.MULTI_SELECT,
description: 'Example description',
options,
isLabelSyncedWithName: true,
@ -120,7 +120,7 @@ describe('formatFieldMetadataItemInput', () => {
label: 'Example Label',
name: 'exampleLabel',
icon: 'example-icon',
type: FieldMetadataType.MultiSelect,
type: FieldMetadataType.MULTI_SELECT,
description: 'Example description',
isLabelSyncedWithName: true,
};

View File

@ -5,14 +5,14 @@ describe('shouldFieldBeQueried', () => {
describe('if recordGqlFields is absent, we query all except relations', () => {
it('should be queried if the field is not a relation', () => {
const res = shouldFieldBeQueried({
field: { name: 'fieldName', type: FieldMetadataType.Boolean },
field: { name: 'fieldName', type: FieldMetadataType.BOOLEAN },
});
expect(res).toBe(true);
});
it('should not be queried if the field is a relation', () => {
const res = shouldFieldBeQueried({
field: { name: 'fieldName', type: FieldMetadataType.Relation },
field: { name: 'fieldName', type: FieldMetadataType.RELATION },
});
expect(res).toBe(false);
});
@ -22,7 +22,7 @@ describe('shouldFieldBeQueried', () => {
it('should be queried if true', () => {
const res = shouldFieldBeQueried({
recordGqlFields: { fieldName: true },
field: { name: 'fieldName', type: FieldMetadataType.Relation },
field: { name: 'fieldName', type: FieldMetadataType.RELATION },
});
expect(res).toBe(true);
});
@ -30,7 +30,7 @@ describe('shouldFieldBeQueried', () => {
it('should be queried if object', () => {
const res = shouldFieldBeQueried({
recordGqlFields: { fieldName: { subFieldName: false } },
field: { name: 'fieldName', type: FieldMetadataType.Relation },
field: { name: 'fieldName', type: FieldMetadataType.RELATION },
});
expect(res).toBe(true);
});
@ -38,7 +38,7 @@ describe('shouldFieldBeQueried', () => {
it('should not be queried if false', () => {
const res = shouldFieldBeQueried({
recordGqlFields: { fieldName: false },
field: { name: 'fieldName', type: FieldMetadataType.Relation },
field: { name: 'fieldName', type: FieldMetadataType.RELATION },
});
expect(res).toBe(false);
});
@ -46,7 +46,7 @@ describe('shouldFieldBeQueried', () => {
it('should not be queried if absent', () => {
const res = shouldFieldBeQueried({
recordGqlFields: { otherFieldName: false },
field: { name: 'fieldName', type: FieldMetadataType.Relation },
field: { name: 'fieldName', type: FieldMetadataType.RELATION },
});
expect(res).toBe(false);
});