Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:MetaMask/metamask-extension into…
Browse files Browse the repository at this point in the history
… doc/manual-scenario-show-test-network-toggle-21988
  • Loading branch information
hjetpoluru committed Jun 25, 2024
2 parents 3290de8 + bda7cdd commit b0e4e14
Show file tree
Hide file tree
Showing 88 changed files with 3,841 additions and 2,618 deletions.
44 changes: 38 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ workflows:
- test-e2e-chrome-rpc:
requires:
- prep-build-test
- test-api-specs:
requires:
- prep-build-test
- test-e2e-chrome-multiple-providers:
requires:
- prep-build-test
Expand Down Expand Up @@ -233,7 +236,7 @@ workflows:
- test-unit-jest-development:
requires:
- prep-deps
- upload-and-validate-coverage:
- upload-coverage:
requires:
- test-unit-jest-main
- test-unit-jest-development
Expand Down Expand Up @@ -283,7 +286,7 @@ workflows:
- test-unit-jest-main
- test-unit-jest-development
- test-unit-global
- upload-and-validate-coverage
- upload-coverage
- validate-source-maps
- validate-source-maps-beta
- validate-source-maps-flask
Expand Down Expand Up @@ -1048,6 +1051,38 @@ jobs:
name: depcheck
command: yarn depcheck

test-api-specs:
executor: node-browsers-medium-plus
steps:
- run: *shallow-git-clone
- run: sudo corepack enable
- attach_workspace:
at: .
- run:
name: Move test build to dist
command: mv ./dist-test ./dist
- run:
name: Move test zips to builds
command: mv ./builds-test ./builds
- gh/install
- run:
name: test:api-specs
command: |
timeout 20m yarn test:api-specs --retries 2
no_output_timeout: 5m
- run:
name: Comment on PR
command: |
if [ -f html-report/index.html ]; then
gh pr comment "${CIRCLE_PR_NUMBER}" --body ":x: API Spec Test Failed. View the report [here](https://output.circle-artifacts.com/output/job/${CIRCLE_WORKFLOW_JOB_ID}/artifacts/${CIRCLE_NODE_INDEX}/html-report/index.html)."
else
echo "API Spec Report not found!"
fi
when: on_fail
- store_artifacts:
path: html-report
destination: html-report

test-e2e-chrome:
executor: node-browsers-medium-plus
parallelism: 20
Expand Down Expand Up @@ -1642,17 +1677,14 @@ jobs:
- store_test_results:
path: test/test-results/junit.xml

upload-and-validate-coverage:
upload-coverage:
executor: node-browsers-small
steps:
- run: *shallow-git-clone
- run: sudo corepack enable
- attach_workspace:
at: .
- codecov/upload
- run:
name: test:coverage:validate
command: yarn test:coverage:validate
- persist_to_workspace:
root: .
paths:
Expand Down
2 changes: 0 additions & 2 deletions .depcheckrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ ignores:
- 'wait-on'
- 'tsx' # used in .devcontainer
- 'prettier-eslint' # used by the Prettier ESLint VSCode extension
# development tool
- 'nyc'
# storybook
- '@storybook/cli'
- '@storybook/core'
Expand Down
34 changes: 4 additions & 30 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ module.exports = {
'development/**/*.js',
'test/e2e/**/*.js',
'test/helpers/*.js',
'test/lib/wait-until-called.js',
'test/run-unit-tests.js',
'test/merge-coverage.js',
],
extends: [
path.resolve(__dirname, '.eslintrc.base.js'),
Expand Down Expand Up @@ -94,8 +92,6 @@ module.exports = {
'test/stub/**/*.js',
'test/unit-global/**/*.js',
],
// TODO: Convert these files to modern JS
excludedFiles: ['test/lib/wait-until-called.js'],
extends: [
path.resolve(__dirname, '.eslintrc.base.js'),
path.resolve(__dirname, '.eslintrc.node.js'),
Expand Down Expand Up @@ -261,30 +257,7 @@ module.exports = {
* Mocha library.
*/
{
files: [
'**/*.test.js',
'test/lib/wait-until-called.js',
'test/e2e/**/*.spec.js',
],
excludedFiles: [
'app/scripts/controllers/app-state.test.js',
'app/scripts/controllers/mmi-controller.test.js',
'app/scripts/metamask-controller.actions.test.js',
'app/scripts/detect-multiple-instances.test.js',
'app/scripts/controllers/swaps.test.js',
'app/scripts/controllers/metametrics.test.js',
'app/scripts/controllers/permissions/**/*.test.js',
'app/scripts/controllers/preferences.test.js',
'app/scripts/lib/**/*.test.js',
'app/scripts/metamask-controller.test.js',
'app/scripts/migrations/*.test.js',
'app/scripts/platforms/*.test.js',
'development/**/*.test.js',
'shared/**/*.test.js',
'ui/**/*.test.js',
'ui/__mocks__/*.js',
'test/e2e/helpers.test.js',
],
files: ['test/e2e/**/*.spec.js', 'test/unit-global/*.test.js'],
extends: ['@metamask/eslint-config-mocha'],
rules: {
// In Mocha tests, it is common to use `this` to store values or do
Expand All @@ -297,7 +270,9 @@ module.exports = {
* Jest tests
*
* These are files that make use of globals and syntax introduced by the
* Jest library. The files in this section should match the Mocha excludedFiles section.
* Jest library.
* TODO: This list of files is incomplete, and should be replaced with globs that match the
* Jest config.
*/
{
files: [
Expand Down Expand Up @@ -391,7 +366,6 @@ module.exports = {
'test/e2e/benchmark.js',
'test/helpers/setup-helper.js',
'test/run-unit-tests.js',
'test/merge-coverage.js',
],
rules: {
'node/no-process-exit': 'off',
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,7 @@ lavamoat/**/policy-debug.json

# Attributions
licenseInfos.json

# API Spec tests
html-report/

17 changes: 0 additions & 17 deletions .mocharc.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
module.exports = {
// TODO: Remove the `exit` setting, it can hide broken tests.
exit: true,
ignore: [
'./app/scripts/lib/**/*.test.js',
'./app/scripts/migrations/*.test.js',
'./app/scripts/platforms/*.test.js',
'./app/scripts/controllers/app-state.test.js',
'./app/scripts/controllers/permissions/**/*.test.js',
'./app/scripts/controllers/mmi-controller.test.ts',
'./app/scripts/metamask-controller.actions.test.js',
'./app/scripts/detect-multiple-instances.test.js',
'./app/scripts/controllers/swaps.test.js',
'./app/scripts/controllers/metametrics.test.js',
'./app/scripts/controllers/preferences.test.js',
'./app/scripts/constants/error-utils.test.js',
'./app/scripts/metamask-controller.test.js',
'./development/fitness-functions/**/*.test.ts',
'./test/e2e/helpers.test.js',
],
recursive: true,
require: ['test/env.js', 'test/setup.js'],
};
120 changes: 0 additions & 120 deletions .yarn/patches/@metamask-keyring-controller-npm-15.0.0-fa070ce311.patch

This file was deleted.

40 changes: 0 additions & 40 deletions app/_locales/de/messages.json

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

Loading

0 comments on commit b0e4e14

Please sign in to comment.