Skip to content

Commit

Permalink
Merge branch 'develop' into 230920-update-readme-dev-build
Browse files Browse the repository at this point in the history
  • Loading branch information
MajorLift authored Sep 22, 2023
2 parents 24ada05 + 5f368d5 commit 2aebfdf
Show file tree
Hide file tree
Showing 109 changed files with 2,673 additions and 1,642 deletions.
105 changes: 105 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ workflows:
- prep-build-test-flask:
requires:
- prep-deps
- prep-build-test-mmi:
requires:
- prep-deps
- prep-build-storybook:
requires:
- prep-deps
Expand Down Expand Up @@ -162,6 +165,12 @@ workflows:
- test-e2e-firefox-snaps-flask:
requires:
- prep-build-test-flask
- test-e2e-chrome-mmi:
requires:
- prep-build-test-mmi
- test-e2e-chrome-rpc-mmi:
requires:
- prep-build-test-mmi
- test-e2e-chrome-mv3:
requires:
- prep-build-test-mv3
Expand Down Expand Up @@ -248,6 +257,8 @@ workflows:
- test-e2e-firefox-snaps
- test-e2e-chrome-snaps-flask
- test-e2e-firefox-snaps-flask
- test-e2e-chrome-mmi
- test-e2e-chrome-rpc-mmi
- test-storybook
- benchmark:
requires:
Expand Down Expand Up @@ -579,6 +590,27 @@ jobs:
- dist-test-flask
- builds-test-flask

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

prep-build-test-mv3:
executor: node-browsers-medium-plus
steps:
Expand Down Expand Up @@ -855,6 +887,42 @@ jobs:
- store_test_results:
path: test/test-results/e2e.xml

test-e2e-chrome-rpc-mmi:
executor: node-browsers
steps:
- checkout
- run:
name: Re-Install Chrome
command: ./.circleci/scripts/chrome-install.sh
- attach_workspace:
at: .
- run:
name: Move test build to dist
command: mv ./dist-test-mmi ./dist
- run:
name: Move test zips to builds
command: mv ./builds-test-mmi ./builds
- run:
name: test:e2e:chrome:rpc
command: |
if .circleci/scripts/test-run-e2e.sh
then
yarn test:e2e:chrome:rpc --retries 2 --debug --build-type=mmi
fi
no_output_timeout: 20m
- run:
name: Merge JUnit report
command: |
if [ "$(ls -A test/test-results/e2e)" ]; then
yarn test:e2e:report
fi
when: always
- store_artifacts:
path: test-artifacts
destination: test-artifacts
- store_test_results:
path: test/test-results/e2e.xml

test-e2e-firefox-snaps:
executor: node-browsers
parallelism: 4
Expand Down Expand Up @@ -1003,6 +1071,43 @@ jobs:
- store_test_results:
path: test/test-results/e2e.xml

test-e2e-chrome-mmi:
executor: node-browsers
parallelism: 4
steps:
- run: *shallow-git-clone
- run:
name: Re-Install Chrome
command: ./.circleci/scripts/chrome-install.sh
- attach_workspace:
at: .
- run:
name: Move test build to dist
command: mv ./dist-test-mmi ./dist
- run:
name: Move test zips to builds
command: mv ./builds-test-mmi ./builds
- run:
name: test:e2e:chrome:mmi
command: |
if .circleci/scripts/test-run-e2e.sh
then
yarn test:e2e:chrome:mmi --retries 2 --debug --build-type=mmi
fi
no_output_timeout: 20m
- run:
name: Merge JUnit report
command: |
if [ "$(ls -A test/test-results/e2e)" ]; then
yarn test:e2e:report
fi
when: always
- store_artifacts:
path: test-artifacts
destination: test-artifacts
- store_test_results:
path: test/test-results/e2e.xml

