[🐛 Bug]: cy.importMetamaskAccount()
timeout on duplicate account
#898
Labels
cy.importMetamaskAccount()
timeout on duplicate account
#898
🔎 Have you searched existing issues to avoid duplicates?
🧪 Have you tested your code using latest version of Synpress?
💡 Are you able to provide enough information to be able to reproduce your issue locally?
Synpress version
3.7.2-beta.7
Node.js version
18.18.0
Operating system
Ubuntu 20.04
Run mode
Cypress + Synpress (as plugin)
CI platform (if applicable)
No response
Are you running your tests inside docker? (if applicable)
What happened?
When I run my test suite for the first time, the
cy.importMetamaskAccount()
command works fine.When I re-run the test, the
cy.importMetamaskAccount()
command hangs and cause cypress timeout:If I check the metamask extension window, it stucks on the duplicate account error:
It's caused by the fact that the metamask extension has a shared state between the test runs. Even cypress/browser restart does not change it, only manually removing the extension from the chrome browser.
What is your expected behavior?
The command should check if the error is displayed, then click cancel and return
false
from the command.This way we can detect that the account was already imported and we can do
cy.switchMetamaskAccount()
to activate the account on which behalf we want to operate in our dApp.How to reproduce the bug.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: