synpress
synpress copied to clipboard
Broken Selector for confirmMetamaskSignatureRequest();
Discussed in https://github.com/Synthetixio/synpress/discussions/324
Originally posted by saur-bh February 7, 2022
After investigation found that selector needs to be corrected in
@synthetixio/synpress/pages/metamask/notification-page.js as
{code}
const confirmSignatureRequestButton = ${notificationPage} .signature-request-footer :last-child
;
const rejectSignatureRequestButton = ${notificationPage} .signature-request-footer :first-child
;
{code}
which is
{code}
const confirmSignatureRequestButton = ${notificationPage} .request-signature__footer__sign-button
;
const rejectSignatureRequestButton = ${notificationPage} .request-signature__footer__cancel-button
;
{code}
Thanks for reporting @saur-bh. I think it only applies to metamask 10+, but it's not supported (yet) by synpress (we still use metamask 9). I'm still going to verify this report on old metamask version and take a deeper look in to it. Will post an update until end of this week.
Cheers, Jakub.
I am also having an issue with this method using MM v9.7.1. Not sure if its related but I think it has to do with eth_sign
vs signTypedData_v4
. The former works just fine to sign arbitrary strings but using the later hangs for both confirmMetamaskSignatureRequest
and rejectMetamaskSignatureRequest
Using ethers to interact with MM if that makes any difference
Hi @saur-bh
Where does it stop when running the tests?
In my cases it does not go through the account selection in the Metamask wallet. It is very strange because if i use run the command cypress open it works (it selects the account 1).
When i run "cypress run" I'm using the Synpress as a plugin within cypress because i don't want to have setup Metamask at all the files.
A bit more context, does not pass this step when cypress open does work.
did some debugging.
https://github.com/Synthetixio/synpress/issues/398
not sure if related.
@synthetixio/[email protected]
has been released which includes metamask@10+ update solving this issue. Please reopen if not, thanks!
cc @ghardin1314 @pcardosolei @saur-bh
Seems metamask changed data-testid
for signing.
For 10.28.1 version it's page-container-footer-next
for sign button and page-container-footer-cancel
for reject button.