enBloc-org / kindly

GNU General Public License v3.0
16 stars 19 forks source link

Add our tests to CI pipeline ๐Ÿงช #273

Closed camelPhonso closed 2 months ago

camelPhonso commented 2 months ago

Expected Behavior

With Storybook now in our stack with component tests via the jest extension, plus the End-to-end testing via Cypress suites, we should run these in our CI pipeline. The simpler set up would be to run all tests for each PR merging into dev

Current Behavior

Tests are only run if developers trigger them manually.

Any other notes

No response

Assignment

This issue is free for anyone to take

mnixo commented 2 months ago

!request

github-actions[bot] commented 2 months ago

๐Ÿค– meep morp!

Thank you for your contribution @mnixo - this Issue is assigned to you as requested โœจ

๐Ÿ”Ž Please keep in mind that in order to give everyone a chance to contribute Issues may be unassigned if they go stale. You will be warned if the Issue is marked as stale at any point.

๐Ÿ”Ž Please review our documentation for guidance on:

๐Ÿ’ก The core team is available for any help and will try to respond to any comments in this Issue or questions on discord as quickly as possible.

Happy coding ! ๐Ÿฆ†

mnixo commented 2 months ago

Storybook facilitates the integration of different types of tests, some of them including:

It is important to note that these tests run in the context of Storybook, so there might be a few caveats.

For future reference, this PR has some exploratory work on how to integrate these in the project's CI.

camelPhonso commented 2 months ago

Closed this one as the PR associated has been merged.

But I'm curious on your take from looking at the user flow tests. To me it looks like having interaction tests for all our components and cypress e2e for the different user stories associated with each Milestone would be the better way to get decent coverage and the user flow stuff seems a bit redundant - specially if it actually ignores the context of the app ๐Ÿค”

mnixo commented 2 months ago

To me it looks like having interaction tests for all our components and cypress e2e for the different user stories associated with each Milestone would be the better way to get decent coverage and the user flow stuff seems a bit redundant - specially if it actually ignores the context of the app ๐Ÿค”

There's definitely a considerable overlap between the two. Having a "real" E2E context (with Supabase) would definitely be better. In this case it seems that the user flow tests are just "as E2E as you can get" just within the Storybook context.