Daniel
fbbdaf04ed
Increase Jest unit test coverage for the Swaps feature to ~25% ( #10900 )
...
* Swaps: Show a network name dynamically in a tooltip
* Replace “Ethereum” with “$1”, change “Test” to “Testnet”
* Replace 이더리움 with $1
* Translate network names, use ‘Ethereum’ by default if a translation is not available yet
* Reorder messages to resolve ESLint issues
* Add a snapshot test for the FeeCard component, increase Jest threshold
* Enable snapshot testing into external .snap files in ESLint
* Add the “networkNameEthereum” key in ko/messages.json, remove default “Ethereum” value
* Throw an error if chain ID is not supported by the Swaps feature
* Use string literals when calling the `t` fn,
* Watch Jest tests silently (no React warnings in terminal, only errors)
* Add @testing-library/jest-dom, import it before running Jest tests
* Add snapshot testing of Swaps’ React components for happy paths, increase minimum threshold for Jest
* Add the test/jest folder for Jest setup and shared functions, use it in Swaps Jest tests
* Fix ESLint issues, update linting config
* Enable ESLint for .snap files (Jest snapshots), throw an error if a snapshot is bigger than 50 lines
* Don’t run lint:fix for .snap files
* Move `createProps` outside of `describe` blocks, move store creation inside tests
* Use translations instead of keys, update a rendering function to load translations
* Make sure all Jest snapshots are shorter than 50 lines (default limit)
* Add / update props for Swaps tests
* Fix React warnings when running tests for Swaps
2021-04-21 12:34:35 -07:00
Niranjana Binoy
18aa540f42
Adding option to set Custom Nonce to Confirm Approve Page ( #10595 )
2021-04-16 18:00:18 -04:00
Thomas Huang
b99c4fb5cf
Use jest to run ui/**/*.test.js ( #10885 )
2021-04-15 11:01:46 -07:00
Niranjana Binoy
0974709e7c
Refactoring metamask-responsive-ui.spec.js to use fixtures ( #10866 )
2021-04-15 09:58:51 -04:00
ryanml
9e918b6026
Adding recovery phrase video to onboarding process ( #10717 )
...
* Adding recovery phrase video to onboarding process
Adding english subtitles
* Support textAlign in Box, converting sidebar to Box
2021-04-13 15:29:44 -07:00
Brad Decker
57be0e49d1
use waitForSelector instead of until ( #10852 )
...
* complete abstraction of until method
* response to feedback
2021-04-13 16:36:02 -05:00
Brad Decker
2f4e377cf5
add key literals to driver ( #10854 )
2021-04-12 10:32:38 -05:00
Thomas Huang
f7f1f28752
Adjust renderWithProvider to accommodate redux-less components ( #10857 )
2021-04-09 08:59:32 -07:00
Niranjana Binoy
8df7a712f3
Refactoring threebox.spec.js to use fixtures ( #10849 )
2021-04-08 19:53:18 -04:00
Brad Decker
9079fb87ec
add abstraction for waitForSelector ( #10844 )
2021-04-08 10:41:23 -05:00
Brad Decker
cd97340bb8
use locator abstraction in tests folder ( #10833 )
2021-04-07 09:57:40 -05:00
Niranjana Binoy
d1d7622c93
Refactoring signature-request.spec.js to use fixtures ( #10820 )
2021-04-07 10:18:20 -04:00
Niranjana Binoy
501829e5ca
Refactoring permissions.spec.js to use fixtures ( #10829 )
2021-04-06 17:11:22 -04:00
Niranjana Binoy
dc1a036786
Removing unnecessary params from withFixtures function call. ( #10831 )
2021-04-06 13:39:28 -04:00
Niranjana Binoy
966b2dcb43
Refactoring send-edit.spec.js to use fixtures ( #10792 )
2021-04-04 15:06:26 -04:00
Niranjana Binoy
044949f8e1
Refactoring address-book.spec.js to use fixtures ( #10804 )
2021-04-02 22:40:53 -04:00
Brad Decker
097439eda3
Add support for locators into driver abstraction ( #10802 )
2021-04-02 14:45:11 -05:00
Niranjana Binoy
e63fcf1e30
Refactoring ethereum-on.spec.js to use fixtures ( #10778 )
2021-03-31 13:06:44 -04:00
Dan J Miller
9573aa7515
Update @metamask/controllers to v6.2.1 ( #10701 )
2021-03-25 17:37:52 -02:30
Brad Decker
5a233e4634
colocate tests in flat structure ( #10655 )
2021-03-16 16:00:08 -05:00
Dan J Miller
153bbc6053
Move swaps constants to the shared constants directory ( #10614 )
2021-03-15 10:51:35 -02:30
Brad Decker
3d4dfc74a8
prefer chainId over networkId in most cases ( #10594 )
2021-03-12 16:23:26 -06:00
Brad Decker
2ed5bafa11
remove transactionCategory in favor of more types ( #10615 )
...
* remove transactionCategory in favor of more types
* remove reference to STANDARD in stubs
2021-03-10 14:16:44 -06:00
Erik Marks
a29fc51838
Ensure permission log will only store JSON-able data ( #10524 )
2021-03-10 11:50:06 -08:00
Brad Decker
aa37e30c08
use etherscan-link for account-link ( #10590 )
2021-03-10 11:21:52 -06:00
David Walsh
92680cf56f
Add support for multiple Ledger & Trezor hardware accounts ( #10505 )
2021-03-09 14:39:16 -06:00
Thomas Huang
3ba91df387
Unifies unit tests filename suffix to .test.js ( #10607 )
...
* Unifies the filename suffix to .test.js
* Display @babel/no-invalid-this rule for tx-controller.test.js
* Add test file extension to test:unit:global
2021-03-09 11:08:06 -08:00
Dan J Miller
c86ceacfd9
Standard reference to ETH_SWAPS_TOKEN_ADDRESS via ETH_SWAPS_TOKEN_OBJECT.address ( #10613 )
2021-03-09 12:29:35 -03:30
Brad Decker
3840a58e82
use metamask/etherscan-link ( #10580 )
2021-03-04 12:16:33 -06:00
Brad Decker
e42658b590
cache balances by chain id ( #10545 )
2021-03-02 16:53:07 -06:00
Brad Decker
616b71271a
add chainId to all new transaction metadata ( #10528 )
2021-03-01 09:15:42 -06:00
Brad Decker
caa32d87fb
key tokens by chainId ( #10510 )
2021-02-26 09:40:25 -06:00
Brad Decker
15d78b8158
use chain id for enabling ENS IPFS resolution ( #10507 )
2021-02-25 05:40:57 -06:00
Shane
e3084b87cc
fix: manually connect accountsChanged ( #10477 )
...
fixes #9933
2021-02-19 09:48:49 -08:00
Brad Decker
4c5edea294
fix contract exchange rate race condition ( #10414 )
2021-02-12 11:41:53 -06:00
Erik Marks
e48053a6d5
Add custom network RPC method ( #9724 )
...
Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com>
Co-authored-by: Brad Decker <git@braddecker.dev>
2021-02-12 09:25:58 -06:00
Brad Decker
19fa2f5962
cancel unapproved confirmations on network change ( #10357 )
2021-02-08 17:22:30 -06:00
Thomas Huang
418662c365
Move ganache server from test setup to individual test file. ( #9703 )
2021-02-04 10:50:58 -08:00
Erik Marks
76a2a9bb8b
@metamask/eslint config@5.0.0 ( #10358 )
...
* @metamask/eslint-config@5.0.0
* Update eslintrc and prettierrc
* yarn lint:fix
2021-02-04 10:15:23 -08:00
kumavis
b98cef16af
Update to Node v14 ( #9514 )
...
* manual rebase against develop
* Update .nvmrc
2021-02-03 13:45:38 +08:00
Thomas Huang
99b6fee0ed
Stub out background and bg methods in actions test ( #10321 )
...
Move from using the backgound/metamask-controller instance to a stubbed/mocked out verison of the background methods.
2021-02-02 00:55:12 -08:00
Mark Stacey
f381f41cb2
Fix network dropdown button ( #10312 )
...
This fixes a bug where the network menu would remain present after a
second click on the network menu button. The bug was caused by the
click being handled _twice_, by two separate handlers. First it was
caught by the external click handler of the dropdown menu, which closed
the menu. Second, it was caught by the network button itself, which re-
opened the menu. This all happens quickly enough that to the user it
appears to stay open.
The external click handler of the menu now only fires if the menu is
open. Additionally, any click that is caught by the network menu is
stopped from propagating further, so that it can't trigger additional
click handlers.
2021-01-30 12:12:55 -03:30
Brad Decker
3806e0a2a6
Refactor NetworkDisplay, ConnectedStatusIndicator, etc to use ColorIndicator ( #10214 )
2021-01-27 10:51:59 -06:00
Alex Donesky
569672027c
Allow editing transaction amount after clicking max ( #10278 )
2021-01-27 13:13:28 -03:30
Thomas Huang
1dad4abfdc
Fix site metadata JSON-RPC handler ( #10243 )
...
* Fix getting the site metadata from the request origin params.
Regressed from inpage-provider ts migration the request. The property domainMetadata is now set as a params key for the request.
https://github.com/MetaMask/inpage-provider/blob/v7.0.0/src/siteMetadata.js#L19-L25
vs
https://github.com/MetaMask/inpage-provider/blob/main/src/siteMetadata.ts#L19-L27
* Change hardcoded mocked response of the request to the prod response.
2021-01-22 10:27:07 -08:00
Erik Marks
30ff153103
eth-rpc-errors@4.0.2 ( #10226 )
2021-01-20 22:06:41 -08:00
Erik Marks
4fef2b7443
Add MAX_SAFE_CHAIN_ID and refactor chain ID validation ( #10224 )
...
* Add MAX_SAFE_CHAIN_ID constant
* Add isSafeChainId to shared utils module
* Move isPrefixedFormattedHexString to shared utils module
* Validate custom RPC chain IDs in network controller
* Update some network controller error messages.
* Add isSafeChainId validation to UI
2021-01-20 15:37:18 -08:00
Erik Marks
7077ee68dc
Add NETWORK_TYPE_RPC constant ( #10203 )
...
* Refactor network display props
* Add NETWORK_TYPE_RPC constant
* Consolidate network constants
2021-01-20 08:49:05 -08:00
Erik Marks
90289ec22a
Further improve organization of constants ( #10200 )
2021-01-20 08:13:14 -08:00
Erik Marks
7159dd6867
Fetch with a timeout everywhere ( #10101 )
...
* Use fetchWithTimeout everywhere
* Memoize getFetchWithTimeout
* Require specified timeout
2021-01-19 08:41:57 -08:00