Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into chloe-reorganize-e…
Browse files Browse the repository at this point in the history
…2e-2
  • Loading branch information
chloeYue committed Apr 29, 2024
2 parents 4b7773a + bbb372f commit 3ab6fe1
Show file tree
Hide file tree
Showing 31 changed files with 1,235 additions and 33 deletions.
91 changes: 91 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ workflows:
- prep-build-multichain-test:
requires:
- prep-deps
- prep-build-confirmation-redesign-test:
requires:
- prep-deps
- prep-build-test-mv3:
requires:
- prep-deps
Expand Down Expand Up @@ -168,9 +171,15 @@ workflows:
- test-e2e-chrome-multichain:
requires:
- prep-build-multichain-test
- test-e2e-chrome-confirmation-redesign:
requires:
- prep-build-confirmation-redesign-test
- test-e2e-firefox:
requires:
- prep-build-test
- test-e2e-firefox-confirmation-redesign:
requires:
- prep-build-confirmation-redesign-test
- test-e2e-chrome-rpc:
requires:
- prep-build-test
Expand Down Expand Up @@ -283,6 +292,8 @@ workflows:
- test-e2e-chrome
- test-e2e-chrome-multichain
- test-e2e-chrome-multiple-providers
- test-e2e-chrome-confirmation-redesign
- test-e2e-firefox-confirmation-redesign
- test-e2e-firefox
- test-e2e-chrome-flask
- test-e2e-firefox-flask
Expand Down Expand Up @@ -803,6 +814,27 @@ jobs:
- dist-test-multichain
- builds-test-multichain

prep-build-confirmation-redesign-test:
executor: node-browsers-medium-plus
steps:
- run: *shallow-git-clone
- attach_workspace:
at: .
- run:
name: Build extension for testing
command: ENABLE_CONFIRMATION_REDESIGN=1 yarn build:test
- run:
name: Move test build to 'dist-test' to avoid conflict with production build
command: mv ./dist ./dist-test-confirmations
- run:
name: Move test zips to 'builds-test' to avoid conflict with production build
command: mv ./builds ./builds-test-confirmations
- persist_to_workspace:
root: .
paths:
- dist-test-confirmations
- builds-test-confirmations

prep-build-storybook:
executor: node-browsers-medium-plus
steps:
Expand Down Expand Up @@ -991,6 +1023,35 @@ jobs:
- store_test_results:
path: test/test-results/e2e

test-e2e-chrome-confirmation-redesign:
executor: node-browsers-medium-plus
parallelism: 20
steps:
- run: *shallow-git-clone
- attach_workspace:
at: .
- run:
name: Move test build to dist
command: mv ./dist-test-confirmations ./dist
- run:
name: Move test zips to builds
command: mv ./builds-test-confirmations ./builds
- run:
name: test:e2e:chrome-confirmation-redesign
command: |
if .circleci/scripts/test-run-e2e.sh
then
timeout 20m yarn test:e2e:chrome --retries 2
fi
no_output_timeout: 5m
environment:
ENABLE_CONFIRMATION_REDESIGN: 1
- store_artifacts:
path: test-artifacts
destination: test-artifacts
- store_test_results:
path: test/test-results/e2e

test-e2e-chrome-mv3:
executor: node-browsers-medium-plus
parallelism: 16
Expand Down Expand Up @@ -1260,6 +1321,36 @@ jobs:
- store_test_results:
path: test/test-results/e2e

test-e2e-firefox-confirmation-redesign:
executor: node-browsers-medium-plus
parallelism: 20
steps:
- run: *shallow-git-clone
- attach_workspace:
at: .
- run:
name: Move test build to dist
command: mv ./dist-test-confirmations ./dist
- run:
name: Move test zips to builds
command: mv ./builds-test-confirmations ./builds
- run:
name: test:e2e:firefox-confirmation-redesign
command: |
if .circleci/scripts/test-run-e2e.sh
then
timeout 20m yarn test:e2e:firefox --retries 2
fi
no_output_timeout: 5m
environment:
ENABLE_CONFIRMATION_REDESIGN: 1
- store_artifacts:
path: test-artifacts
destination: test-artifacts
- store_test_results:
path: test/test-results/e2e


benchmark:
executor: node-browsers-small
steps:
Expand Down
9 changes: 9 additions & 0 deletions app/_locales/en/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions app/scripts/controllers/permissions/enums.js

This file was deleted.

5 changes: 5 additions & 0 deletions app/scripts/controllers/permissions/enums.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export enum NOTIFICATION_NAMES {
accountsChanged = 'metamask_accountsChanged',
unlockStateChanged = 'metamask_unlockStateChanged',
chainChanged = 'metamask_chainChanged',
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { MESSAGE_TYPE } from '../../../../../shared/constants/app';
import addEthereumChain from './add-ethereum-chain';
import ethAccounts from './eth-accounts';
import getProviderState from './get-provider-state';
Expand All @@ -16,7 +17,15 @@ import mmiSetAccountAndNetwork from './institutional/mmi-set-account-and-network
import mmiOpenAddHardwareWallet from './institutional/mmi-open-add-hardware-wallet';
///: END:ONLY_INCLUDE_IF

const handlers = [
type MessageType = (typeof MESSAGE_TYPE)[keyof typeof MESSAGE_TYPE];

type HandlerInterface = {
methodNames: MessageType[];
implementation: unknown;
hookNames?: { [key: string]: boolean };
};

const handlers: HandlerInterface[] = [
addEthereumChain,
ethAccounts,
getProviderState,
Expand All @@ -34,4 +43,5 @@ const handlers = [
mmiOpenAddHardwareWallet,
///: END:ONLY_INCLUDE_IF
];

export default handlers;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@
"@metamask/snaps-sdk": "^4.0.1",
"@metamask/snaps-utils": "^7.1.1",
"@metamask/transaction-controller": "^28.1.0",
"@metamask/user-operation-controller": "^6.0.0",
"@metamask/user-operation-controller": "^8.0.1",
"@metamask/utils": "^8.2.1",
"@ngraveio/bc-ur": "^1.1.12",
"@noble/ciphers": "^0.5.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"activeTab": "object",
"appState": "object",
"confirm": "object",
"confirmAlerts": "object",
"confirmTransaction": "object",
"gas": { "customData": { "price": null, "limit": null } },
"history": { "mostRecentOverviewPage": "/" },
Expand Down

0 comments on commit 3ab6fe1

Please sign in to comment.