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

859 Commits

Author SHA1 Message Date
Mark Stacey
f854937249
Fix add-account e2e test (#19684)
The add-account e2e test was recently broken due to a conflict between
the PRs #19293 and #19546 (a function was renamed)
2023-06-20 16:33:24 +01:00
Danica Shen
f10775f55d
feature(19625): eliminate e2e flakyness for add-account and send-eth (#19645)
* feature(19625): eliminate e2e flakyness for add-account and send-eth

* feature(19625): remove await delay in send-eth
2023-06-20 14:45:40 +01:00
David Walsh
ba3f86400c
Fix #19609 - Prevent rounded corners in account menu (#19615) 2023-06-20 08:38:24 -05:00
Pedro Figueiredo
66c9654244
Implement tests for multiple service worker restarts on the mv3 build (#19293)
* implement multiple restart tests

* remove console.logs

* fix

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* close stale prs

* revert chromedriver version

* delete code leftover

* remove unlockWallet method

---------

Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2023-06-20 11:17:08 +01:00
Victorien Gauch
e4923399a9
feat: add new linea mainnet network (#19326)
* feat: add new linea mainnet network

* fix: removed unused condition + lint code

* fix: update tests + fix network tab issue

* feat: add feature toggle for linea mainnet

* fix: add feature toggle for linea mainnet

* feat: add linea mainnet logo

* update @metamask/eth-json-rpc-infura package to support linea networks

* update linea mainnet block explorer url

* fix: refactor linea mainnet feature toggle

* fix: update linea mainnet chain id and rpc url

* fix: update settings-search unit test

* fix: update linea mainnet feature flag

* fix: remove useless async function keyword for linea mainnet feature flag
2023-06-16 14:05:33 -02:30
Garrett Bear
70d86ee67c
Feat/19274/ds popover update account list menu (#19534)
* update account list menu to use ds popover and fix accessibility issue

* close popover if user continues to tab to next items

* remove disable logic not doing anything

* add stylesheet

* add refs to track last menuitem

* cleaned up ref version for MenuItems

* fix test

* add click away option and fix test

* fix e2e test

* undo e2e test

* add account e2e

* fix click outside component

* remove additional line break

* remove commented out code

* add isOpen to story

* set width to 225px
2023-06-16 09:25:13 -07:00
Alex Donesky
c16b35c029
Extend wallet_watchAsset to support ERC721 and ERC1155 tokens (#19454)
* Extend wallet_watchAsset to support ERC721 and ERC1155 tokens
2023-06-15 15:18:12 -05:00
Daniel
8b3e3c8a58
Swaps UI update (#19169) 2023-06-15 20:17:21 +02:00
Danica Shen
74d365cbaa
feature(19493): eliminate e2e flakyness for eth-sign (#19606) 2023-06-15 13:13:54 +01:00
Victorien Gauch
1fca9255c1
fix: refactor linea goerli testnet implementation (#19321)
* fix: refactor linea goerli testnet implementation

* fix: rename linea goerli network

* feat: add linea testnet logo

* update linea goerli block explorer url

* update @metamask/eth-json-rpc-infura package to version 8.1.0

* fix: refactor ticker map object in shared/constants/networks.ts files
2023-06-15 09:08:07 -02:30
Danica Shen
2648c783ad
feature(19496): eliminate flow e2e flakyness in terms of asserting content for DOM (#19600) 2023-06-15 11:01:44 +01:00
David Walsh
28137798b6
UX: Multichain: Move Add Account and Import Account into Account Menu Popover (#19346)
* UX: Multichain: Move Add Account and Import Account into Account Menu Popover

* Create a new CreateAccount component for the Account Menu

* Add actions for import form

* Use separate actions for cancel vs. submit

* Fix jest tests

* Remove commented route navigation

* Accommodate for failing import

* Fix tests

* Remove routes for new account and import

* Remove old create account page

* Move import-account files to multichain directory

* Fix paths on the import files

* Remove deprecated component library variables

* Fix error property of add form

* Fix user-actions-benchmark
2023-06-13 10:07:01 -05:00
Mark Stacey
abd2a5559e
Update @metamask/gas-fee-controller to v6 (#19366)
* Update `@metamask/gas-fee-controller` to v6

The `@metamask/address-book-controller` package has been updated to v3.
This version was part of the [core monorepo v53](MetaMask/core#1385)
release. The remaining packages released as part of v53 will be updated
in later PRs.

This release included a number of breaking changes, but most of them
do not affect the extension:

* Bump to Node 16
  * The extension already uses Node.js v16
* The `getChainId` constructor parameter now expects a `Hex` return
type rather than a decimal string
  * The extension was already passing in a `getChainId` parameter that
returned `Hex`
* The gas fee controller messenger now requires the
`NetworkController:stateChange` event instead of the
`NetworkController:providerConfigChange` event
  * This does not apply if `onNetworkStateChange` and `getChainId` are
provided to the constructor, which is the case here.
* Update `@metamask/network-controller` dependency and peer dependency
  * This dependency is only used for types, and none of the type
changes affect how the extension interacts with this controller.

The one change that did have an impact is that the constructor
parameter `onNetworkStateChange` now expects event handlers to be
passed the full network state.

Relates to #19271

* Ensure chainid always matches mainnet in test builds

This is a bit strange, but this is how the tests were setup previously.

* Fix accidental state mutation

* Remove hardcoded mainnet chain ID from test builds
2023-06-13 12:13:13 -02:30
Elliot Winkler
f77b1f65e2
Upgrade assets-controllers to v9 (#19472) 2023-06-09 15:48:48 -05:00
Danica Shen
95d57b254f
feature(19463): fix send-eth flaky test and refactor (#19531) 2023-06-09 15:01:12 +01:00
Nidhi Kumari
a8e194a8f6
Send flow UI update (#19465)
* removed recents and added accounts in send flow

* updated add contact button and fixed full screen view

* updated ui for contacts

* fixed lint errors and test

* fixed lint errors

* fixed lint errors

* updated spec files

* fixed lint errors

* updated snapshot

* fixed edit in spec files

* removed unused console statement

* updated snapshot

* added userInput check

* updated snapshot and added hover
2023-06-08 22:39:39 +05:30
Mark Stacey
96c00df6f0
Reduce e2e test flakiness (#19507)
Three e2e tests have been updated to fix a possible race condition
causing intermittent e2e test failures.

In each of the updated tests, the test checks the current network.
The check is performed as a two-step process: locate the current
network element, then check the text to ensure it's correct.

This fails when the test driver finds the element before it re-renders.
If the test runs too quickly, it compares the text before the switch
is shown on screen, and the test fails.

Instead the tests use the element locator to describe what they want.
This tells the test driver to keep looking until the conditions are
met, ensuring the test doesn't fail unless the network switch takes
longer than the default timeout (which should not happen).

This is a good example of why we should avoid using assertions on
elements in e2e tests. Express your assertions as locators instead to
make the test more resilient in the case where the test runs before the
next render.
2023-06-08 14:34:48 -02:30
Danica Shen
d9450f454d
feat(17901): fix network, add-account and mv3 phishing warning issue (#19462)
* feat(17901): fix network, add-account and mv3 phishing warning issue

* feature(17901): trigger a pipeline

* feature(17901): remove findClickale to avoid conflicting clickElement
2023-06-08 14:21:21 +01:00
Howard Braham
2647ae16d2
fix(e2e): flaky test-e2e-chrome on add-custom-network.spec.js (#19487) 2023-06-07 23:39:06 +05:30
Frederik Bolding
789779f4d5
[FLASK] Rework Snaps headers and footers (#19442)
* Add new snap header and footer to snap install

* Add new snap header and footer to snap result and snap update

* Fix loading state

* Fix lint

* Add required scrolling

* Adjust avatar component

* Apply new headers and footers to snaps confirmations

* Rename previous SnapAuthorship component to SnapAuthorshipExpanded

* Fix lint

* Fix font weight

* Fix fencing

* Fix a test

* Fix lint after rebase

* Fix E2E

* Fix locale lint

* Fix another E2E

* Fix test ID

* Address PR comments

* Better scroll button centering

* Address design comments

* Fix unit test

* Fix E2Es
2023-06-07 15:18:49 +02:00
David Walsh
d1dafb0bb6
Remove unwanted console.log in E2E test (#19482) 2023-06-07 00:13:04 -07:00
David Drazic
354788510e
[FLASK] Update UI (for audit) (UI facelift) (#19388)
* Update UI (for audit)

Revert yarn.lock change

Update e2e tests with new copy for a button

Make UI changes to custom Snap UI

Update UI on snap installation success page

Fix icon on installation success

Fix snap name font weight in installation page

Add UI changes for Snap installation failed page

Add new copy for snap installation screen

Update e2e tests OK button name

Update OK button names in e2e tests

Return previous functionality of update flow

Add error message handling for update screens

* Fix after rebase

* Fix messages.json update message

* Revert SCSS changes

* Refactor failed and success screen rendering
2023-06-06 12:15:20 +02:00
Bernardo Garces Chapero
5355000202
Handle watch asset accept and reject using ApprovalController only (#18829) 2023-06-05 21:13:22 +01:00
Danica Shen
16e07b5d79
feature(17901): fix import UI error (#19372) 2023-06-05 14:15:47 +01:00
Frederik Bolding
3b9e2eb5e5
[FLASK] Update snap tweaks (#19410)
* Sort revoked permissions before existing permissions

* Simplify update screen logic and update copy

* Remove approve and update copy

* Reduce nesting
2023-06-05 14:31:11 +02:00
vthomas13
1726fb3fd0
Remove MULTICHAIN flag for NFT badges (#19416) 2023-06-04 12:28:48 -04:00
Jyoti Puri
f1de905be7
Fix details when transferring NFT not added to wallet (#19045) 2023-06-02 18:33:10 +05:30
Danica Shen
3596edd180
feature(17901): fix flaky tests in send-eth e2e (#19397) 2023-06-02 12:54:54 +01:00
David Walsh
b89630fdd2
Release MultiChain 0.5 (#18903)
* Show portfolio icon in ETH overview

* Show new copy button in QR code modal

* Show address copy button in wallet overview

* Update connected status component

* Remove legacy MenuBar

* Remove legacy ImportTokenLink

* Remove AssetListItem

* Remove DetectedTokensLink

* Remove legacy AppHeader

* Remove MULTICHAIN flag from builds.yml

* Remove legacy AccountMenu

* FIX: Token cell snapshot

* Add data-testid for Account Picker

* Remove multichain check in LoadingNetworkScreen

* Remove MULTICHAIN check for AccountDetailsModal

* Remove MULTICHAIN check for AssetList

* Update QR dimensions

* Remove MULTICHAIN declaration from metamaskrc.dist

* Implement PickerNetwork and NetworkListMenu in onboarding

* Remove legacy NetworkDropdown and Dropdown

* Remove documentation about legacy account menu

* FIX: Fixes route tests for missing data-testid=network-display

* Fix account-menu-icon data-testid

* Fix TokenCell test

* FIX Onboarding Flow tests

* Remove unused locales from AccountMenu removal

* E2E: Fix Import Secret Recovery Phrase: logs out of the vault

* E2E: Fix Show account details: should show the QR code for the account

* E2E: Fix add-account.spec.js

* E2E: Fix state-logs.spec.js

* E2E: Fix lock-account.spec.js

* E2E: Fix settings-general.spec.js

* E2E: Fix advanced-settings.spec.js

* E2E: Fix auto-lock.spec.js

* E2E: Fix backup-restore.spec.js

* E2E: Fix clear-activity.spec.js

* E2E: Fix settings-search.spec.js

* E2E: Fix encrypt-decrypt.spec.js

* E2E: Fix dapp-interactions.spec.js

* E2E: Fix test-snap-management.spec.js

* E2E: Fix add-custom-network.spec.js

* E2E: Fix from-import-ui.spec.js

* E2E: Fix provider-api.spec.js

* E2E: Fix chain-interactions.spec.js

* E2E: Fix custom-rpc-history.spec.js

* Remove network icon from overview components

* E2E: Fix user-actions-benchmark.js

* E2E: Fix benchmark.js

* E2E: Fix add-hide-token.spec.js

* E2E: Fix address-book.spec.js

* E2E: Fix custom-token-add-approve.spec.js

* E2E: Fix incremental-security.spec.js

* E2E: Fix metamask-responsive-ui.spec.js

* E2E: Onboarding.spec.js

* E2E: Fix permissions.spec.js

* E2E: Fix send-hex-address.spec.js

* E2E: Fix send-to-contract.spec.js

* Remove dead AccountOptionsMenu test

* E2E: Fix token-details.spec.js

* E2E: Fix switch-custom-network.spec.js

* E2E: Fix metamask-ui.spec.js

* Revert "UX Multichain: updated border top for activity list (#19176)"

This reverts commit 15598f2a23.

* E2Es: Fix test-snap-management.spec.js and test-snap-notification.spec.js

* E2Es: Fix add-account.spec.js after flaky test fixes

* e2e flaky test

* adds back the mmi options

* scss fix

* test fix

* removes unnecessary double quotes

* Prevent double logos on login screen

* Update ui/components/ui/list-item/index.scss

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>

---------

Co-authored-by: seaona <mariona@gmx.es>
Co-authored-by: Antonio Regadas <antonio.regadas@consensys.net>
Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
2023-06-01 16:14:38 -05:00
David Drazic
f788121c3b
[FLASK] Add Snaps privacy warning on snap install (#18835)
* Add Snaps privacy warning on snap install

Add snap install warning status to storage

Add storybook

Add test for snap-privacy-warning

Resolve button type issue

Fix popup display logic

Update fixture

Update popup information and read more handling

Replace deprecated button

Update unit test

* Update buttons and add cancel flow

* Refactoring (review 1)

* Add more unit tests
2023-05-31 14:43:39 +02:00
Danica Shen
49f8052b15
feature(17901): fix failing network error and remove duplicated e2e for mv3 (#19292)
* feature(17901): fix failing network error e2e for mv3

* feature(17901): remove dapp interaction for duplication

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-05-30 14:48:43 +01:00
Danica Shen
8dc6bf1111
feature(17901): fix address-book Sends to an address book entry e2e against MV3 build (#19330)
* feature(17901): fix address-book `Sends to an address book entry` e2e against MV3 build

* feature(17901): add balance guide for send-eth e2e as well

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-05-30 13:44:56 +01:00
Danica Shen
7753364958
feature(17901): disable hardware wallet test with trezor in mv3 (#19287) 2023-05-26 14:05:34 +01:00
Danica Shen
9ea6f8ee12
feature(17901): fix test/e2e/tests/add-account.spec.js (#19280) 2023-05-24 12:50:31 -05:00
Bowen Sanders
290dbd77ce
[FLASK] Create E2E test for snaps network_access endowment (#19213)
* create networkaccess e2e

* final changes

* fixed enums

* requested changes

* fixed result test
2023-05-23 11:54:31 +02:00
Danica Shen
fd8b81def0
feature(16691): mv3 e2e test for phishing warning page when sw restarts (#19196)
* feature(16691): mv3 e2e test for phishing warning page when sw restarts

* feature(16691): code review feedback to remove console and extract helper
2023-05-19 11:17:53 +01:00
Bowen Sanders
52109a1829
[FLASK] Create E2E test for ethereum_provider endowment (#19191) 2023-05-18 08:34:24 -07:00
Nidhi Kumari
ac6fb3bb09
UX Multichain: updated assets to tokens in home page (#19144)
* updated assets to tokens in home page

* lint fix

* lint fix

* updated tests and spec files

* lint fix
2023-05-17 08:30:47 +05:30
Frederik Bolding
125021e425
[FLASK] snaps-monorepo@0.33.1-flask.1 (#18913)
* snaps-monorepo@0.33.0-flask.1

* Add browser-passworder

* Patch babel/core

* Fix PermissionController messenger allowlist

* Update test-snaps

* Use latest patch

* Update LavaMoat policies

* Re-enable RPC E2E

* Make snaps iframe URL be a env variable and bump it

* Add new env variable to test env

* Add iframe URL to desktop build
2023-05-15 19:36:24 +02:00
Bowen Sanders
be8d832426
[FLASK] Create E2E test for snap_GetEntropy (#18998) 2023-05-11 12:43:08 -07:00
Danica Shen
395ac34bed
chore: refactor connect to dapp action in e2e (#19015)
* chore: refactor connect to dapp action in e2e

* chore: refactor 2nd dapp connection

* chore: rename to openDapp
2023-05-05 14:56:08 +01:00
Danica Shen
c49fd49b1d
feature(17946): implement mv3 e2e for popup consistency after service worker restarted (#19010)
* feature(17946): implement mv3 e2e for popup consistency after service worker restarts

* feature(17946): fix typo

---------

Co-authored-by: Dan J Miller <danjm.com@gmail.com>
2023-05-04 20:58:39 +01:00
Jyoti Puri
9c63dfca89
Changes in blockaid texts (#19001) 2023-05-04 23:51:46 +05:30
Frederik Bolding
1646ab110e
[FLASK] Disable RPC test (#19011)
* Disable RPC test

* Fix lint
2023-05-04 19:09:37 +02:00
Pedro Figueiredo
bfbe10ba28
e2e test for action metrics (#18347)
* e2e test for action metrics

* add tests to implementing sw restart delay tracking

* wip

* wip

* wip

* wip

* remove unneeded code

* remove scuttling changes contemplated in #18989
2023-05-04 10:38:09 +04:00
Mark Stacey
d1cea85f33
Rename provider to providerConfig (#18907)
* Rename `provider` to `providerConfig`

The network controller `provider` state has been renamed to
 `providerConfig`. This better reflects what this state is, and makes
this controller more closely aligned with the core network controller.

All references to the provider configuration have been updated to
prefer `providerConfig` over `provider`, to make the distinction clear
between a provider and provider config.

Closes #18902

* Add migration
2023-05-02 13:23:20 -02:30
Frederik Bolding
55d974d7b2
Bump Circle CI docker image (#18914)
* Bump Circle CI docker image

* Stop removing FF since it doesn't exist

* Use Circle CI browser tools

* Fix config name

* Fix browser tools args

* Fix Chrome version

* Use script for chrome

* Try update

* Try FF without browser-tools2

* Fix FF binary path

* Force enable e2e debug

* Add some logs

* More logs

* Disable XSET check for now

* Delete x-server logic

* remove another usage of the x-server logic
2023-05-02 17:10:53 +02:00
Peter
a9243077b4
Terms of use e2e (#18861)
* use substitution

* add test
2023-04-28 14:37:06 +01:00
David Walsh
e339afce7a
UX: Multichain: Analytics (#18674) 2023-04-27 09:28:08 -05:00
seaona
6e4de3bee8
[e2e] test-dapp update to v6.0.0 (#18844)
* Test dapp update to v6.0.0 and tweak initial token amounts to adjust to the new contract

* Update gas estimates for new TST contract

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-04-27 13:01:17 +02:00