test-e2e-firefox:
executor: node-browsers-medium-plus
parallelism: 8
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,16 @@ Single e2e tests can be run with `yarn test:e2e:single test/e2e/tests/TEST_NAME.
For example, to run the `account-details` tests using Chrome, with debug logging and with the browser set to remain open upon failure, you would use:
`yarn test:e2e:single test/e2e/tests/account-details.spec.js --browser=chrome --debug --leave-running`

#### Running specific builds types e2e test

Differnt build types have different e2e tests sets. In order to run them look in the `packaje.json` file. You will find:
```console
"test:e2e:chrome:mmi": "SELENIUM_BROWSER=chrome node test/e2e/run-all.js --mmi",
"test:e2e:chrome:snaps": "SELENIUM_BROWSER=chrome node test/e2e/run-all.js --snaps",
"test:e2e:chrome:mv3": "SELENIUM_BROWSER=chrome node test/e2e/run-all.js --mv3",
```
Note: MMI runs a subset of MetaMask's e2e tests. To facilitate this, we have appended the `@no-mmi` tags to the names of those tests that are not applicable to this build type.

### Changing dependencies

Whenever you change dependencies (adding, removing, or updating, either in `package.json` or `yarn.lock`), there are various files that must be kept up-to-date.
Expand Down
3 changes: 0 additions & 3 deletions app/_locales/de/messages.json

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

3 changes: 0 additions & 3 deletions app/_locales/el/messages.json

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

19 changes: 16 additions & 3 deletions app/_locales/en/messages.json

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

3 changes: 0 additions & 3 deletions app/_locales/es/messages.json

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

3 changes: 0 additions & 3 deletions app/_locales/fr/messages.json

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

3 changes: 0 additions & 3 deletions app/_locales/hi/messages.json

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

3 changes: 0 additions & 3 deletions app/_locales/id/messages.json

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

3 changes: 0 additions & 3 deletions app/_locales/ja/messages.json

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

3 changes: 0 additions & 3 deletions app/_locales/ko/messages.json

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

3 changes: 0 additions & 3 deletions app/_locales/pt/messages.json

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

3 changes: 0 additions & 3 deletions app/_locales/ru/messages.json

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

3 changes: 0 additions & 3 deletions app/_locales/tl/messages.json

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

3 changes: 0 additions & 3 deletions app/_locales/tr/messages.json

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

3 changes: 0 additions & 3 deletions app/_locales/vi/messages.json

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

3 changes: 0 additions & 3 deletions app/_locales/zh_CN/messages.json

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

2 changes: 1 addition & 1 deletion app/scripts/controllers/mmi-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ export default class MMIController extends EventEmitter {

// FIXME: status maps are not a thing anymore
this.custodyController.storeCustodyStatusMap(
custodian.name,
custodian.envName,
keyring.getStatusMap(),
);

Expand Down
17 changes: 17 additions & 0 deletions app/scripts/controllers/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ export default class PreferencesController {
///: BEGIN:ONLY_INCLUDE_IN(blockaid)
securityAlertsEnabled: false,
///: END:ONLY_INCLUDE_IN
///: BEGIN:ONLY_INCLUDE_IN(keyring-snaps)
addSnapAccountEnabled: false,
///: END:ONLY_INCLUDE_IN
advancedGasFee: {},

// WARNING: Do not use feature flags for security-sensitive things.
Expand Down Expand Up @@ -240,6 +243,20 @@ export default class PreferencesController {
}
///: END:ONLY_INCLUDE_IN

///: BEGIN:ONLY_INCLUDE_IN(keyring-snaps)
/**
* Setter for the `addSnapAccountEnabled` property.
*
* @param {boolean} addSnapAccountEnabled - Whether or not the user wants to
* enable the "Add Snap accounts" button.
*/
setAddSnapAccountEnabled(addSnapAccountEnabled) {
this.store.updateState({
addSnapAccountEnabled,
});
}
///: END:ONLY_INCLUDE_IN

/**
* Setter for the `advancedGasFee` property
*
Expand Down
Loading

0 comments on commit 2aebfdf

Please sign in to comment.