fix: many fields in an object (#10061)

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Jérémy M
2025-02-11 17:15:30 +01:00
committed by GitHub
parent 47f262c970
commit ed4a5b0c15
43 changed files with 22318 additions and 22058 deletions

View File

@ -23,7 +23,8 @@ describe('attachmentsResolver (e2e)', () => {
personId
companyId
opportunityId
rocketId
petId
surveyResultId
}
}
}
@ -64,7 +65,8 @@ describe('attachmentsResolver (e2e)', () => {
expect(attachments).toHaveProperty('personId');
expect(attachments).toHaveProperty('companyId');
expect(attachments).toHaveProperty('opportunityId');
expect(attachments).toHaveProperty('rocketId');
expect(attachments).toHaveProperty('petId');
expect(attachments).toHaveProperty('surveyResultId');
}
});
});

View File

@ -25,7 +25,8 @@ describe('favoritesResolver (e2e)', () => {
taskId
noteId
viewId
rocketId
petId
surveyResultId
}
}
}
@ -68,7 +69,8 @@ describe('favoritesResolver (e2e)', () => {
expect(favorites).toHaveProperty('taskId');
expect(favorites).toHaveProperty('noteId');
expect(favorites).toHaveProperty('viewId');
expect(favorites).toHaveProperty('rocketId');
expect(favorites).toHaveProperty('petId');
expect(favorites).toHaveProperty('surveyResultId');
}
});
});

View File

@ -18,7 +18,8 @@ describe('noteTargetsResolver (e2e)', () => {
personId
companyId
opportunityId
rocketId
petId
surveyResultId
}
}
}
@ -54,7 +55,8 @@ describe('noteTargetsResolver (e2e)', () => {
expect(noteTargets).toHaveProperty('personId');
expect(noteTargets).toHaveProperty('companyId');
expect(noteTargets).toHaveProperty('opportunityId');
expect(noteTargets).toHaveProperty('rocketId');
expect(noteTargets).toHaveProperty('petId');
expect(noteTargets).toHaveProperty('surveyResultId');
}
});
});

View File

