Synthetixio / synpress

Synpress is e2e testing framework based on Cypress.io and playwright with support for metamask.
https://synpress.io
MIT License
590 stars 188 forks source link

πŸ› fix: Add confirm signature race condition handler #1144

Closed Seroxdesign closed 3 months ago

Seroxdesign commented 3 months ago

Motivation and context

This PR introduces an enhancement to the beforeMessageSignature method in the Page class. The method now efficiently handles two scenarios: when a scroll button is present on the page and when it's not. This is achieved by using Promise.race() to wait for either the scroll button to become visible and clicked, or for the page to finish loading.

The motivation behind this change is to improve the performance and reliability of the method. Previously, the method could potentially be delayed if the scroll button was not present. With this enhancement, the method will proceed as soon as the relevant condition is met, without any manual delays.

Does it fix any issue?

SYN-83

Other useful info

This enhancement should improve the performance of any operations that involve the beforeMessageSignature method.

Quality checklist

βš οΈπŸ‘† Delete any section you see irrelevant before submitting the pull request πŸ‘†βš οΈ

vercel[bot] commented 3 months ago

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
synpress βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Jun 11, 2024 11:20am