1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 03:12:42 +02:00
Commit Graph

2333 Commits

Author SHA1 Message Date
Bowen Sanders
7a421e05c3
[FLASK] Snaps e2e test stability improvements (#18090)
* waitForSelector and pasteIntoField used now
2023-03-15 10:03:01 -07:00
Mark Stacey
bd23a49013
Revert "Moved subscribe and filter into network controller (#16693)" (#18129)
* Revert "Moved subscribe and filter into network controller (#16693)"

This reverts commit 6f6984fa58. That
commit was an RPC middleware refactor intended to move the subscribe
and filter middleware into the network controller, to simplify the
process of sharing this middleware between clients.

This refactor resulted in `eth_subscribe` notifications being sent on
the wrong connections, causing the UI to break in some cases (the UI
`provider` connection does not support notifications). This happened
because the `setupProviderEngine` function runs per-connection,
whereas the engine setup inside the network controller is global. The
global network client cannot support notifications because it has no
way to route them; they'll need to stay in the per-connection provider
engine.

Closes #17467

* Add e2e test

An e2e test has been added that confirms subscriptions are only
broadcast to the site that registered them. This test fails on
`develop`.
2023-03-15 12:16:31 -02:30
Peter
7215fc25a4
Move nft e2e tests to main e2e test job (#18055)
* NFTs: Remove feature flag for release

* Update security tab jest test

* Fix broken test

* Update snapshot

* Update test

* Fix test

* remove nft build

* move tests to main e2e job

* remove nft scripts

* remove test for nft build

---------

Co-authored-by: David Walsh <davidwalsh83@gmail.com>
2023-03-14 15:21:24 +00:00
vthomas13
bfefa35811
Adding NFT autodetection to "What's New" Announcements (#17653)
* adding base what's new for NFT autodetection

* lintfix

* Adding nfts svg image

* adding new notification to fixture builder for e2e

* lint:fix

* Adding new messaging, styling what's new

* styling descriptions, increasing fullscreen height

* applying firstNotification styling to NFT whats new announcement

* adding scrollDown button to whats new popup

* adding Opensea announcement, removing old announcement, moving scrollDown button up to popover component

* verify-locales:fix

* updating icon
2023-03-14 11:07:58 -04:00
seaona
93be4810b9
Fix typo on test file (#18124) 2023-03-14 12:48:14 +01:00
seaona
b8ec3623ff
[e2e] ENS test improvement - with network controller fixture (#18119)
* With network controller fixture

* fix lint
2023-03-14 12:47:54 +01:00
flexa-rob
e7527b65ee
17921 Update TransactionAlerts with BannerAlert (#17940)
* use banner alerts

* update selector for banner alert content

* lintage

* update button click for banner alert structure

* bump global branches coverage target

* removed unnecessary Typography usage

* remove Typography usage

* transaction alerts story

* pending transaction alerts

* created separate stories for each alert scenario
2023-03-13 12:29:10 -07:00
Vladimir Saric
14b1555ee3
Display internet protocol on the domain in SIWE screen (#18052) 2023-03-13 21:40:43 +04:00
Peter
0fca0e3542
Use deployed contracts in fixtures (#18107)
* substitute smart contact address in fixtures

* add smart contract fixtures

* rename fixture

* leverage fixture to import erc1155

* leverage fixture to import erc721

* fix flaky test
2023-03-13 14:31:14 +00:00
chloeYue
11c79dd629
Add e2e tests approval for all for erc1155 token (#18047)
add tests approval for all
2023-03-10 15:04:45 +01:00
David Walsh
d6e61e9d07
Fix #17948 - Allow editing of NFT sends (#17970) 2023-03-09 15:02:08 -06:00
Alex Donesky
23ca4460cf
Migrate network configurations (previously frequentRpcListDetail) from PreferencesController to NetworkController (#17421) 2023-03-09 15:00:28 -06:00
seaona
8e9fe07648
[e2e] Check ENS resolves correctly (#18056)
* ENS resolves correctly

* Fix flaky test on firefox
2023-03-09 14:37:29 +01:00
Jyoti Puri
0ac54e40ee
Extract out confirm-data and confirm-hex-data components from confirm-transaction-base.component.js (#17822) 2023-03-09 10:38:37 +05:30
David Walsh
de83546d6d
Fix #17932 - Ensure NFT last sold price is formatted correctly (#17983)
* Fix #17932 - Ensure NFT last sold price is formatted correctly

* Fix storybook

* Update snapshot to include pricing
2023-03-08 14:39:12 -06:00
Hassan Malik
7086494b72
[FLASK] BREAKING - snaps-monorepo@0.30.0 (#17718)
* updated snap permission to wallet_snap, updated tests and added migration

* updated snap packages

* yarn.lock fix

* fixed errors

* override policy

* update policy

* undo override

* updated localization message descriptions

* updated lavamoat policy

* more policy updates

* update permission controller version

* update policy

* update fixture builder

* updated code to include permission value to satisfy wallet_snap permission description call

* fix import issue

* update test-snaps version

* added missing actions, added snap permission dedupe function

* prettier fix

* fix fencing

* add more fencing

* prettier fix

* fix fencing (again)

* added new action and selector and updated view snap accordingly

* update test snaps website version

* unfence request variable

* add fencing

* add optional chaining to fix type error

* update migration #

* remove old migration

* prettier fix

* fix migration test

* fix fencing

* added missing fencing

* updated code to workaround fencing

* update test-snaps site version and remove snap confirm test

* update snap packages

* update policies

* fix merge marker issue

* update test

* more fixes

* fix permissions

* update test

* fixed test

* Bump test-snaps and iframe-execution-environment

* remove unused snap permission from fixture builder

* update policies

* undo comment removal, update selector implementation

* removed unnecessary function, updated migration, updated caveat action

* remove optional chaining

* fix type issue

* more type fixes

* fix migration test

* remove isFlask check, make migration logic more robust

* update coverage

* Update LavaMoat policies

* Update test/e2e/snaps/enums.js

* add extra bail condition

* Revert "add extra bail condition"

This reverts commit b45c53dcfc6e6e35a5e283d4955d6d6ea9ca5965.

* Revert "Revert "add extra bail condition""

This reverts commit cd2ded677935c9cdab0c02b6af55474c83727f60.

* fix test

* add SnapController entry to state object

* updated permission name and caveat type with hardcoded values

* add extra test for non-flask scenario

* update lavamoat policies

* fix locale messages

* change coverage target

* re-enable rpc snap test

* revert locale message change

* fix el message

* reverted changes

---------

Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
2023-03-08 13:29:23 -05:00
dzfjz
3a3e34a8c6
Test for transaction security provider (#18000)
* Removed a feature flag

* Add test for transaction security provider

* add rest of the test cases for transaction security provider

* change code

---------

Co-authored-by: Filip Sekulic <filip.sekulic@consensys.net>
2023-03-08 18:48:57 +01:00
witmicko
75801e9502
delay chain validation (#17413) 2023-03-08 16:33:27 +00:00
Danica Shen
b231b091b9
fix(17542): fix fiat currency display in few txn actions (#18011)
* fix(17542): fix fiat currency display in few txn actions

* fix(17542): refactor e2e tests to change to fia via fixture builder
2023-03-08 16:05:55 +00:00
Peter
5c30fee59a
remove extraneous arg from clickElement (#18050) 2023-03-08 13:17:56 +00:00
Thomas Huang
38e2a25690
E2E custom rpc test fix (#17918) 2023-03-07 14:24:01 -08:00
Davide Brocchetto
03732af6f4
Added e2e swap test and fixed mocked API (#17934)
* Added test for submitting second swap without waiting for first one to finish

* Added more test code

* Removed look around Review Swap button

* Added test verification for the transaction details

* Changed mocked API for token import

* Added assert error messages

* Fixed lint errors

* Removed empty lines and improved coding consistency

* Removed empty lines
2023-03-07 16:51:15 +01:00
Thomas Huang
786a74dbbc
Fix nft test state (#17981) 2023-03-07 08:46:02 -06:00
weizman
f46ce9f2bd
Improve downloads tests (#17995) 2023-03-07 02:00:52 +02:00
chloeYue
c8e8db2666
Stabilize nft e2e tests (#18006) 2023-03-06 15:18:09 -06:00
HowardBraham
694773f17a
Upgrading the Import Account modal (#17763)
Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
Co-authored-by: NidhiKJha <nidhi.kumari@consensys.net>
Co-authored-by: montelaidev <monte.lai@consensys.net>
2023-03-06 09:48:28 -08:00
chloeYue
4e807a967a
e2e test view erc1155 details (#17942) 2023-03-06 16:04:53 +01:00
Danica Shen
47d9964a89
fix(17857): show correctly converted account balance in sign&encrypt windows (#17973)
Co-authored-by: Dan J Miller <danjm.com@gmail.com>
2023-03-04 12:14:20 +00:00
Erik Marks
90ae4980b3
Update snaps locale messages for casing and content (#17915)
* Update snaps locale messages for casing and content

* Fix non-English locales

* udpate e2e test

---------

Co-authored-by: Guillaume Roux <guillaumeroux123@gmail.com>
2023-02-28 19:21:33 +01:00
chloeYue
9e7bc210a2
Add e2e test remove erc1155 token (#17925)
* add e2e test remove erc1155 token
2023-02-28 15:25:18 +01:00
chloeYue
5419f9414c
Add unhappypath test case for importing ERC1155 (#17923)
* add unhappypath test case for importing ERC1155 token
2023-02-28 15:23:06 +01:00
Bowen Sanders
e015e027b6
[FLASK] Create E2E test for cronjobs (#17365)
* added long test

* Wait for a maximum of 65 seconds, not a hardcoded length

* Fix lint

---------

Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
2023-02-28 14:07:00 +01:00
Mark Stacey
e223348fb3
Update eth-json-rpc-middleware from v9 to v10 (#17591)
This release only includes one breaking change, which is the renaming
of the package to be under the `@metamask` scope. It includes
improvements to the types that will unblock migrating our network
clients to TypeScript.
2023-02-27 13:19:08 -03:30
Thomas Huang
ddbd158e79
ERC1155 Import & Dapp interaction E2E tests (#17885) 2023-02-27 10:48:41 -06:00
Filip Sekulic
932282e638
What's new - OpenSea security provider (#16831) 2023-02-27 10:20:22 -06:00
Niranjana Binoy
bc19856d5d
Transaction-list-item-details pop up to display the correct token information on token approve item (#17422) 2023-02-24 14:21:55 -05:00
Jyoti Puri
1c0ff8a6e8
Fix state in confirm transaction (#17838) 2023-02-24 22:37:26 +05:30
Mark Stacey
2ccc1977bf
Update the PhishingController to v2 and update phishing warning page (#17835)
The PhishingController has been updated to v2. This release should
dramatically reduce network traffic and double the update speed of the
phishing list.

This was accomplished by combining both of our phishing configurations
into one list (the "stalelist"), then creating a separate list of the
changes just the past few days (the "hotlist"). Now users will download
a smaller list more frequently (every 30 minutes rather than every
hour), whereas the full list is only updated every 4 days.

The combined configuration means that we no longer know which list was
responsible for each block. The phishing warning page has been updated
to dynamically look this information up, to ensure users are still
directed to the correct place to dispute a block. This update to the
phishing warning page also includes the recent redesign.
2023-02-24 11:39:00 -03:30
chloeYue
ababfec767
Add e2e test view nft details (#17852)
* e2e view nft details
2023-02-24 15:34:32 +01:00
chloeYue
a93a3d4966
e2e test remove nft (#17896) 2023-02-24 15:32:50 +01:00
João Tavares
bde74756d3
Add extension desktop UI (#17748)
* feat: add desktop enable button component

This component will be added
to the experimental page. Users
will then be able to initialize
a desktop connection

* feat: add desktop pairing page

* feat: add desktop deep-linking shared lib

* test: add initial entries to render helper

Allow specifying initialEntries for
MemoryRouter. This change will allow
testing pages that use the useParam
hook.

* feat: add desktop error page

Error page for any desktop pairing
related issue

* feat: add desktop routes to route component

* feat: add enable desktop button to experimental tab

* feat: add desktop icon when paired in dev mode

* feat: disable ledger live control when desktop enabled

* feat: register desktop error actions on ui init

* fix: add missing code fencing

* chore: remove enable desktop rpc middleware

Now that we are adding the UI
there's no need for this rpc middleware
(as it was used to test desktop background
code)

* fix: display experimental tab for desktop
2023-02-23 16:39:48 +00:00
Peter
32b9237df3
Capture all Error console.log events (#17710)
* Capture all Error console.log events

* throw early

* Update metamask-ui.spec.js

* Update init-load-stats.js
2023-02-23 14:27:36 +00:00
chloeYue
84aff7c517
Add e2e test sign in with ethereum (#17823)
* add e2e test siwe
2023-02-21 22:55:47 +01:00
David Walsh
1e5f9da592
MenuItem: Fix layout of menu item with subtitle (#17650) 2023-02-21 09:50:54 -06:00
David Walsh
24e0a9030b
UX: Move Portfolio link to its own button (#17722) 2023-02-21 09:32:08 -06:00
Matthew Walsh
cc99a25228
Add desktop support (#17683)
Use DesktopManager in background script to redirect internal and external connections to the desktop app.
Include DesktopController in the MetaMask controller.
Support desktop keyrings in MetaMask controller via the overrides object.
Create middleware handler to connect to the desktop app while UI code is pending.
Add build system support for desktop specific configuration variables.
2023-02-20 17:13:12 +00:00
Nidhi Kumari
33cc8d587a
NFT: Replaced all the instances of collectibles with NFTs (#17741)
* replaced all the instances of collectibles with nfts

* updated actions

* updated e2e seeder

* updated confirm Approve test

* updated test dapp change

* updated test dapp change

* nit fix

* nit fix

* updated casing and snapshots

* updated casinG

* added migrations

* updated ,igration

* updated 078.test

* updated tests for 078 migration

* updated migration

* updated 078 index.js
2023-02-17 00:53:29 +05:30
David Walsh
4dcb639652
UX: Icons: Remove usage of chevron fa- icons (#17668) 2023-02-16 07:26:14 -06:00
Maarten Zuidhoorn
f20d5db1e4
[FLASK] Temporarily disable JSON-RPC snap e2e test (#17778)
* Temporarily disable JSON-RPC snap e2e test

* Update outdated snapshot
2023-02-16 10:35:11 +01:00
David Walsh
fca2a3f97f
UX: Update three-dot icon for settings (#17558) 2023-02-15 08:39:46 -06:00
Thomas Huang
4735978b8d
Removal of enzyme pkge dep (#17261)
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2023-02-14 12:14:00 -06:00
Elliot Winkler
c36438868d
Disable typechecking while running Mocha tests (#17701) 2023-02-12 14:34:35 -07:00
amerkadicE
1ecf241a9f
Rename reset account settings (#17457)
* Rename reset account settings

Fix snapshot

Update snapshots

Fix e2e tests

Fix e2e tests

* Rename reset-account e2e test to clear-activity e2e test
2023-02-10 22:50:12 +01:00
Peter
c00f74e95e
e2e multiple reports (#17715)
* multiple reports

* fix run all

* clean up report
2023-02-10 19:34:01 +00:00
Nidhi Kumari
9b0e71f27f
Updated messages/strings to replace Collectibles with NFTs (#17659)
* updated json files to use NFT

* Update locale strings

* fixed lint errors

* updated json files

* updated removeCollectibleMessage and newNftAddedMessage

* updated test for nfts
2023-02-10 21:06:58 +05:30
Dan J Miller
c3100d8fe4
Ensure simulation failure warning is shown on all networks and accounts (#17458)
* Ensure simulation failure warning is shown on all networks and accounts

* Add e2e test to cover failure warning behaviour on non-eip-1559 network

* Fix new e2e test
2023-02-10 11:45:54 -03:30
seaona
1dbacc2826
e2e Send to Multisig Wallet (#17565)
* e2e Send to Multisig Wallet

* Update test-dapp dependency to 5.4.0

* Added test-dapp update version to yarn lock

* disable ff

---------

Co-authored-by: Pedro Figueiredo <pedro.figueiredo@consensys.net>
2023-02-10 15:35:45 +01:00
Elliot Winkler
7e97ff2be4
Expand network controller unit test coverage (#17498)
The network controller has some tests, but they are incomplete and don't
follow our latest best practices for writing unit tests.

This commit greatly increases the amount of test coverage for the API
that we want to retain in NetworkController, in particular the seemingly
myriad paths that the code takes starting from `initializeProvider`,
`resetConnection`, `setRpcTarget`, `setProviderType`,
`rollbackToPreviousProvider`, and `lookupNetwork`.

There were a couple of pieces of logic I noted which don't seem to have
any effect due to being redundant or unreachable, but they also don't
make our lives more difficult, either, so I opted to leave them in.

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
Co-authored-by: Zachary Belford <belfordz66@gmail.com>
2023-02-08 13:10:04 -07:00
Nidhi Kumari
3be1fc6d0c
converted collectibles files to nfts (#17658)
* converted collectibles files to nfts

* updated relative import for scss

* updated scss for pages
2023-02-08 20:04:56 +05:30
Peter
523c90ade9
E2e test insights (#17535) 2023-02-08 08:34:44 -06:00
Ariella Vu
b5c1de900d
Refactor ConfirmTransaction to Functional Component (#17473)
* ConfirmTransaction: rm unused metricEvent context

* ConfirmTransaction: rm unused mapToProps props:
- unapprovedTxs
- id

* ConfirmTransaction: convert to FC

* ConfirmTransaction: use const ORIGIN_METAMASK

* ConfirmTransaction: rm mapStateToProps

* ConfirmTransaction: mv confirm-transaction ducks

* ConfirmTransaction: mv getContractMethodData duck

* ConfirmTransaction: rm container file

* ConfirmTransaction: use ORIGIN_METAMASK const

* ConfirmationTransaction: add tests

* ConfirmTransaction: update jest mock after merge

* tests: update snapshot after mock-state updates
2023-02-08 18:00:25 +07:00
chloeYue
82983694fe
Add e2e test: send nft (#17638)
* add e2e test send nft
2023-02-07 23:34:04 +01:00
Thomas Huang
14efbf1eea
Collectible Unit Tests (#17632)
* Add ipfs gateway and collectible state to mock-state.json

* Add collectible-default-image test with snapshot and testids

* Add Collectible Details test, snapshot, and test-ids

* Add Collectible Options tests and test-ids

* Add Collectible Items test and test-ids.

* Add more tests to Add Collectible component

* Update Security Tab snapshot with ipfs gateway state value

* Add data-testid to Menu component for menu background

* Lint

* Bump coverage targets

* Remove commented import

---------

Co-authored-by: David Walsh <davidwalsh83@gmail.com>
2023-02-07 12:06:37 -06:00
Bowen Sanders
0ffd548ff9
[FLASK] Create E2E test for RPC endowment (#17525)
* create e2e test
2023-02-06 09:54:07 -08:00
Harry
b4ecc4c3f5
Disable eth_sign by default, allow users to toggle it back on (#17308)
* Added translation for eth sign toggle

* Disabled the ability to call eth_sign by default. Added ability within advanced settings to renable support for eth_sign

* Add test case for eth_sign being enabled and disabled

* Modified copy

* Moved rpc method preference to its own object within store

* Complete work on moving rpc method preference into its own object within store

* Fix with prettier

* Fix lint

* Fix a unit test

* Fix test

* Renamed function and object keys to be more intuitive

* Fix e2e test

* Enabled eth_sign through preferences fixture

* Fix lint

* Fix e2e test

Wait for the notification popup to close, leaving 2 window handles the extension and the test dapp

* Fix e2e test

* Fix unit test

Enable eth_sign method

* Lint fix

---------

Co-authored-by: PeterYinusa <peter.yinusa@consensys.net>
Co-authored-by: Dan J Miller <danjm.com@gmail.com>
2023-02-06 13:17:50 -03:30
Brad Decker
14f3e16991
decrease coverage threshold that requires bump (#17544) 2023-02-02 16:43:55 -06:00
Danica Shen
f3c00c65d0
fix: fix non-critical warning in tests (#17567) 2023-02-02 20:37:53 +00:00
chloeYue
024ff1e384
Add e2e test: import nft (#17543)
* add e2e test import nft
2023-02-02 20:01:41 +01:00
chloeYue
812b57dcaf
Add e2e test: add custome network during onboarding (#17436)
* e2e test add custome network during onboarding
2023-01-31 13:58:39 +01:00
ryanml
8a7c897a1c
Update copy when revoking setApprovalForAll (#17500) 2023-01-31 04:27:41 -07:00
Peter Yinusa
245c32a99e
Nft build for e2e tests (#17430) 2023-01-27 12:45:35 -06:00
Dan J Miller
7a77c82514
Use network provider state, instead of CurrencyRateController state, to select 'nativeCurrency' (#17450)
* Use network provider state, instead of CurrencyRateController state, select 'nativeCurrency'

* Fix unit tests

* Lint fix

* Only use the network provider ticket for the native currency when useCurrencyRateCheck is false

* Fix unit test

* Fix tests for real
2023-01-27 13:47:47 -03:30
dzfjz
abb2532a3b
[e2e]Add e2e test for deleting custom network (#17254)
* add test for deleting added custom network

* update code because of failing on firefox browser

* changing steps for adding custom network

* chage code for custom network
2023-01-27 16:50:08 +00:00
David Walsh
29d4799f46
Fix #17388 - Remove dismiss button from NFT notification (#17389) 2023-01-25 13:28:15 -06:00
Daniel
a4f968b423
Remove a notification for falling back from STX to regular swaps (#17374) 2023-01-25 20:01:10 +01:00
Niranjana Binoy
129a06cc12
Copy update on Transaction breakdown for ApproveToken (#17296) 2023-01-25 10:15:58 -05:00
weizman
4a57d994c7
Activate LavaMoat scuttling security feature (#17276) 2023-01-24 19:00:35 +02:00
amerkadicE
dd09245ff6
Fix/use etherjs specific imports (#15461)
* replace ethers with submodules

Co-authored-by: Alex <adonesky@gmail.com>
2023-01-24 08:10:36 -06:00
Brad Decker
d2c3abea51
Refactor Errors E2E test to no longer rely upon a real error (#17332)
Co-authored-by: Danica Shen <zhaodanica@gmail.com>
2023-01-23 12:58:35 -06:00
Vladimir Saric
f988dc1c5e
Enable the Token Allowance flow by default for all users (#16740) 2023-01-23 21:49:55 +05:30
Jyoti Puri
3e523e2382
Use PageContainerFooter to render footer on all confirmation pages (#17316) 2023-01-23 20:52:12 +05:30
David Walsh
cb6ee2b3fe
Use async/await instead of Promise.resolve (#16221) 2023-01-20 14:20:18 -06:00
ryanml
a19a5d60d3
Convert shared/constants/hardware-wallets.js -> Typescript (#17310) 2023-01-20 09:14:40 -06:00
Brad Decker
5f6d2ba6b0
Convert Transaction constants to typescript (#17149) 2023-01-18 08:47:29 -06:00
weizman
6d551f10fe
Update LavaMoat (core/lavapack) (#17061) 2023-01-18 14:35:37 +02:00
Thomas Huang
4c3c4eebac
Final conversion of tests from enzyme to @testing-library/react (#16862)
* Add transaction activity log component

* Remove duplicate tx activity log snapshot.

* Convert Advanced Tab to tlr.

* Lint fix

* Change ENS to DNS in mock state data.

* Add test ids for speedup, cancel, rety buttons.

* Convert TransactionListItemDetails component to RTL.

* Convert PageContainerHeader component to RTL.

* Convert TokenInput component to RTL.

* Convert UnitInput component to RTL.

* Convert withModalProps to RTL.

* Convert i18n-helper to RTL.

* Convert ConfirmSeedPhrase component to TLR.

* Convert AddRecipient component to RTL.

* Set process.env metamask build type to 'main' for test

Co-authored-by: Brad Decker <bhdecker84@gmail.com>
Co-authored-by: Pedro Figueiredo <pedro.figueiredo@consensys.net>
2023-01-17 07:51:35 -08:00
Niranjana Binoy
a0bb4a6c5a
Toggle option to enable/disable balance and Token rate checking for using third-party API (#16772) 2023-01-17 10:23:04 -05:00
David Walsh
7760f4d658
Remove ONBOARDING_V2 flag for release (#16865)
* Remove ONBOARDING_V2 flag for release

* Remove new usage

* Update e2e tests

* Update incremental-security.spec.js

* Fix lint

Co-authored-by: PeterYinusa <peter.yinusa@consensys.net>
2023-01-13 10:25:01 -06:00
Frederik Bolding
f6f691190d
Fix Snaps E2E test flake (#17174) 2023-01-13 15:10:47 +01:00
Bowen Sanders
4c8faaba48
[FLASK] Create E2E test for snap_dialog (#17111)
* added dialog e2e test
2023-01-12 09:25:46 -08:00
Brad Decker
312f24fddc
allow importing of typescript in E2E test suite (#17141) 2023-01-12 08:38:12 -06:00
Bowen Sanders
1b62a773b4
[E2E] Change to replace confirm snap to dialog snap (#17146) 2023-01-12 15:29:29 +01:00
Brad Decker
64839b6bf7
split unit tests (#16455)
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-01-11 12:23:38 -06:00
Bowen Sanders
f2da79f563
[E2E] Fixes to try to deflake Snaps E2E tests (#17123)
* added delays in several places

* fix to update test
2023-01-10 11:11:15 -08:00
Filip Sekulic
e6038d542a
Update UI for transaction security check in settings (#16830) 2023-01-04 15:59:48 -06:00
weizman
3cf5ef642f
Revert "Integrate new LavaMoat scuttling protection feature (#16994)" (#17043) 2022-12-22 17:26:53 +02:00
chloeYue
d66db28ae6
Add e2e test for reset account (#16996)
* add test for reset account
2022-12-22 14:16:09 +01:00
weizman
5d320ceec6
Integrate new LavaMoat scuttling protection feature (#16994)
Co-authored-by: kumavis <kumavis@users.noreply.github.com>
Co-authored-by: kumavis <aaron@kumavis.me>
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2022-12-21 12:54:30 -06:00
Frederik Bolding
7e7a0f1f72
[FLASK] Use custom UI for transaction insights (#16912)
* Allow custom UI for transaction insights

* Fix margin

* Small fixes to CSS and selectors

* Rename property

* Fix E2E locally

* Bump test-snaps

* Bump test-snaps
2022-12-20 11:44:49 +01:00
Olusegun Akintayo
13de51e748
Security and Privacy Settings Re-org (#16756) 2022-12-19 18:46:36 +01:00
mirjanaKukic
0992dd5437
added new test for adding custom network (#15484)
add custom network and switch to network

lint fix

add custom network and not switch the network

add wait for selector

lint fix

fix

add waitforselector

fix

yarn lock

added delay

added comments

lint fix

added rpc networks in mock-e2e.js

lint fix

fix

yarn lock

alphabetic order of the array in mock-e2e

fix

lint fix

fix

removed unnecessary networks

changed blacklistedHosts

added fixture builder

changed to Arbitrum One network
2022-12-19 16:46:07 +00:00
legobeat
7bdb91c089
test/e2e: increase timeout 60s -> 80s (#16592) 2022-12-19 09:27:47 -06:00
Dan J Miller
074c2934fe
remove warning on revoke approval for all nfts (#16953)
Co-authored-by: EresDev <eresdev@hotmail.com>
2022-12-16 22:37:18 +05:30
Dan J Miller
0792e4ebbc
Recipient name passed to confirm-page-container component should be u… (#16961)
* Recipient name passed to confirm-page-container component should be used if pet name exists for the to address

* Ensure recipient edit/add popup is shown for non-owned accounts

* Ensure contract name is rendered if it exists for recipient address

* Ensure that shortened address is last fallback after account, addressbook, token and ens names
2022-12-15 13:03:59 -03:30
Mark Stacey
5857b85225
Add e2e debugging logs (#16937)
A `debug` flag has been added to our e2e test runner scripts, enabling
e2e debug logs. When this flag is enabled, all driver interactions will
be logged to the console. This is extremely useful when debugging e2e
tests, because it lets you known how far the test had progressed before
failing.

This flag should work with all existing e2e test scripts, including
both `test:e2e:single` and all of the test commands that run entire
test suites.

The README has been updated to reference this flag in the section
regarding how to run a single e2e test. To ensure this wasn't totally
missed for the other scripts, I added a line suggesting that users use
`--help` to see all supported options.
2022-12-13 16:00:47 -03:30
Daniel
c7ceb91d00
Update an E2E test with a mock (#16935) 2022-12-13 10:31:32 -03:30
Bowen Sanders
720c7e7d16
initial deflakery (#16894) 2022-12-12 12:14:23 -08:00
Bowen Sanders
7e7be2769d
[FLASK] Create E2E test for tx-insights (#16785)
* Created an E2E test for tx-insights.

Co-authored-by: Guillaume Roux <guillaumeroux123@gmail.com>
2022-12-08 12:15:59 -08:00
Jyoti Puri
8125473dc5
Removing flag for EIP1559 V2 support (#16446) 2022-12-09 00:07:06 +05:30
ryanml
a759d427f0
Remove new address alert (#14811)
* Removing new address alert

* remove unused copy

* fix broken e2e test

* rework layout nesting

* satisfy lint

* change layout to fix firefox tests

* change selector specificity on e2e test

* revert test change after fix has been merged from develop

* fix linting

Co-authored-by: Brad Decker <bhdecker84@gmail.com>
Co-authored-by: Pedro Figueiredo <pedro.figueiredo@consensys.net>
2022-12-08 14:20:24 +00:00
Peter Yinusa
c9b42fc966
force background exceptions to show (#16860)
* force background exceptions to show

* fix type
2022-12-08 12:58:34 +00:00
amerkadicE
8885c54f13
NFT setApprovalForAll warning popover (#16195)
* NFT setApprovalForAll  warning popover
2022-12-06 14:24:07 -06:00
Thomas Huang
8fde322907
Continue converting tests from enzyme to @testing-library/react (#16753) 2022-12-06 10:49:08 -06:00
Vladimir Saric
9ede85c9ac
Updated secondary copy and removed the address component from SetApprovalForAll and NFT Approve screens (#16292) 2022-12-05 10:59:15 -06:00
Alex Donesky
05ab94fd1c
Add security & privacy "What's New" message (#16783) 2022-12-02 17:59:41 -06:00
amerkadicE
80e4a1fef4
Update signature request screens (#15776)
Fix e2e test

Update siteicon for v4 signature type

Code refactor

Code refactor

Remove origin and address in signatrue request

Update e2e tests

Use getNetworkName function

Move header component inline jsx

Update snaps
2022-11-30 19:11:36 +01:00
amerkadicE
dd0844e200
Add signature request warning modal (#16225)
* Add signature request warning modal

Fix e2e tests

Fix e2e tests

Remove warning message from eth sign request

Remove unused locales

Fix e2e test

Fix e2e test

* Run pipeline

* Fix locales:
?

* Add unit tests
2022-11-30 16:34:50 +01:00
HowardBraham
b1fd7f7796
Fixes 'yarn start' on Windows - LavaPack is not defined (#13318) (#16550)
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2022-11-30 09:19:45 -06:00
Bowen Sanders
0e1c385cd0
[FLASK] Create E2E test for snap management (#16628)
* added management test

* added id and dismiss alert function

* changed xwindow handling

* fixed linting
2022-11-30 14:12:09 +01:00
Frederik Bolding
dfb6210910
[FLASK] snaps-monorepo@0.25.0 (#16673)
* snaps-monorepo@0.25.0

* Regen LavaMoat policies

* Bump test-snaps

* [FLASK] Add Snaps JSON-RPC handler permission (#16670)

* Add Snaps JSON-RPC handler permission

* Add copy and icon

* Fix test

Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>
2022-11-30 13:19:33 +01:00
Thomas Huang
119219b5d2
Continue converting tests from enzyme to @testing-library/react (#16458)
* Add transaction activity log component

* Remove duplicate tx activity log snapshot.

* Convert Advanced Tab to tlr.

* Lint fix

* Convert Settings Tab test to tlr.

* Convert Send Amount Row test to tlr.

* Convert Send Row Error Message test to tlr.

* Add Mock Send State json file.

* Lint fix

* Use proper testid for jazz icon for settings e2e

* Update Send Amount Row snapshot
2022-11-29 07:42:59 -08:00
dragana8
2680340e27
Unable to proceed with tx bc of inaccurate/overly aggressive "Insufficient funds for gas" warning #13087 (#14634)
Co-authored-by: VSaric <vladimir.saric@consensys.net>
2022-11-28 10:41:42 -06:00
seaona
f44af06f9b
[e2e] Setup MV3 specific test folder and add 1 simple testcase introducing Service Worker re-start (#16606)
* First e2e mv3 specific dapp testcase

* Fix testpath for snaps

* Update `it` description

Co-authored-by: Mark Stacey <markjstacey@gmail.com>

* e2e test paths improvement

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2022-11-25 12:06:48 +01:00
seaona
6c00785271
Mitigate flaky test with the use of new function (#16655) 2022-11-24 19:10:07 +01:00
seaona
6dddd246d1
[e2e] [MV3] Fix Add Account e2e flaky test for MV3 build (#16603)
* Wait until element is not present

* Wait for non empty element on add account test

* Wait for non empty element for all instances of get account text

* Point to account value directly

* Add accounts as const
2022-11-24 19:09:54 +01:00
David Walsh
266d7d93d5
Fix #15050 - MV3: Keep the user logged in when service worker restarts (#15558) 2022-11-23 18:49:24 -06:00
Frederik Bolding
dd20281372
Fix E2E chunking (#16653)
* Fix E2E chunking algo

* Use different algo
2022-11-23 15:21:19 +01:00
George Marshall
5ee7da6afe
Adding FormTextField component (#16497)
* Adding FormTextField component

* Adding to index.js

* Adding id, label and helptext stories

* Removing unneeded htmlFor and fixing accessibility on helpText story

* Fixing issues with review suggestions

* Fixing lint issue

* Adding snapshot test
2022-11-22 13:04:27 -08:00
Frederik Bolding
de955f3faa
[FLASK] snaps-monorepo@0.24.1 (#16525)
* snaps-monorepo@0.24.0

* Fix imports and regen LavaMoat policies

* Bump iframe-execution-environment

* Fix tests

* Add permissions

* Bump patch

* Bump test-snaps

* [FLASK] Fix update e2e test to catch snaps with caveats (#16546)

* changed snap to update to bip32

* small changes to test

* Fix lint

* Fix E2E

* Update copy

* Update icon

Co-authored-by: Bowen Sanders <bowensanders@gmail.com>
2022-11-22 13:07:08 +01:00
seaona
ff25d44d98
[e2e] [MV3] Fix Custom RPC e2e test failures for MV3 build (#16599)
* Wait until element is not present

* Change selector network ticker

* Wait for loading overlay to disappear
2022-11-21 20:04:03 +01:00
Filip Sekulic
c87a4f5968
Replace the address in SignTypedData_v4 signatures with a 'Verify contract details' link (#16191) 2022-11-21 11:19:49 -06:00
David Walsh
9530797a7a
Create constants for all keyring types (#16575) 2022-11-21 08:23:35 -06:00
Frederik Bolding
8a529bca47
[FLASK] Improve Snaps E2E stability (#16597)
* Improve Snaps E2E stability

* Simplify

* Fix lint
2022-11-21 14:38:05 +01:00
George Marshall
3af83f8f98
Adding static icon names to test env file (#16078)
* Storing the icon name env var as a string and parsing to use with components

* Moving icon env vars to jest specific env.js file

* Updating snapshots
2022-11-18 22:28:38 +05:30
Mark Stacey
0841c1df4f
Fix crash on e2e test failure (#16556)
If an e2e test fails on a website, the driver will crash on this line
because it can't find a reference to `stateHooks`. That variable is
only set in our UI, not on other sites.
2022-11-17 11:29:06 -03:30
Bowen Sanders
327272f71e
[FLASK] Update e2e tests for new react test-snaps page (#16324)
* Creates updated e2e tests compatible with the new react based test-snaps page.
2022-11-16 13:47:51 -08:00
seaona
7caeee9ea3
[e2e] Fix RPC flaky test (#16530) 2022-11-16 14:36:47 -06:00
David Walsh
4ce6487160
BETA - Add beta banner to all screens (#16307)
* Add beta home banner to home screen

* Move the beta home notification to the app-header

* Updates to formatting

* Add beta home banner to home screen

* Move the beta home notification to the app-header

* Updates to formatting

* Update ui/components/app/app-header/index.scss

Co-authored-by: George Marshall <george.marshall@consensys.net>

* Update ui/components/app/app-header/index.scss

Co-authored-by: George Marshall <george.marshall@consensys.net>

* Update ui/components/app/app-header/index.scss

Co-authored-by: George Marshall <george.marshall@consensys.net>

* Move banner to top of page

* Move to own folder, update styles

* Swith to BOX component

* Address feedback

* Add tests

* Update name of component

* Fix tests

* Fix proptype errors

* Fixups

* Remove unrelated changes

* Remove unwanted string changes

* Update beta component name and text

* Update mock data

Co-authored-by: George Marshall <george.marshall@consensys.net>
2022-11-16 11:41:15 -06:00
Daniel
a9085a8e31
Add mocks for E2E tests (#16527)
* Mock token import

* Add mocks, improve stability

* Update LavaMoat policies

The policies became outdated recently due to undetected conflicts
between PRs.

* Use veryLargeDelayMs, refactoring

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2022-11-16 12:27:47 -03:30
Adnan Sahovic
f9ed4a560b
Added "What's New" Notification for Improved token allowance experience (#16465) 2022-11-15 13:17:28 -06:00
Mark Stacey
4f66dc948f
Update @metamask/controllers to v33 (#16493)
The controllers package has been updated to v33. The only breaking
change in this release was to rename the term "collectible" to "NFT"
wherever it appeared in the API.

Changes in this PR have been kept minimal; additional renaming can be
done in separate PRs. This PR only updates the controller names,
controller state, controller methods, and any direct references to
these things. NFTs are still called "collectibles" in most places.
2022-11-15 15:19:42 -03:30
George Marshall
6907c4a565
Adding TextFieldSearch component (#16296)
* Adding TextFieldSearch component

* Updating docs and stories

* Moving controlled test into testing utils

* Fixing spelling in prop types af => of
2022-11-15 08:49:02 -08:00
Dan J Miller
0a5c46b156
Prevent user from editing a contract interaction created by a dapp (#16498)
* Prevent user from editing a contract interaction created by a dapp

* Code cleanup

* Fix e2e test selector

* Fix e2e test

* Fix e2e test

* Update snapshot
2022-11-15 12:28:39 -03:30
Peter Yinusa
b2293e6648
[e2e]: log exceptions when tests fail (#16453)
* log exceptions inc background

* show full stacktrace

* use driver api

* lint
2022-11-14 08:35:08 -06:00
Dan J Miller
5a28a7bd6d
Call onbootcleanup at the end of the tx controller constructor (#16449)
* Call onbootcleanup at the end of the tx controller constructor

* Update app/scripts/controllers/transactions/index.js

Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>

Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
2022-11-10 09:58:27 -03:30
Vladimir Saric
42be5a07d7
Replaced addresses by the address component on SignTypedData v4 signatures (#16018)
* Replaced addresses by the address component on SignTypedData v4 signatures

* Fixing signature-request e2e tests

* Modified scss file for signature-request message

* Using address component for rendering the addresses and bold label where hex address is not valid

* Modify the address component

* Added proper BEM syntax for class names and used Box and Typography

* FIxing e2e tests

* Commited requested changes from George and added storybook

* Review requested changes

* Created new component for rendering data in signature-request-message.js

* Fixing proper usage for getAccountName and getMetadataContractName selectors

* Fixing e2e tests
2022-11-10 06:58:34 -03:30
Peter Yinusa
6cca9892b2
refactor sentryHooks object (#16435) 2022-11-09 19:28:32 +00:00
Peter Yinusa
07b39deb61
E2e remove redundant code (#16432)
* remove unused code

* remove unused code
2022-11-09 16:00:04 +00:00
Frederik Bolding
02088e445d
Parallelize E2E tests to cut CI time in half (#16417)
* Experiment with parallellizing E2E

* Fix lint

* Try parallelism 8

* Apply suggestions from code review

Co-authored-by: Mark Stacey <markjstacey@gmail.com>

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2022-11-08 18:28:06 +01:00
Frederik Bolding
de3068d932
[FLASK] snaps-monorepo@0.23.0 (#16394)
* snaps-monorepo@0.23.0

* Regen LavaMoat policies

* Update iframe-execution-environment

* Fix tests

* Bump luxon

* Fix lint

* Update test-snaps

* Bump post-message-stream

* Fix E2E
2022-11-08 10:31:22 +01:00
amerkadicE
d4ffc3a587
Update address component on transaction data screen (#15888)
* Update address component on transaction data screen

E2E test fix

Fix tests

* Metadata accounts

* Remove test resulsts

Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2022-11-08 09:34:21 +01:00
Thomas Huang
646dbaaff2
Continue converting tests from enzyme to @testing-library/react (#16373)
* Add transaction activity log component

* Remove duplicate tx activity log snapshot.

* Convert Identicon test to tlr.

* Convert Metafoxlogo test to tlr.

* Convert Reveal Seed Phrase test to tlr.

* Consolidate and convert Send Footer test to tlr.

* Convert Settings test to tlr.

* Consolidate and convert security tab test to tlr.

* Convert null selectedOption to empty string, and add test id to Dropdown component.

* Add Send state to mock-state

* Lint mock-state.json
2022-11-04 13:56:24 -07:00
Alex Donesky
4245f24a2e
Fix issue with awaiting swaps page (#16344)
* fix issue with awaiting swaps and smart-transaction-status pages when service worker dies
2022-11-04 11:14:43 -05:00
Nicholas Ellul
300919cfcc
Fix the rendering of certain domain names in connected-sites list (#16074)
* Fix rendering origins in connected-sites list
2022-11-04 09:26:51 -04:00
Daniel
d634ff89df
Enable and stabilise e2e tests for Swaps, add debouncing (#16326) 2022-11-03 14:54:49 +01:00
mirjanaKukic
95dcf072f8
added new tests for editing and deleting contact from address book (#16014)
lint fix

fix

added fixture builder
2022-11-02 14:28:17 +00:00
Erik Marks
a8c1756816
Remove 3box feature and delete ThreeBoxController (#14571)
* Remove 3box feature and delete ThreeBoxController

Lint locale messages

lavamoat policy updates

* Restore 3Box user trait with value `false`

The 3Box user trait has been restored and hard-coded as `false`. This
ensures that users don't get stuck in our metrics as having this trait.

A deprecation comment has been left in various places for this trait.

* Remove unused state

* Remove additional 3box-related things

* Run `yarn-deduplicate`

* Restore migration that was lost while rebasing

* Remove obsolete override

* Remove additional unused resolutions/dependencies

* Update LavaMoat policies

* Remove obsolete security advisory ignore entries

* Remove 3Box fixture builder method

* Update unit tests

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2022-10-31 13:50:50 -02:30
Peter Yinusa
88a6f3787c
[E2E] Restore tests (#16298)
* add restore test

* rename spec
2022-10-31 09:48:04 +00:00
Daniel
802a20449a
Exclude E2E tests for swaps until they are stabilised (#16303) 2022-10-28 20:34:10 +02:00
Daniel
2f84010629
Add e2e tests for Swaps notifications (#16202) 2022-10-28 16:09:46 +02:00
Peter Yinusa
0b4532ec1b
E2e test fixtures (#16061)
* remove state.json files

* move file

* Update Readme

* Create fixture builder

* load test fixture

* remove redundant method

* update snap tests

* update stats tests

* update extension tests

* update extension tests

* Update fixture data

* snap test dapp connection

* Update fixture data

* add onboarding fixture

* use onboarding fixture

* reuse import account vault

* remove unnecessary use of class

* use fixture builder in new tests

* switch to function

* update default fixture

* update default fixture

* update test

* update 1559 test fixttures

* update 1559 test fixtures

* update 1559 test fixtures

* dismiss 3box whats new

* remove redundant code

* move docs

* remove unused code

* token detection

* use default timeout

* remove redundant code

* Update fixture builder

hide `Protect your funds` dialog
remove browser environment
remove default network details
hide dismiss seed backup reminder
recursively merges fixture data

* add token to tokencontroller

* remove network details

* add missing identities to preference controller

* remove duplicate properties

* update bip-32 to use fixturebuilder

* alphabetise snap permissions

* update get snaps to use fixturebuilder

* Update test-snap-bip-32.spec.js

wait for window

* add popular network state

* update test

* lint
2022-10-28 09:42:12 +01:00
seaona
d452613f71
[MV3] Fix e2e encrypt-decrypt test for MV3 test build (#16264)
* Fix e2e encrypt-decrypt test for mv3 build

* Remove unnecessary await~
2022-10-27 14:46:07 +02:00
seaona
f03b3a872c
Fix e2e incremental-secuirty test for mv3 build (#16265) 2022-10-27 14:16:50 +02:00
ryanml
6c84e9604c
Enable "Add Popular Network" feature by default for all users (#16172)
* Enable "Add Popular Network" feature by default

* Fixing e2e tests

* Attempt to fix e2e tests

* Revert "Attempt to fix e2e tests"

This reverts commit d88e8944b8df8f7c3075753f8d8b3480439f8e30.

* Get e2e tests passing

Co-authored-by: Dan J Miller <danjm.com@gmail.com>
2022-10-27 07:55:30 -02:30
seaona
c519d3ef91
[e2e] Fix Dapp interactions flaky test on chrome (#16282) 2022-10-26 18:19:15 +04:00
George Marshall
da4e6d3e37
Adding TextField component (#16105)
* Adding TextField component

* Fixing lint issues

* More linting fixes

* Adding more tests

* Adding reference to TextFieldBase props

* Adding reminder todo comment to styles

* Using short hand syntax for conditionally firing event props and removing some css and unused classsNames in favor of box props

* Fixing up my sloppy code

* Removing text base docs update

* More clean up

* Adding more stories and docs

* Adding new stories to mdx docs
2022-10-25 15:23:18 -07:00
Jyoti Puri
68642ee47a
Updating controller dependency (#16033)
* Updating controller dependency

* fix

* fix

* fix

* fix

* fixes

* Lavamoat auto

* Update URLs for phishing detection testcase

* update lavamoat files

* call phishingController.test synchronously again

* bump @metamask/controllers to v32.0.1

* lint

* update policy files

* bump controllers version again

* modify update phishing list strategy

* revert back to use isOutOfDate, but without blocking substream

* possible way to fix e2e tests?

* enable testing

* Remove promise return from setupController in background.js, as it is no longer used

* Ensure updatePhishingLists is called in MM contrller constructer, so that phishing lists are updated right away

Co-authored-by: seaona <mariona@gmx.es>
Co-authored-by: Alex <adonesky@gmail.com>
Co-authored-by: Dan Miller <danjm.com@gmail.com>
2022-10-25 02:24:02 -02:30
Dan J Miller
1526b14157
Fix inputs that should allow decimals (#16254)
* Fix inputs that should allow decimals

* Update e2e test to cover inputting of decimals in advanced fields

* Update e2e test to cover inputting of decimals in advanced fields

* Fix e2e tests
2022-10-25 00:25:31 -02:30
Frederik Bolding
359f782e7e
[FLASK] Fix flaky BIP-32 E2E test (#16255) 2022-10-24 13:49:41 +02:00
Frederik Bolding
6ba9f65b4c
[FLASK] Add E2E for wallet_getSnaps (#16169)
* Add E2E for wallet_getSnaps

* Fix lint
2022-10-14 15:34:27 +02:00
Bowen Sanders
1b4f1344b1
[FLASK] Create E2E Test for BIP-32 test-snap (#16037)
* new test and changed ui

* added bip32 test

* fixed linting and other errors

* changed description

* Bump test-snaps to latest and fix tests

* Fix error e2e

* Fix confirm e2e

* Remove balance

Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
2022-10-14 14:33:36 +02:00
seaona
321e5abab5
e2e test for gas API fallback (#16137) 2022-10-10 14:59:58 -07:00
PeterYinusa
dc775b598e
add decrypt e2e (#16122) 2022-10-10 12:43:18 +01:00
Garrett Bear
46d970e362
15087: Add Button Base (#15998)
* 15087: Add Button Base
2022-10-04 09:55:51 -07:00
Daniel
c8067e9351
Add more unit / integration tests for Swaps (#16040) 2022-10-04 18:55:05 +02:00
Dan J Miller
392b08a5c4
Fix: show whats new to users who created, not imported, a new wallet,… (#16042)
* Fix: show whats new to users who created, not imported, a new wallet, but not on their first session

* Fix tests

Hide `Improved token detection is here` & `Scam and security risks`  whats new

* Fix unit test

Co-authored-by: PeterYinusa <peter.yinusa@consensys.net>
2022-10-04 13:22:42 -02:30
Elliot Winkler
d7a812f42f
Add remaining tests for createInfuraClient (#15717)
Add tests for the `block-tracker-inspector` middleware — which makes
sure that the block tracker never has a reference to the latest block
which is less than a block number that shows up in an RPC method's
response — and the Infura middleware — which takes care of sending the
request to Infura, and will retry the request up to 5 times if Infura
sends back a certain type of error.

Note that the `retry-on-empty` middleware is not tested because it
currently has a [bug][1] which is making it ineffective.

[1]: https://github.com/MetaMask/eth-json-rpc-middleware/issues/139
2022-09-29 10:39:35 -06:00
Nicolas Ferro
f3465c9485
Deprecate snake case from feature flags (#15994) 2022-09-29 11:03:38 -05:00
ryanml
0bc1eeaf37
Deprecating the Rinkeby, Ropsten, and Kovan test networks (#15989)
* Deprecating Rinkeby, setting default debug network to Goerli

* Deprecating Ropsten and Kovan

* Conflict fix

* Remove unused localization, test fixes

* Add migration for moving used deprecated testnets to custom networks

* Fix migrator test

* Add more unit tests

* Migration updates provider type to rpc if deprecated network is selected

* Migration fully and correctly updates the provider if selected network is a deprecated testnet

* Continue to show deprecation warning on each of rinkeby, ropsten and kovan

* Add rpcUrl deprecation message to loading screen

* Removing mayBeFauceting prop

Co-authored-by: Dan Miller <danjm.com@gmail.com>
2022-09-28 20:26:01 -07:00
Bowen Sanders
8622e61bd3
Create snaps E2E test for update function (#15979) 2022-09-27 16:37:17 -07:00
PeterYinusa
1295fabfb5
[E2E]: Revoke nft approval (#15995) 2022-09-27 10:51:46 -05:00
Thomas Huang
0bbcbe6e90
Continue converting tests from enzyme to @testing-library/react (#15956)
* Update mock state data

* Convert App Header test to tlr.

* Convert Gas Timing test to tlr.

* Convert Account Details Modal to tlr.

* Update Sig Req test to match mock state changes.

* Add test-ids to Editable Label for Account Details Modal

* Adjust selectors test for the mock state update.

* Add back gasIsLoading for selectors test.
2022-09-27 08:03:26 -07:00
Frederik Bolding
4eb8e50800
[FLASK] snaps-skunkworks@0.21.0 (#15889)
* snaps-skunkworks@0.21.0

* Update policy files

* Regen policies again

* Fix tests

* Simplify selector

* Fix flaky test

* Update iframe execution env

* Move snap install warnings to util

* Add basic copy for snap_getBip32PublicKey

* Update permission icon

* Update E2Es

* Fix lint

* Fix locale strings
2022-09-23 12:39:54 +02:00
PeterYinusa
1370f19cba
Portfolio site e2e (#15921)
* add env variables to test build

* add data-testid attribute to home component

* add method to retrieve the url of the current page

* add portfolio site test

Co-authored-by: ryanml <ryanlanese@gmail.com>
2022-09-22 08:39:34 +01:00
Frederik Bolding
d054175b2e
[FLASK] Fix an issue with installing and updating snaps with 0 permissions (#15796)
* Fix an issue with installing snaps with 0 permissions

* Fix some issues

* Fix lint

* Fix code fencing

* UI improvements for no permission use-case

* Fix redirect

* Delay BIP44 test slightly

* Add more delay

* Fix update UI
2022-09-20 14:46:25 +02:00
Jyoti Puri
441e894e9a
Graph improvements (#15793) 2022-09-16 22:26:36 +05:30
Dan J Miller
3a25733fa6
Add notification about the merge (#15846) 2022-09-15 12:51:01 -02:30
ryanml
7b04bf8b47
Adding Sepolia as a default test network (#15787) 2022-09-14 13:26:45 -05:00
Brad Decker
c87980bbfe
migrate network constants to typescript (#15610) 2022-09-14 09:55:31 -05:00
seaona
506d1e74e5
[e2e] Refactor send-hex-address spec using Ganache seeder (#15604)
* Send Hex Address Ganache refactor

* Added explanatory comment
2022-09-14 16:51:49 +02:00
Olusegun Akintayo
453340d12a
Show 3box deprecation message in whats new (#15763)
* Show 3box deprecation message in whats new

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Add . after message

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Change deprecation notification message and remove date

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2022-09-13 22:51:46 +04:00
Matthew Epps
dcfe80c255
Add entry point for metalabs dapp into metamask home page (#15407)
Co-authored-by: Dan Miller <danjm.com@gmail.com>
2022-09-13 08:41:58 -05:00
seaona
9cf401bb92
Expand error details before taking screenshot (#15779) 2022-09-09 14:40:51 +02:00
Daniel
fe10c35464
Preserve search query for "Swap from" and "Swap to" form fields, update content (#15758) 2022-09-08 11:31:56 -05:00
VSaric
4f8c22accb
Updated the main copy on SetApprovalForAll confirmation screen (#15724) 2022-09-06 09:11:13 -05:00
VSaric
0b92b13def
Set view full transaction details by default (#15726) 2022-09-06 08:36:02 -05:00
Jyoti Puri
99ed42b3dc
MV3: add retry logic to actions (#15337) 2022-09-05 20:25:34 +05:30
Frederik Bolding
7fc418a96d
[FLASK] snaps-skunkworks@0.20.0 (#15706)
* snaps-skunkworks@0.20.0

* Generate LavaMoat policy

* Fix some breaking changes

* Update iframe execution env

* Fix unit tests

* Implement snap_getBip44Entropy

* Regenerate LavaMoat policy

* Prefer ControllerMessenger over direct calls

* Fix not showing warning for BIP44 legacy permission and E2E test

Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>
2022-08-26 13:48:53 +02:00
PeterYinusa
fe78890dd2
Sentry e2e test (#15715) 2022-08-25 18:07:31 -05:00
mirjanaKukic
eabbe9f037
add e2e test for default icons (#13869) 2022-08-25 09:48:13 -05:00