Skip to content

Commit

Permalink
Merge branch 'MMI-fix-pw-test' of github.com:MetaMask/metamask-extens…
Browse files Browse the repository at this point in the history
…ion into MMI-fix-pw-test
  • Loading branch information
zone-live committed Apr 30, 2024
2 parents 7fc198f + b6c5b4e commit aac4fde
Show file tree
Hide file tree
Showing 93 changed files with 4,854 additions and 472 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
97 changes: 88 additions & 9 deletions app/_locales/en/messages.json

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

Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ export const NOTIFICATION_CHAINS = {
LINEA: '59144',
};

export const CHAIN_SYMBOLS = {
[NOTIFICATION_CHAINS.ETHEREUM]: 'ETH',
[NOTIFICATION_CHAINS.OPTIMISM]: 'ETH',
[NOTIFICATION_CHAINS.BSC]: 'BNB',
[NOTIFICATION_CHAINS.POLYGON]: 'MATIC',
[NOTIFICATION_CHAINS.ARBITRUM]: 'ETH',
[NOTIFICATION_CHAINS.AVALANCHE]: 'AVAX',
[NOTIFICATION_CHAINS.LINEA]: 'ETH',
};

export const SUPPORTED_CHAINS = [
NOTIFICATION_CHAINS.ETHEREUM,
NOTIFICATION_CHAINS.OPTIMISM,
Expand Down
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',
}

0 comments on commit aac4fde

Please sign in to comment.