* initial fixes to E2Es
* changed test website
* final E2E fixes
* fixed getentropy test
* missing scroll fix
* scrollfix for bip44 firefox
* added new function and edited tests
Our e2e test driver was building the locator object multiple times over
in some cases. The `Locator` object is required by certain webdriver
methods, but our driver methods all accept a "raw locator".
This change avoids a few redundant calls, and makes it easier to
improve the error message for a timeout failure (which will be done in
a later PR). It also makes the code match the documentation/parameter
names.
* feat(srp): add a quiz to the SRP reveal
* fixed the popover header centering
* lint fixes
* converted from `ui/components/ui/popover` to `ui/components/component-library/modal`
* responded to @darkwing review
* added unit tests
* renamed the folder to 'srp-quiz-modal'
* responded to Monte's review
* using i18n-helper in the test suite
* small improvement to JSXDict comments
* wrote a new webdriver.holdMouseDownOnElement() to assist with testing the "Hold to reveal SRP" button
* Updating layout and some storybook naming and migrating to tsx
* Apply suggestions from @georgewrmarshall
Co-authored-by: George Marshall <george.marshall@consensys.net>
* Unit test searches by data-testid instead of by text
* new layout and copy for the Settings->Security page
* now with 100% test coverage for /ui/pages/settings/security-tab
fixes#16871fixes#18140
* e2e tests to reveal SRP after quiz
* e2e- Fix lint, remove unneeded extras
* @coreyjanssen and @georgewrmarshall compromise
Co-authored-by: George Marshall <george.marshall@consensys.net>
Co-authored-by: Corey Janssen <corey.janssen@consensys.net>
* trying isRequired again
* transparent background on PNG
* [e2e] moving functions to helpers and adding testid for SRP reveal quiz (#19481)
* moving functions to helpers and adding testid
* fix lint error
* took out the IPFS gateway fixes
* lint fix
* translations of SRP Reveal Quiz
* new Spanish translation from Guto
* Update describe for e2e tests
* Apply suggestion from @georgewrmarshall
Co-authored-by: George Marshall <george.marshall@consensys.net>
* fixed the Tab key problem
---------
Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
Co-authored-by: Plasma Corral <32695229+plasmacorral@users.noreply.github.com>
Co-authored-by: Corey Janssen <corey.janssen@consensys.net>
* feature(17946): implement mv3 e2e for popup consistency after service worker restarts
* feature(17946): fix typo
---------
Co-authored-by: Dan J Miller <danjm.com@gmail.com>
* Bump Circle CI docker image
* Stop removing FF since it doesn't exist
* Use Circle CI browser tools
* Fix config name
* Fix browser tools args
* Fix Chrome version
* Use script for chrome
* Try update
* Try FF without browser-tools2
* Fix FF binary path
* Force enable e2e debug
* Add some logs
* More logs
* Disable XSET check for now
* Delete x-server logic
* remove another usage of the x-server logic
If an e2e test fails on a website, the driver will crash on this line
because it can't find a reference to `stateHooks`. That variable is
only set in our UI, not on other sites.
* Prevent user from editing a contract interaction created by a dapp
* Code cleanup
* Fix e2e test selector
* Fix e2e test
* Fix e2e test
* Update snapshot
* add env variables to test build
* add data-testid attribute to home component
* add method to retrieve the url of the current page
* add portfolio site test
Co-authored-by: ryanml <ryanlanese@gmail.com>
* origin/develop: (131 commits)
Update `protobufjs` and remove obsolete advisory exclusion (#14841)
Include snap version in pill (#14803)
Update PULL_REQUEST_TEMPLATE.md (#14790)
fix: keystone transaction qrcode has no white spacing (#14798)
Snap notifications integration (#14605)
Upgrade @metamask/eth-ledger-bridge-keyring (#14799)
snaps-skunkworks@0.15.0 (#14772)
Fix proptype errors in network dropdown, tx list item details, and account details modal tests (#14747)
Ensure transaction type is correctly updated on edit (#14721)
Add fiat onboarding for AVAX and MATIC through Wyre (#14683)
Bump @metamask/contract-metadata from 1.33.0 to 1.35.0 (#14791)
Slight cleanup of constants/transactions, useTransactionDisplayData, and TransactionIcon (#14784)
Migrate the "estimateGas" API call to "getFees" for STX (#14767)
Ignore advisory GHSA-wm7h-9275-46v2 (#14789)
Adding flag for MV3 (#14762)
Add types to send state (#14740)
Remove site origin on snap install (#14752)
Update design tokens library from 1.5 to 1.6 WIP (#14732)
Enables the "Safe Transaction From" copy for safeTransferFrom transactions (#14769)
remove draft transaction (#14701)
...
* origin/master: (101 commits)
Updating changelog
Add token standard to custom token details (#14506)
Revert "Dark Mode: What's New Announcement (#14346)"
Ensure network name in confirm page container is defined (#14520)
Updating lavamoat policies
Fix the alerts toggles in settings (#14498)
Disable swaps whenever the environment is not development or testing, so that behaviour follows production for QA purposes (#14499)
[skip e2e] Updating changelog for v10.14.0 (#14487)
Version v10.14.0
Docs - segment metrics (#14435)
Add snaps view search (#14419)
Run main, flask and beta in sequence in generate-lavamoat-policies.sh (#14470)
Modify import SRP page (#14425)
Dark Mode: Implement Metrics (#14455)
HoldToRevealButton component (#13785)
e2e test import json file as import account strategy (#14449)
MetaMetrics: Identify 'number_of_tokens' user trait (#14427)
MetaMetrics: Identify 'nft_autodetection_enabled' & 'opensea_api_enabled' (#14367)
Swaps: Sort "token_from" dropdown tokens by their fiat value first and "token_to" by top tokens (#14436)
Update segment instantiation check. Only check if SEGMENT_WRITE_KEY exists (#14407)
...
An externally hosted phishing warning page is now used rather than the
built-in phishing warning page.The phishing page warning URL is set via
configuration file or environment variable. The default URL is either
the expected production URL or `http://localhost:9999/` for e2e testing
environments.
The new external phishing page includes a design change when it is
loaded within an iframe. In that case it now shows a condensed message,
and prompts the user to open the full warning page in a new tab to see
more details or bypass the warning. This is to prevent a clickjacking
attack from safelisting a site without user consent.
The new external phishing page also includes a simple caching service
worker to ensure it continues to work offline (or if our hosting goes
offline), as long as the user has successfully loaded the page at least
once. We also load the page temporarily during the extension startup
process to trigger the service worker installation.
The old phishing page and all related lines have been removed. The
property `web_accessible_resources` has also been removed from the
manifest. The only entry apart from the phishing page was `inpage.js`,
and we don't need that to be web accessible anymore because we inject
the script inline into each page rather than loading the file directly.
New e2e tests have been added to cover more phishing warning page
functionality, including the "safelist" action and the "iframe" case.
* created new test for bip-44 snap test
* added driver.Key.SPACE to allow sending spacebar
* made changes to final result check
* fixed expected pk result to proper value
* fixed to use npm package instead of local
* removed comment
* removed const delay - not needed (lint error)
A new method has been added to the e2e webdriver for pasting text into
a field. This will be required to properly test a change to the SRP
input, which will be coming in a separate PR.
A few existing e2e tests have been updated to use this method to input
the SRP, to show that it works properly.
The snap e2e tests introduced in #13671 were broken due to a conflict
with the changes in #13895. The latter PR changed the version name for
non-main builds so that it always includes the build type.
The Firefox webdriver has been updated to use the new `getVersion`
utility, ensuring that it always looks for the correct build filename.
* Changed registryUrl for snaps only in firefox
Fixed getPlatform to only be imported into metamask-controller in flask
Removed snaps specific testrunner script and use run-all with a cli option
* Fixed flakey tests
* Removed unneeded await
* Added delay
* Fixed linting
* Add e2e testcase for token details functionality
* Remove unnecessary delays on token details testcase
* Add helper function for check if element exists
* Move helper function to driver.js
* Improve name of function
* mock gas price api
* fix error
* full url
* remove duplicated packages
* full url
* customise mock per test
* customise mock per test
* enable mocking
* enable mocking
* enable mocking by default
* duplicated packages
* update mockttp
* pass through
* pass through
ESLint rules have been added to enforce our JSDoc conventions. These
rules were introduced by updating `@metamask/eslint-config` to v9.
Some of the rules have been disabled because the effort to fix all lint
errors was too high. It might be easiest to enable these rules one
directory at a time, or one rule at a time.
Most of the changes in this PR were a result of running
`yarn lint:fix`. There were a handful of manual changes that seemed
obvious and simple to make. Anything beyond that and the rule was left
disabled.
The 4Byte API can sometimes fail during e2e tests with a 502 error.
Ideally we would avoid calling it at all during e2e tests, but in the
meantime we shouldn't treat this as a reason to fail the e2e test.
We have multiple fallbacks for 4Byte, it isn't relied upon by any
tests.
* Ignore sentry server errors in e2e tests
* Update test/e2e/webdriver/driver.js
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
Co-authored-by: Dan J Miller <danjm.com@gmail.com>
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
We're bumping from `^6` to `^8`. All imports are now named, and they have been updated. This is a breaking change, in that support for `eth_signTransaction` is added in `^8.0.0`. We do not support this method in our UI, so our middleware stack has been instrumented to reject.
In addition, there are some non-breaking behavioral changes in this version that reviewers should be aware of, see the [7.0.0 release](https://github.com/MetaMask/eth-json-rpc-middleware/releases).
This PR adds an e2e test to ensure that the background and UI environments are locked down. It reuses the logic from the `protect-intrinsics.test.js`, and runs in both Chrome and Firefox.