-
Notifications
You must be signed in to change notification settings - Fork 639
fix(send-flow-snap): add missing displayAvatar props, add tests, update snaps-simulation
#3312
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3312 +/- ##
=======================================
Coverage 97.79% 97.80%
=======================================
Files 363 364 +1
Lines 9893 9911 +18
Branches 1613 1616 +3
=======================================
+ Hits 9675 9693 +18
Misses 218 218 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Updated the formatting for this SVG (and the ones below) to a consistent flat format since jest flattens it and the SVG transformer picks up the file content with format.
| // Transform SVG files using our custom transformer | ||
| transform: { | ||
| ...baseConfig.transform, | ||
| '\\.svg$': '<rootDir>/test/transformers/svgTransformer.js', |
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.
Needed to write a transformer for jest to be able to handle SVGs.
displayAvatar props displayAvatar props, add tests, update snaps-simulation
packages/examples/packages/send-flow/test/transformers/svgTransformer.js
Show resolved
Hide resolved
…and tests for printing error messages, add const for tracking typeable inputs
The send-flow example snap is only passing the
displayAvatarprop in thetoscenario but not in the others. This can land you in a situation where you paste a valid address in the to field, start to type an amount in the amount field, then the avatar disappears because nodisplayAvatarprop is being passed.Summary of changes
onUserInputcode to properly pass thedisplayAvatarprop in all scenarios.typeInFieldinsnaps-simulationso that it properly attaches thechainIdto the input value.