Skip to content

Commit

Permalink
feat: update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
racitores committed Sep 22, 2023
1 parent 9273971 commit 43fd3db
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 3 additions & 0 deletions test/e2e/run-e2e-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

Expand Down

0 comments on commit 43fd3db

Please sign in to comment.