From c0574f4bcf8c51b3c04f48f2bbe51465ed1e8f14 Mon Sep 17 00:00:00 2001 From: Nick Gambino <35090461+gambinish@users.noreply.github.com> Date: Wed, 27 Nov 2024 12:04:03 -0800 Subject: [PATCH] feat: Turn on `PortfolioView` (#28661) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** Sets `PORTFOLIO_VIEW` feature flag to `true`. Rather than fully removing this, we are defaulting to true in case we need to roll the feature back behind the feature flag. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/28661?quickstart=1) ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** ### **Before** ### **After** ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --------- Co-authored-by: Salim TOUBAL --- builds.yml | 2 +- ...rrors-after-init-opt-in-background-state.json | 10 ++++++++-- .../errors-after-init-opt-in-ui-state.json | 16 +++++++++++++--- test/e2e/tests/tokens/import-tokens.spec.js | 7 +++++++ test/e2e/tests/tokens/token-details.spec.ts | 2 +- 5 files changed, 30 insertions(+), 7 deletions(-) diff --git a/builds.yml b/builds.yml index 75f6f4b462c6..c27d79a9a034 100644 --- a/builds.yml +++ b/builds.yml @@ -285,7 +285,7 @@ env: # Determines if feature flagged Chain permissions - CHAIN_PERMISSIONS: '' # Determines if Portfolio View UI should be shown - - PORTFOLIO_VIEW: '' + - PORTFOLIO_VIEW: 'true' # Enables use of test gas fee flow to debug gas fee estimation - TEST_GAS_FEE_FLOWS: false # Temporary mechanism to enable security alerts API prior to release diff --git a/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json b/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json index 450ef4ee7ebb..1df430082f3e 100644 --- a/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json +++ b/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json @@ -238,7 +238,11 @@ "redesignedTransactionsEnabled": "boolean", "tokenSortConfig": "object", "tokenNetworkFilter": { - "0x539": "boolean" + "0x1": "boolean", + "0x539": "boolean", + "0xaa36a7": "boolean", + "0xe705": "boolean", + "0xe708": "boolean" }, "shouldShowAggregatedBalancePopover": "boolean" }, @@ -323,7 +327,9 @@ "TokenListController": { "tokenList": "object", "tokensChainsCache": { - "0x539": "object" + "0x1": "object", + "0x539": "object", + "0xe708": "object" }, "preventPollingOnNetworkRestart": false }, diff --git a/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-ui-state.json b/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-ui-state.json index c890588da16a..9988234cac2e 100644 --- a/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-ui-state.json +++ b/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-ui-state.json @@ -36,8 +36,14 @@ "showMultiRpcModal": "boolean", "isRedesignedConfirmationsDeveloperEnabled": "boolean", "tokenSortConfig": "object", + "tokenNetworkFilter": { + "0x1": "boolean", + "0x539": "boolean", + "0xaa36a7": "boolean", + "0xe705": "boolean", + "0xe708": "boolean" + }, "shouldShowAggregatedBalancePopover": "boolean", - "tokenNetworkFilter": { "0x539": "boolean" }, "redesignedConfirmationsEnabled": true, "redesignedTransactionsEnabled": "boolean" }, @@ -174,7 +180,12 @@ "gasEstimateType": "none", "nonRPCGasFeeApisDisabled": "boolean", "tokenList": "object", - "tokensChainsCache": { "0x539": "object" }, + "tokensChainsCache": { + "0x1": "object", + "0x539": "object", + "0xe708": "object" + }, + "tokenBalances": "object", "preventPollingOnNetworkRestart": false, "tokens": "object", "ignoredTokens": "object", @@ -182,7 +193,6 @@ "allTokens": {}, "allIgnoredTokens": {}, "allDetectedTokens": {}, - "tokenBalances": "object", "smartTransactionsState": { "fees": {}, "feesByChainId": "object", diff --git a/test/e2e/tests/tokens/import-tokens.spec.js b/test/e2e/tests/tokens/import-tokens.spec.js index 7b1bf60964ab..b15c9ffb100a 100644 --- a/test/e2e/tests/tokens/import-tokens.spec.js +++ b/test/e2e/tests/tokens/import-tokens.spec.js @@ -91,6 +91,13 @@ describe('Import flow', function () { '[data-testid="token-list-loading-message"]', ); + await driver.assertElementNotPresent( + '[data-testid="token-list-loading-message"]', + ); + + await driver.clickElement('[data-testid="sort-by-networks"]'); + await driver.clickElement('[data-testid="network-filter-current"]'); + const expectedTokenListElementsAreFound = await driver.elementCountBecomesN('.multichain-token-list-item', 4); assert.equal(expectedTokenListElementsAreFound, true); diff --git a/test/e2e/tests/tokens/token-details.spec.ts b/test/e2e/tests/tokens/token-details.spec.ts index 2ee84d339ea8..c882c7c8b4b4 100644 --- a/test/e2e/tests/tokens/token-details.spec.ts +++ b/test/e2e/tests/tokens/token-details.spec.ts @@ -47,7 +47,7 @@ describe('Token Details', function () { const openTokenDetails = async (driver: Driver) => { await driver.clickElement('[data-testid="account-overview__asset-tab"]'); - const [, tkn] = await driver.findElements( + const [, , tkn] = await driver.findElements( '[data-testid="multichain-token-list-button"]', ); await tkn.click();