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

2085 Commits

Author SHA1 Message Date
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
legobeat
ef9d5d117b
chore: Adjust trailing whitespace (#15636)
Co-authored-by: ryanml <ryanlanese@gmail.com>
2022-08-24 14:11:49 -05:00
legobeat
2a1c4a00f1
development scripts: add node shebang; mark as executable (#15655) 2022-08-24 12:25:27 -05:00
Brad Decker
0d862d4032
upgrade jest (#15642) 2022-08-23 15:13:02 -05:00
Jyoti Puri
5a25084eab
Jest configuration fix (#15673) 2022-08-23 23:27:55 +05:30
Maarten Zuidhoorn
a52c6a4908
[FLASK] snaps-skunkworks@0.19.0 (#15619)
* Bump snaps-skunkworks to 0.19.0

* Improve snap_getBip32Entropy UI

* Remove console.log

* Update LavaMoat policy

* Dedupe Yarn lock

* Update LavaMoat policy again

* Fix tests

* Update policies and e2e tests

* Update policy again

* Update iframe-execution-environment

* Dedupe yarn.lock

* Update snapshots

* Fix PR comments

* Add TODO

* Trigger CI
2022-08-18 17:07:34 +02:00
seaona
7aadddc81e
Send to Contract ganache refactor (#15605) 2022-08-18 10:26:14 +02:00
seaona
71b3f01db5
Refactor failing contract with ganache seeder (#15601) 2022-08-17 17:02:06 +02:00
seaona
8464ed150c
[e2e] Refactor contract-interactions spec using Ganache seeder (#15553)
* Include contract deployment from background on Contract Interactions specs

* Deploy piggy contract

* Fix lint

* Make sure button is clickable

* Wait for deployed contract

* Fix lint

* Changed hardcoded Smart Contract string for imported constant
2022-08-16 17:25:51 +02:00
Thomas Huang
5b63c7adf3
Unit tests improvements (#15517) 2022-08-16 10:25:30 -05:00
Jyoti Puri
eb85fc266d
Refactoring isManifestV3 variable (#15568) 2022-08-16 20:51:42 +05:30
Brad Decker
f008c50bbd
Add initial Typescript Files (#15596) 2022-08-16 10:15:29 -05:00
seaona
437acdb74c
Capture user actions times for MV2 benchmark and generate artifacts (#15353)
* User actions benchmark and artifacts

* Lint and fix identation

* Fix lint

* Updated path

* lint

* Add user actions benchmark to pre release job

* Remove title

* Out path updated

* See if url is finally fixed

* Adding some console logs

* lint

* fix lint

* fix lint

* Updated persisting and store artifacts path

* Added MetaMask bot correct link and remove console logs

* Remove console log

* Sort Imports

* Fix lint

* Update loadAccount function and prop name for clarity to loadNewAccount

* Run yarn setup

* Fix yarn

* Update Create Account element for Create account

* Remove unnecessary step on send

Co-authored-by: Jyoti Puri <jyotipuri@gmail.com>
2022-08-12 19:41:20 +02:00
seaona
86f02e4fd5
[e2e] Enabling/Disabling token conversion on testnets (#14649)
* E2e test for advanced settings: show conversion on test networks

* Lint fix

* Complete testnet conversion for all testnets

* Lint fixes

* Add custom error messages for each assert

* Removed delays

* Fix testcase

* Test only local network

* Mock API response for ETH USD price rate

* Remove unnecessary awaits

* Lint fix

* FindElement by its text on secondary currency

* Add missing awat for getText
2022-08-11 17:02:19 +02:00
Niranjana Binoy
6e5c2f03bf
Token detection V2 Flag Removal and Re-introducing the use of legacy token list when token detection is OFF (#15138)
* addding the legacy tokenlist, tuning token detection OFF by default, adding new message while importing tokens

updating the controller version and calling detectNewToken on network change

fixing rebase error

Run yarn lavamoat:auto for updating policies

updating lavamoat

Deleted node modules and run again lavamoat auto

fixing rebase issues

updating lavamoat policies

updating lavamoat after rebasing

policies

updating custom token warning and blocking detectedtoken link when tpken detection is off for supported networks

to update the token in fetchTosync

updating the contract map object

Revert build-system lavamoat policy changes

Move token list selection logic from components to getTokenList selector

updating the tokenList

Update lavamoat

Fix error

updating lavamoat

lint fix

fix unit test fail

fix unit test fail

lint fix

fixing rebase locale error

rebase fix

Revert build-system policy changes

temp

addressing review comments

* rebase fix
2022-08-09 22:56:25 -02:30
Olusegun Akintayo
4f34e72085
3box Replacement (#15243)
* Backup user data

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

Tests for prependZero (utils.js)

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

Fix advancedtab test

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

backup controller tests

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

Lint fixes

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

Backup controller don't have a store.

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

Restore from file.

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

Advanced Tab tests

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

Lint fix

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

e2e tests for backup
unit tests for restore.

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

Fix comments on PR.

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

restore style

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

Lint fixes

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

We should move the exportAsFile to a utility file in the shared/ directory

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

Move export as file to shared folder

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

Refactor create download folder methods

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

Lint fixes.

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

Move the backup/restore buttons closer to 3box

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

Change descriptions
Add to search

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

refactor code to use if instead of &&

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

Lint fixes

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

Restore button should change cursor to pointer.

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

Fix restore not uploading same file twice.

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

Do not backup these items in preferences
    identities
    lostIdentities
    selectedAddress

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

lint fixes.

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

* Only update what is needed.

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

* Fixed test for search

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

* remove txError as it currently does nothing.

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

* Remove dispatch, not needed since we're not dispatching any actions.

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

* Event should be title case.

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

* Make backup/restore normal async functions
rename event as per product suggestion.

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

* Use success Actionable message for success message and danger for error
message

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

* change event name to match with backup

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

* Lint fixes

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

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

* fix e2e

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2022-08-09 19:36:32 +01:00
PeterYinusa
12943e0e71
[E2E]: Set approval for all e2e (#15481)
* Update test dapp

* fix provider

fix provider
remove debug
mint nft

* Add collectibles spec

Co-authored-by: Alex Donesky <adonesky@gmail.com>
2022-08-09 14:59:20 +01:00
George Marshall
0692f7bf25
Updating content to sentence case and updating tests (#15285) 2022-08-08 12:01:38 -07:00
Thomas Huang
1f5964e450
Convert unit test render from enzyme to @testing-library/react. (#15091)
* Use @testing-library/react for account-menu test

* Add testids for account menu accounts and  balances

* Expand render wrapper functionality with metrics provider and router history

* Add testid to menu-droppo-container and menu-droppo

* Add network item nickname testid

* Use @testing-library/react for network dropdown test

* Add color icon testid

* No need for interpolation for testid in menu-droppo
2022-08-03 13:30:43 -07:00
Hassan Malik
a7179a6b88
[FLASK] Add update snap UI (#15143)
* added snap-update folder

* addded update route, snap update component, updated permissions connect components

* added actions and selectors

* updated permissions selectors and updated permissions connect container to have update snap logic

* updated translations, added selector, updated request object

* updated translations, added update snap permission list component

* more fixes

* added CSS, redid some HTML

* lint fixes

* Add missing grantPermissions action

* updated button padding

* fixes

* removed prop type

* fix Update & Install wrapping

* made changes for forthcoming snap controller PR

* removed ununsed imports

* updated css

* re-added padding rule and removed unused translation messages

* addressed comments

* add subtext for new permissions

* lint fix

* removed unused translations

* some more changes

* fix e2e tests

* lint fix

* added in delay for e2e tests

* Revert "added in delay for e2e tests"

This reverts commit 095962a2c0c9de0b0b343d3134bb0787044dd8ce.

* fixed routing logic

Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
Co-authored-by: Guillaume Roux <guillaumeroux123@gmail.com>
2022-08-03 12:02:44 -04:00
Guillaume Roux
9ce4a8f987
[FLASK] Fix key management permission copy (#14849) 2022-08-02 11:29:40 +02:00
Brad Decker
c72199a1a6
update prettier (#15360) 2022-07-31 13:26:40 -05:00
Brad Decker
652d631cda
remove exclusions for mismatched object jsdoc type casing (#15351) 2022-07-27 08:28:05 -05:00
Jyoti Puri
d4075b099f
Fix for script to measure bundle size over time (#15338) 2022-07-27 16:37:15 +05:30
Brad Decker
1db0ee87ec
Update Eslint and deps (#15293) 2022-07-26 13:10:51 -05:00
Dan J Miller
101fe0b27a
Metrics adjustments (#15313)
* Don't send errors to sentry if users have not opted-in to participate in metametrics

* Don't capture opt-out metrics

* Move the metrics-opt in screen to immediately after the welcome screen

* Ensure that global.getSentryState is set in the background

* Fix e2e tests after rearranging onboardin flow

* Fix unit tests

* More e2e test fixes

* Remove unnecessary wrappers around capture exception
2022-07-22 18:09:48 -02:30
Jyoti Puri
be47d78475
Fix for mv3 performance stats (#15321) 2022-07-22 16:24:14 +05:30
Jyoti Puri
45f5635cd8
Bundlesize stats over time (#15209)
* Adding tasks for MV3 test build

* more changes

* fix

* fix

* fix

* MV3 CI fixes

* fixes

* fix

* Initial work to capture the logs, write to file, and parse it.

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

* chrome debug logs

* Pull logs from webdriver and save to json file.

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

* comment out stats stuffs

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

* Lint Fixes

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

* Remove console.log

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

* fixes

* Adding build artifact for initialisation time

* change

* fix lint

* fix

* fix

* fix

* fix

* fixes

* Capturing load time stats

* fix

* fix

* fix

* fix

* fix build

* fix

* fix

* fix

* fix

* fix

* Initial work to capture the logs, write to file, and parse it.

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

* chrome debug logs

* Pull logs from webdriver and save to json file.

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

* comment out stats stuffs

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

* Lint Fixes

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

* Remove console.log

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

* fix

* fix

* fix

* fix

* Initial work to capture the logs, write to file, and parse it.

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

chrome debug logs

Pull logs from webdriver and save to json file.

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

Remove console.log

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

split output of lavamoat to 2 files. background and ui

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

* fix

* fix

* fix

* Enable logging to chrome_debug only if in MV3

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

* fix

* fix

* fix

* fixes

* fix

* fix

* fix

* fix

* fixes

* test

* test

* fix

* fix

* MV3 bundle size stats

* fix

* Committing bundle size status to extension_bundlesize_stats repo

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* Initial commit

* Initial commit

* Initial commit

* Initial commit

* fixes

* fix

* fix

* fix

* fix

* fix

* fix

Co-authored-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Co-authored-by: PeterYinusa <peter.yinusa@consensys.net>
2022-07-21 12:25:18 -10:00
Jyoti Puri
5bae544475
MV3 bundle size stats (#15191) 2022-07-21 23:10:24 +05:30
David Drazic
76c06692df
[e2e] Deploy contracts directly seeding Ganache (#14631)
* Add some experimental Ganache seeder WIP

Refactor GanacheSeeder

* Added all smart contract bytecodes and abis

* Deploy smart contract by contract name

* Clean up and fix tx hash

* Removed console logs

* Remove last console log

* Use node module path for grabbing contract constants

* Remove contract deployment example on e2e test

* Small refactor for removing extra line

Co-authored-by: seaona <mariona@gmx.es>
2022-07-21 19:08:01 +02:00
PeterYinusa
b60325cbcb
remove redundant code (#15306) 2022-07-21 14:46:50 +01:00
PeterYinusa
6233ed414d
mock contract interaction signature in e2e tests (#15297) 2022-07-20 18:39:40 +01:00
Jyoti Puri
45cecf385d
Adding artifacts (#15145) 2022-07-20 19:33:16 +04:00
Jyoti Puri
0622883a3c
Capturing load time stats (#15157) 2022-07-20 11:40:31 +04:00
Jyoti Puri
6aa0ecce2a
Capturing lavamoat stats in E2E (#15153) 2022-07-20 03:07:15 +04:00
PeterYinusa
12da4303be
Send to contract e2e (#15276)
* fix leave running flag

* reuse mock

* add send to contract waring test
2022-07-19 16:22:38 +01:00
PeterYinusa
0e0f2b4bb0
skip tests & fix build (#15280)
* skip tests

* lint
2022-07-18 15:46:12 -07:00
mirjanaKukic
6baa407f2c
add e2e test for token add approve action (#13797)
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2022-07-18 10:12:28 -05:00
Alex Donesky
09164dcabb
Bump controllers v30.0.2 (#14906)
* bump @metamask/controllers to v30.0.2 and adapt
2022-07-18 09:43:30 -05:00
PeterYinusa
9ae909d6a7
[E2E] Install Firefox extension from dist folder (#15255)
* update webdriver

* install extension from dist folder

* remove redundant code
2022-07-18 09:22:23 +01:00
PeterYinusa
5bf30606fe
[E2E] quit mocha after test (#15253)
* quit mocha after test

* lint
2022-07-18 09:19:49 +01:00
ryanml
9e63a9a449
Adding "What's New" Notification for Add Popular networks (#15121)
* Adding "What's New" Notification for Add Popular networks

* Adding action text to notification

* Addressing review feedback

* Flag removal
2022-07-14 11:08:32 -07:00
Dan J Miller
0c163dd8aa
Show users a warning when they are sending directly to a token contract (#13588)
* Fix warning dialog when sending tokens to a known token contract address

Fixing after rebase

Covering missed cases

Rebased and ran yarn setup

Rebased

Fix checkContractAddress condition

Lint fix

Applied requested changes

Fix unit tests

Applying requested changes

Applied requested changes

Refactor and update

Lint fix

Use V2 of ActionableMessage component

Adding Learn More Link

Updating warning copy

Addressing review feedback

Fix up copy changes

Simplify validation of pasted addresses

Improve detection of whether this is a token contract

Refactor to leave updateRecipient unchanged, and to prevent the double calling of update recipient

Update tests

fix

* Fix unit tests

* Fix e2e tests

* Ensure next button is disabled while recipient type is loading

* Add optional chaining and a fallback to getRecipientWarningAcknowledgement

* Fix lint

* Don't reset recipient warning on asset change, because we should show recipient warnings regardless of asset

* Update unit tests

* Update unit tests

Co-authored-by: Filip Sekulic <filip.sekulic@consensys.net>
2022-07-13 19:45:38 -02:30
Dan J Miller
f785f77959
Improve confirm screen tests (#15163)
* Improve confirm screen tests

* Fix transaction controller unit test

* Fix unit test fixtures

* Fix e2e test
2022-07-12 14:50:20 -02:30
Bowen Sanders
b486524c07
Snaps E2E Test Upgrades for the new test-snaps UI (#14980)
* fixed e2e tests for new UI

* fixed scrolling in tests to be bi-compatible

* updated enums to point to new UI version
2022-07-06 15:22:21 -07:00
PeterYinusa
4e1dbc6194
State logs e2e (#15123)
* download dir

* state logs e2e

* update ff version
2022-07-01 20:46:12 +01:00
PeterYinusa
dc780eeeb1
Send to hex-prefixed address e2e tests (#15111)
* add e2e test

* update variable name

* add test for ERC20
2022-07-01 17:40:31 +01:00
Brad Decker
94967072f7
Remove global transaction state from send flow (#14777)
* remove global transaction state from send slice

* fixup new test
2022-07-01 08:58:35 -05:00
Frederik Bolding
82645ba516
[FLASK] snaps-skunkworks@0.16.0 (#14952)
* snaps-skunkworks@0.16.0

* Bump iframe-execution-environment

* Add getAppKey

* Regen LavaMoat policy

* Bump test-snaps
2022-06-20 10:13:12 +02:00