twenty/.github/workflows
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
..
actions fix: fix storybook:build cache output path (#5336) 2024-05-08 11:51:09 +02:00
cd-deploy-main.yaml feat(ci): automate CI tags and pass github context (#4652) 2024-03-26 09:01:39 +01:00
cd-deploy-tag.yaml feat(ci): automate CI tags and pass github context (#4652) 2024-03-26 09:01:39 +01:00
ci-chrome-extension.yaml chore: add nx/project.json to twenty-chrome-extension (#5217) 2024-05-06 11:33:48 +02:00
ci-front.yaml Clarify storybook tests (#6073) 2024-06-30 20:02:13 +02:00
ci-release-create.yaml Fix/release workflow (#5802) 2024-06-12 21:11:58 +02:00
ci-release-merge.yaml Fix/release workflow (#5802) 2024-06-12 21:11:58 +02:00
ci-server.yaml feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
ci-test-docker-compose.yaml feat: add SENTRY_RELEASE env (#4912) 2024-04-11 16:53:15 +02:00
ci-utils.yaml Create congratulations bot (#5404) 2024-05-21 22:56:25 +02:00
ci-website.yaml chore: use Nx affected tasks in CI (#5110) 2024-04-30 16:28:25 +02:00
playwright.yml.bak E2E tests (#6717) 2024-08-27 11:07:10 +02:00