-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial steps into E2E testing #51
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @rajbos! I think is a great idea. I have been thinking for a while how to manage the tests for this project as this can be a tricky think soon if more people want to collaborate (#10).
Thank you so much for take the initiative in this matter! The unit testing in this scenario is quite limited as there are many things that we can't control or mock in terms of execution and so on, so E2E tests this way seems like a good approach.
I will love to add some Jest tests that can be executed as an step in each scenario that we want to cover, to avoid the need to manually review the artifacts that we are creating when we run the gh action. But I can work on that in a separate PR to don't block your changes.
on: | ||
push: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can define the scope this way, but maybe we can leave the pull_request
open to all scenarios and not only against main
branch
on: | |
push: | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main |
@@ -0,0 +1,162 @@ | |||
name: Test the action |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will love to have more descriptive name and emoji if possible 🤣
name: Test the action | |
name: ☕️ E2E Tests |
I used this workflow to test my changes, so I could visually see the results of the report. You can see it as an integration test to validate if the changes actually work. Unit testing is level 1, and then this is one level up. This saved me time, since I didn't have to trigger another workflow that uses my version of the action (and then trigger it with every change I made).