Skip to content
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

ci: add e2e tests for multi-example app #120

Merged
merged 14 commits into from
Oct 5, 2024
Merged

Conversation

bidodev
Copy link
Contributor

@bidodev bidodev commented Sep 29, 2024

Closes: #111

  • Playwright installation and dependencies configured
  • Chromium browser installation included
  • Github Action
  • Artifacts upload for test results
  • Playwright tests added

@gioboa
Copy link
Collaborator

gioboa commented Sep 29, 2024

@bidodev that's perfect 👍 what's the benefit to upload the artifacts at the end of the GH action?

@bidodev
Copy link
Contributor Author

bidodev commented Sep 29, 2024

@gioboa This can be useful for debugging in case of test failures. I adjusted it to upload only when a test fails, and retain only for 3 days, does it work for you?

@gioboa
Copy link
Collaborator

gioboa commented Sep 29, 2024

Can we download an use the artifact locally? If yes, this could be amazing because we can have a preview package after each commit. We can test things easily by linking it

@bidodev
Copy link
Contributor Author

bidodev commented Sep 30, 2024

@gioboa I'm not sure if I understood correctly. When a test fails, Playwright creates a trace, one can download them and then replay the trace either offline or online using tools such https://trace.playwright.dev/, doing so, one can see where it failed. More info: https://playwright.dev/docs/trace-viewer.

Your idea is to check if the integration was successful after every commit, e.g., by running all the e2e tests locally in the pre-commit phase?

@gioboa
Copy link
Collaborator

gioboa commented Sep 30, 2024

I see. The PR is perfect, the idea is to run e2e tests after each commit to guarantee the solidity of the codebase.

@bidodev
Copy link
Contributor Author

bidodev commented Sep 30, 2024

Hey @gioboa II’ve added the option in the pre-hook commit to run all the tests against the multi-example. For the other examples, I would run them on every pull request and on the main branch.

However, I have a couple of questions. When I ran pnpm dev-nv, what is the expected result? Does this example work? I only see this:

image

And also for the rust-vite example, I keep getting this error: https://github.com/bidodev/vite/actions/runs/11113332073/job/30877425804
Any idea what could it be?

@gioboa
Copy link
Collaborator

gioboa commented Sep 30, 2024

Based on this issue #73 I think the nuxt example is not working fine.
Is rust-vite example working in your local env?

@gioboa gioboa changed the title WIP: feat: add e2e test with Playwright and add basic tests feat: add e2e test with Playwright and add basic tests Oct 5, 2024
@gioboa
Copy link
Collaborator

gioboa commented Oct 5, 2024

@bidodev we need e2e tests to prevent regressions so I completed this PR.
Basically I restricted the test to the multi-example app.
We really appreciated your help. Thanks 🚀

@gioboa gioboa changed the title feat: add e2e test with Playwright and add basic tests test: add e2e tests for multi-example app Oct 5, 2024
@gioboa gioboa changed the title test: add e2e tests for multi-example app ci(test): add e2e tests for multi-example app Oct 5, 2024
@gioboa gioboa changed the title ci(test): add e2e tests for multi-example app ci: add e2e tests for multi-example app Oct 5, 2024
@gioboa gioboa merged commit dd525d8 into module-federation:main Oct 5, 2024
4 checks passed
@bidodev
Copy link
Contributor Author

bidodev commented Oct 5, 2024

Hey @gioboa thanks for finalizing the MR, I got a flu / covid and couldn't finish it 🥲

@gioboa
Copy link
Collaborator

gioboa commented Oct 5, 2024

Get well soon 💪
I'm looking forward to collaborating with you again.

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.

feat: add e2e tests based on the examples
2 participants