Skip to content

build: link stories to unit test to track changes#349

Merged
aldbr merged 2 commits into
DIRACGrid:mainfrom
aldbr:main_FEAT_link-stories-to-jest-tests
May 26, 2025
Merged

build: link stories to unit test to track changes#349
aldbr merged 2 commits into
DIRACGrid:mainfrom
aldbr:main_FEAT_link-stories-to-jest-tests

Conversation

@aldbr
Copy link
Copy Markdown
Contributor

@aldbr aldbr commented May 16, 2025

  • The CI does not identify issues in the stories because they are not really covered
  • Unit tests are not really useful at the moment, because most of the tests are done through cypress, but they are still useful to tests components in isolation (could cover potential cases in extensions)
  • There are a lot of duplications between the stories and the tests and this can be cumbersome for the developers (we actually stopped writing unit tests)

In this PR I link stories to unit tests: developers will have to create stories for their components, and instead of testing the components, we will test the stories.

  • we minimize duplication between stories and unit tests
  • we actually test the stories and prevent breaking them

Update:

  • we only keep stories corresponding to public components (the ones that will be reused by the community): apps and a few shared components. We don't want to make everything public, because it would be too complex to manage (we would need/risk to break the API too often)
  • tests are grouped according to the remaining stories

@aldbr aldbr force-pushed the main_FEAT_link-stories-to-jest-tests branch from 71e62e9 to b3aadbb Compare May 20, 2025 17:47
@aldbr aldbr force-pushed the main_FEAT_link-stories-to-jest-tests branch from b3aadbb to fa1f3e5 Compare May 21, 2025 15:41
@aldbr aldbr force-pushed the main_FEAT_link-stories-to-jest-tests branch from fa1f3e5 to bfed3b8 Compare May 21, 2025 15:45
@aldbr aldbr marked this pull request as ready for review May 21, 2025 15:45
@aldbr aldbr requested a review from ryuwd May 21, 2025 15:45
@aldbr
Copy link
Copy Markdown
Contributor Author

aldbr commented May 22, 2025

It looks like Gubbins extension Tests is failing because of a memory issue that DIRACGrid/diracx-charts#156 would solve.
One train may hide another though 😅

Copy link
Copy Markdown
Contributor

@ryuwd ryuwd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes all look very sensible to me

@aldbr aldbr merged commit 1f2037e into DIRACGrid:main May 26, 2025
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants