From 43fd3db8bcf0fcf26222aee349bc429836104230 Mon Sep 17 00:00:00 2001 From: Ramon Acitores Date: Fri, 22 Sep 2023 09:44:05 +0200 Subject: [PATCH] feat: update documentation --- README.md | 10 ++++++++++ test/e2e/run-e2e-test.js | 3 +++ 2 files changed, 13 insertions(+) diff --git a/README.md b/README.md index c817f3c570d6..a07efd30327c 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,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. diff --git a/test/e2e/run-e2e-test.js b/test/e2e/run-e2e-test.js index 0d28e40d6eea..ca8ee6966ccd 100644 --- a/test/e2e/run-e2e-test.js +++ b/test/e2e/run-e2e-test.js @@ -122,7 +122,10 @@ async function main() { const configFile = path.join(__dirname, '.mocharc.js'); const extraArgs = process.env.E2E_ARGS?.split(' ') || []; + // If mmi flag is passed if (mmi) { + // Tests that contains `@no-mmi` will be grep (-g) and inverted (-i) + // meaning that all tests with @no-mmi in the title will be ignored extraArgs.push('-g', '@no-mmi', '-i'); }