twenty/packages
Jérémy M eef7f1661d
feat: add integration tests (#6923)
### Summary

This PR introduces several integration tests, a mix of manually written
tests and those generated using the `generate-integration-tests` Python
script located in the `scripts` folder.

### Tests Added:
- **Authentication tests**: Validating login, registration, and token
handling.
- **FindMany queries**: Fetching multiple records for all existing
entities that do not require input arguments.

### How the Integration Tests Work:
- A `setupTest` function is called during the Jest test run. This
function initializes a test instance of the application and exposes it
on a dedicated port.
- Since tests are executed in isolated workers, they do not have direct
access to the in-memory app instance. Instead, the tests query the
application through the exposed port.
- A static accessToken is used, this one as a big expiration time so it
will never expire (365 years)
- The queries are executed, and the results are validated against
expected outcomes.

### Current State and Next Steps:
- These tests currently run using the existing development seed data. We
plan to introduce more comprehensive test data using `faker` to improve
coverage.
- At the moment, the only mutation tests implemented are for
authentication. Future updates should include broader mutation testing
for other entities.

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-09-20 11:02:52 +02:00
..
twenty-chrome-extension Support for multiple values in the Phone field (#6882) 2024-09-11 11:15:04 +02:00
twenty-docker feat: replace ts-node with tsx and pre-install it globaly in docker (#7027) 2024-09-14 11:05:01 +02:00
twenty-e2e-testing E2E tests (#6717) 2024-08-27 11:07:10 +02:00
twenty-emails 6658 workflows add a first twenty piece email sender (#6965) 2024-09-12 11:00:25 +02:00
twenty-front Fix CSV export missing last page (#7167) 2024-09-20 05:42:59 +02:00
twenty-postgres Check if user wants to run make postgres-on-linux (#6819) 2024-09-04 16:58:54 +02:00
twenty-server feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
twenty-ui feat(invitation): Improve invitation flow - Milestone 2 (#6804) 2024-09-18 23:27:31 +02:00
twenty-utils Fix docs build in CI (#5826) 2024-06-11 19:06:37 +02:00
twenty-website 0.30 changelog (#7126) 2024-09-18 18:40:07 +02:00
twenty-zapier [Fix] Remove usage of deprecated FieldMetadata type probability (#6279) 2024-07-16 11:36:10 +02:00