-
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
fbef4c3
fix(send-flow-snap): pass correct displayAvatar param in all UI updat…
hmalik88 0ae8914
chore: update snap shasum
hmalik88 78f694d
test: add tests for various send flow interactions
hmalik88 32213eb
test: update jest config to add svg transformer
hmalik88 13954fa
test: update svg formatting to match tests
hmalik88 5eff5d8
test: fix svg transformer
hmalik88 d227c8b
chore: update snap shasum
hmalik88 75015d3
test: update expected props
hmalik88 eee4f6d
feat: add logic to format address input values in snap simulation
hmalik88 4d8d84f
test: fix typeInField test
hmalik88 7fc149d
test: add address input test for typeInField
hmalik88 4836a54
update shasum
hmalik88 3e0022d
Merge branch 'main' into hm/add-display-avatar-prop
hmalik88 840b778
refactor: add function to process input values, add utility function …
hmalik88 ff79d56
chore: update exports
hmalik88 2a85475
chore: move constant and util to correct locations
hmalik88 27d71b4
refactor: rename const, remove export
hmalik88 5a6a3ce
fix: snap shasum
hmalik88 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 1 addition & 11 deletions
12
packages/examples/packages/send-flow/src/images/jazzicon1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 1 addition & 11 deletions
12
packages/examples/packages/send-flow/src/images/jazzicon2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
packages/examples/packages/send-flow/test/transformers/svgTransformer.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| /** | ||
| * A custom transformer for SVG files in Jest tests. | ||
| */ | ||
| module.exports = { | ||
| /** | ||
| * Process an SVG file for Jest tests. | ||
| * | ||
| * @param {string} sourceText - The content of the SVG file. | ||
| * @returns {object} The transformed code. | ||
| */ | ||
| process(sourceText) { | ||
| return { | ||
| code: `module.exports = ${JSON.stringify(sourceText)};`, | ||
| }; | ||
| }, | ||
|
|
||
| /** | ||
| * Generate a cache key for the transformation. | ||
| * | ||
| * @param {string} sourceText - The content of the SVG file. | ||
| * @returns {string} A cache key for Jest to use for caching purposes. | ||
| */ | ||
| getCacheKey(sourceText) { | ||
| return sourceText; | ||
| }, | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.