MetaMask / MetaMask/metamask-extension
e2e: Improve the responsive logic and its documentation for testing small window size
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
### What is this about?
From @Gudahtt,
- Convert the drivers to TypeScript, and use a shared type so that it's clearer they should be shared
- Add a JSDoc comment explaining what these options are for
- Add a JSDoc comment to the buildBrowserWebDriver function in test/e2e/webdriver/index.js to document these shared options, and explain what they are for
- Replace responsive with a viewport option to specify desired width and height, and conditionally decide when to use the devtools hack within the Chrome driver
- Find an alternative solution to reducing the viewport (e.g. open the extension in an iframe within another extension page)
In this PR, the responsive functionality was restored after being broken: https://github.com/MetaMask/metamask-extension/pull/25932
Thread for more context: https://consensys.slack.com/archives/CTQAGKY5V/p1721256441247509
### Scenario
_No response_
### Design
_No response_
### Technical Details
_No response_
### Threat Modeling Framework
_No response_
### Acceptance Criteria
_No response_
### Stakeholder review needed before the work gets merged
- [ ] Engineering (needed in most cases)
- [ ] Design
- [ ] Product
- [ ] QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
- [ ] Security
- [ ] Legal
- [ ] Marketing
- [ ] Management (please specify)
- [ ] Other (please specify)
### References
_No response_
Contributor guide
Research direction
Start with test/e2e/webdriver/index.js and inspect the existing driver options and responsive behavior. Review the referenced PR and context thread before choosing an approach. Done means shared TypeScript driver options are documented, viewport sizing behaves correctly for small windows, and an alternative to the Chrome devtools hack is identified or implemented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- devtools, testing
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100