@ -2,12 +2,12 @@ import request from 'supertest';
const client = request(`http://localhost:${APP_PORT}`);
describe('rocketsResolver (e2e)', () => {
it('should find many rockets', () => {
describe('petsResolver (e2e)', () => {
it('should find many pets', () => {
const queryData = {
query: `
query rockets {
rockets {
query pets {
pets {
edges {
node {
id
@ -34,7 +34,7 @@ describe('rocketsResolver (e2e)', () => {
expect(res.body.errors).toBeUndefined();
})
.expect((res) => {
const data = res.body.data.rockets;
const data = res.body.data.pets;
expect(data).toBeDefined();
expect(Array.isArray(data.edges)).toBe(true);
@ -42,15 +42,15 @@ describe('rocketsResolver (e2e)', () => {
const edges = data.edges;
if (edges.length > 0) {
const rockets = edges[0].node;
const pets = edges[0].node;
expect(rockets).toHaveProperty('id');
expect(rockets).toHaveProperty('name');
expect(rockets).toHaveProperty('createdAt');
expect(rockets).toHaveProperty('updatedAt');
expect(rockets).toHaveProperty('deletedAt');
expect(rockets).toHaveProperty('position');
expect(rockets).toHaveProperty('searchVector');
expect(pets).toHaveProperty('id');
expect(pets).toHaveProperty('name');
expect(pets).toHaveProperty('createdAt');
expect(pets).toHaveProperty('updatedAt');
expect(pets).toHaveProperty('deletedAt');
expect(pets).toHaveProperty('position');
expect(pets).toHaveProperty('searchVector');
}
});
});

View File

@ -23,7 +23,8 @@ describe('searchAttachmentsResolver (e2e)', () => {
personId
companyId
opportunityId
rocketId
petId
surveyResultId
}
}
}
@ -64,7 +65,8 @@ describe('searchAttachmentsResolver (e2e)', () => {
expect(searchAttachments).toHaveProperty('personId');
expect(searchAttachments).toHaveProperty('companyId');
expect(searchAttachments).toHaveProperty('opportunityId');
expect(searchAttachments).toHaveProperty('rocketId');
expect(searchAttachments).toHaveProperty('petId');
expect(searchAttachments).toHaveProperty('surveyResultId');
}
});
});

View File

@ -25,7 +25,8 @@ describe('searchFavoritesResolver (e2e)', () => {
taskId
noteId
viewId
rocketId
petId
surveyResultId
}
}
}
@ -68,7 +69,8 @@ describe('searchFavoritesResolver (e2e)', () => {
expect(searchFavorites).toHaveProperty('taskId');
expect(searchFavorites).toHaveProperty('noteId');
expect(searchFavorites).toHaveProperty('viewId');
expect(searchFavorites).toHaveProperty('rocketId');
expect(searchFavorites).toHaveProperty('petId');
expect(searchFavorites).toHaveProperty('surveyResultId');
}
});
});

View File

@ -18,7 +18,8 @@ describe('searchNoteTargetsResolver (e2e)', () => {
personId
companyId
opportunityId
rocketId
petId
surveyResultId
}
}
}
@ -54,7 +55,8 @@ describe('searchNoteTargetsResolver (e2e)', () => {
expect(searchNoteTargets).toHaveProperty('personId');
expect(searchNoteTargets).toHaveProperty('companyId');
expect(searchNoteTargets).toHaveProperty('opportunityId');
expect(searchNoteTargets).toHaveProperty('rocketId');
expect(searchNoteTargets).toHaveProperty('petId');
expect(searchNoteTargets).toHaveProperty('surveyResultId');
}
});
});

View File

@ -2,12 +2,12 @@ import request from 'supertest';
const client = request(`http://localhost:${APP_PORT}`);
describe('searchRocketsResolver (e2e)', () => {
it('should find many searchRockets', () => {
describe('searchPetsResolver (e2e)', () => {
it('should find many searchPets', () => {
const queryData = {
query: `
query searchRockets {
searchRockets {
query searchPets {
searchPets {
edges {
node {
id
@ -34,7 +34,7 @@ describe('searchRocketsResolver (e2e)', () => {
expect(res.body.errors).toBeUndefined();
})
.expect((res) => {
const data = res.body.data.searchRockets;
const data = res.body.data.searchPets;
expect(data).toBeDefined();
expect(Array.isArray(data.edges)).toBe(true);
@ -42,15 +42,15 @@ describe('searchRocketsResolver (e2e)', () => {
const edges = data.edges;
if (edges.length > 0) {
const searchRockets = edges[0].node;
const searchPets = edges[0].node;
expect(searchRockets).toHaveProperty('id');
expect(searchRockets).toHaveProperty('name');
expect(searchRockets).toHaveProperty('createdAt');
expect(searchRockets).toHaveProperty('updatedAt');
expect(searchRockets).toHaveProperty('deletedAt');
expect(searchRockets).toHaveProperty('position');
expect(searchRockets).toHaveProperty('searchVector');
expect(searchPets).toHaveProperty('id');
expect(searchPets).toHaveProperty('name');
expect(searchPets).toHaveProperty('createdAt');
expect(searchPets).toHaveProperty('updatedAt');
expect(searchPets).toHaveProperty('deletedAt');
expect(searchPets).toHaveProperty('position');
expect(searchPets).toHaveProperty('searchVector');
}
});
});

View File

@ -18,7 +18,8 @@ describe('searchTaskTargetsResolver (e2e)', () => {
personId
companyId
opportunityId
rocketId
petId
surveyResultId
}
}
}
@ -54,7 +55,8 @@ describe('searchTaskTargetsResolver (e2e)', () => {
expect(searchTaskTargets).toHaveProperty('personId');
expect(searchTaskTargets).toHaveProperty('companyId');
expect(searchTaskTargets).toHaveProperty('opportunityId');
expect(searchTaskTargets).toHaveProperty('rocketId');
expect(searchTaskTargets).toHaveProperty('petId');
expect(searchTaskTargets).toHaveProperty('surveyResultId');
}
});
});

View File

@ -29,7 +29,8 @@ describe('searchTimelineActivitiesResolver (e2e)', () => {
workflowId
workflowVersionId
workflowRunId
rocketId
petId
surveyResultId
}
}
}
@ -80,7 +81,8 @@ describe('searchTimelineActivitiesResolver (e2e)', () => {
expect(searchTimelineActivities).toHaveProperty('workflowId');
expect(searchTimelineActivities).toHaveProperty('workflowVersionId');
expect(searchTimelineActivities).toHaveProperty('workflowRunId');
expect(searchTimelineActivities).toHaveProperty('rocketId');
expect(searchTimelineActivities).toHaveProperty('petId');
expect(searchTimelineActivities).toHaveProperty('surveyResultId');
}
});
});

View File

@ -18,7 +18,8 @@ describe('taskTargetsResolver (e2e)', () => {
personId
companyId
opportunityId
rocketId
petId
surveyResultId
}
}
}
@ -54,7 +55,8 @@ describe('taskTargetsResolver (e2e)', () => {
expect(taskTargets).toHaveProperty('personId');
expect(taskTargets).toHaveProperty('companyId');
expect(taskTargets).toHaveProperty('opportunityId');
expect(taskTargets).toHaveProperty('rocketId');
expect(taskTargets).toHaveProperty('petId');
expect(taskTargets).toHaveProperty('surveyResultId');
}
});
});

View File

@ -29,7 +29,8 @@ describe('timelineActivitiesResolver (e2e)', () => {
workflowId
workflowVersionId
workflowRunId
rocketId
petId
surveyResultId
}
}
}
@ -76,7 +77,8 @@ describe('timelineActivitiesResolver (e2e)', () => {
expect(timelineActivities).toHaveProperty('workflowId');
expect(timelineActivities).toHaveProperty('workflowVersionId');
expect(timelineActivities).toHaveProperty('workflowRunId');
expect(timelineActivities).toHaveProperty('rocketId');
expect(timelineActivities).toHaveProperty('petId');
expect(timelineActivities).toHaveProperty('surveyResultId');
}
});
});