Skip to content

Commit ec8ed70

Browse files
committed
update readme for e2e test
1 parent 4c6bba1 commit ec8ed70

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

README.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,24 @@ For Jest debugging guide using Node.js, see [docs/tests/jest.md](docs/tests/jest
109109

110110
### Running E2E Tests
111111

112-
Our e2e test suite can be run on either Firefox or Chrome.
112+
Our e2e test suite ensures the MetaMask extension functions correctly across both Firefox and Chrome browsers. Here's how to get started with e2e testing:
113113

114-
1. **required** `yarn build:test` to create a test build.
115-
2. run tests, targeting the browser:
114+
#### Preparing a Test Build
116115

117-
- Firefox e2e tests can be run with `yarn test:e2e:firefox`.
118-
- Chrome e2e tests can be run with `yarn test:e2e:chrome`. The `chromedriver` package major version must match the major version of your local Chrome installation. If they don't match, update whichever is behind before running Chrome e2e tests.
116+
Before running e2e tests, you'll need a test build. You have two options:
119117

120-
These test scripts all support additional options, which might be helpful for debugging. Run the script with the flag `--help` to see all options.
118+
1. Use `yarn download-builds:test` to quickly download and unzip test builds for Chrome and Firefox into the `./dist/` folder.
119+
2. Create a Custom Test Build: For testing against different build types, use `yarn build:test`. This command allows you to generate test builds for various types, including:
120+
- `build:test` for main build
121+
- `build:test:flask` for flask build
122+
- `build:test:mmi` for mmi build
123+
- `build:test:mv3` for mv3 build
124+
125+
#### Running Tests
126+
Once you have your test build ready, choose the browser for your e2e tests:
127+
- For Firefox, run `yarn test:e2e:firefox`.
128+
- For Chrome, run `yarn test:e2e:chrome`.
129+
These scripts support additional options for debugging. Use `--help`to see all available options.
121130

122131
#### Running a single e2e test
123132

@@ -138,7 +147,7 @@ Single e2e tests can be run with `yarn test:e2e:single test/e2e/tests/TEST_NAME.
138147
```
139148

140149
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:
141-
`yarn test:e2e:single test/e2e/tests/account-details.spec.js --browser=chrome --debug --leave-running`
150+
`yarn test:e2e:single test/e2e/tests/account-menu/account-details.spec.js --browser=chrome --debug --leave-running`
142151

143152
#### Running specific builds types e2e test
144153

0 commit comments

Comments
 (0)