twenty/packages/twenty-server/test/integration/graphql
gitstart-app[bot] bf0a059751
[Server Integration tests] Enrich integration GraphQL API tests #3 (#7931)
This PR was created by [GitStart](https://gitstart.com/) to address the
requirements from this ticket:
[TWNTY-7526](https://clients.gitstart.com/twenty/5449/tickets/TWNTY-7526).

 --- 

### Description

NoteTargets and MessageThreads are special cases because they do not
have a notable property that we could use in "update" the test cases,\
for NoteTargets we are using the personId, testing the relation, but for
MessageThreads we are using updatedAt. To test the relations for
MessageThreads\
we would need to update another object (Message) because the relation is
ONE_TO_MANY, updating another object in a test that would update the
current tested object sounds incorrect.\
In the NoteTargets, we can update the NoteTarget object because the
relation is MANY_TO_ONE\
for some tests we need an account ID, we are using Tim's account for all
the tests (the token in jest-integration.config.ts), so we are using a
constant to use the account ID

### Refs

#7526

### Demo


![](https://assets-service.gitstart.com/28455/7f1c520e-78e4-43c3-aa89-f6fc09e0a056.png)

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: gitstart-twenty <140154534+gitstart-twenty@users.noreply.github.com>
2024-10-22 10:17:10 +02:00
..
codegen [Server Integration tests] Enrich integration GraphQL API tests (#7699) 2024-10-17 19:16:19 +02:00
suites [Server Integration tests] Enrich integration GraphQL API tests #3 (#7931) 2024-10-22 10:17:10 +02:00
utils [Server Integration tests] Enrich integration GraphQL API tests (#7699) 2024-10-17 19:16:19 +02:00
integration.constants.ts [Server Integration tests] Enrich integration GraphQL API tests #3 (#7931) 2024-10-22 10:17:10 +02:00