-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
test: build test dapp and run tests against localhost #7202
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. Ignoring: Next stepsTake a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with |
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #7202 +/- ##
==========================================
+ Coverage 32.97% 33.08% +0.11%
==========================================
Files 1005 1005
Lines 32649 32649
Branches 8384 8395 +11
==========================================
+ Hits 10765 10803 +38
+ Misses 21884 21846 -38 ☔ View full report in Codecov by Sentry. |
@SocketSecurity ignore-all . Reasons:
|
Kudos, SonarCloud Quality Gate passed! |
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.
Looks good to me, this is a very nice step in the direction where we have less constraints and dependencies with the "outside" when testing. Well done!
NOTE: Added a comment but it's not a blocker for merge. the code works and is consistent with extension, so maybe it's better to keep it like this. Commenting it perhaps a bit more could help though (the comments you added to this PR could be in the code).
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.
👍 great work
thank you v much for your reviews @jpuri @NicolasMassart
This makes a lot of sense and I also see the need to keep things documented. I was thinking maybe to write some documentation around e2e in Mobile, on how to use of fixtures, ganache, contract deployments, and mocking (this is coming very soon) and best practices and we could also have a meeting around that, once the mocking is done, so the infra will be ready. Let me know if that sounds good 🙏 |
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.
Looks good!
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.
Looks good to me.
Description
This PR adds logic for running (one/many) dapp server(s) locally whenever we run the e2e tests. This way we can run the tests in a controlled environment (against localhost) instead of on a live site.
Here some highlights on how it is done (based on existing Extension implementation):
test-dapp
node module andserve-handler
for building a static serverwithFixtures
method, in order to indicate if we want a dapp server and how many(if more than one)dapp: true
to start the test dapp server locallyTest on ci continue to work:
Screenshots/Recordings
Notice how we are now going to
localhost
in the browser for accessing the test dapptest-dapp-e2e-.mp4
Issue
Checklist