Comments (7)
@duckception Please, take a look at this when you have time. This is currently blocking me and possibly other people using this method in Playwright + Synpress as a plugin setup. Thanks
from synpress.
Here is the method which is failing:
async confirmPermissionToApproveAll() {
const notificationPage = await playwright.switchToMetamaskNotification();
await playwright.waitAndClick(
notificationPageElements.allowToSpendButton,
notificationPage,
);
await playwright.waitAndClick(
notificationPageElements.approveWarningToSpendButton,
notificationPage,
{ waitForEvent: 'close' },
);
return true;
}
When commenting out the second part it started working successfully:
await playwright.waitAndClick(
notificationPageElements.approveWarningToSpendButton,
notificationPage,
{ waitForEvent: 'close' },
);
Maybe this part of the code should be executed optionally based on some condition in Metamask, or it is extra at all. Please, take a look at this and update as it is a blocking issue. @duckception
from synpress.
Hey! You're using an incorrect function here 😅 For token approvals, you should be using confirmMetamaskPermissionToSpend
. The confirmPermissionToApproveAll
function is meant for NFT all approvals. Sorry for the confusion, I know this is a bit messy. The upcoming version of Synpress will have a simpler and more intuitive API 🫡
Please, let me know if it helps 🙏
from synpress.
Thank you for a quick response @duckception ! But I cannot find a method called "confirmMetamaskPermissionToSpend" though, can you please suggest how to find it? I am using version ^3.7.2-beta.9
from synpress.
Ok, found it, the name of the method now is "confirmPermissionToSpend" FYI @duckception. Thanks! Closing the issue
from synpress.
Closing as not an issue. The correct method to use in this case is "confirmPermissionToSpend".
from synpress.
My bad, I've copied it over from our Cypress tests that have this additional Metamask
word in it.
from synpress.
Related Issues (20)
- Metamask window freeze after 'cy.confirmMetamaskTransaction() intermittently '[🐛 Bug]: <title> HOT 5
- [🐛 Bug]: Can't run synpress 3.7.2-beta.9 in Github Actions (`cy.task('setupMetamask')` timed out after waiting `120000ms`.) HOT 3
- [🐛 Bug]: Alpha version: Wallet cache hashes are different between generation and test HOT 7
- [💡 Feature]: ability to use a custom browser when creating a cache
- [🐛 Bug]: waiting for locator('[data-testid=account-options-menu-button]').first()
- [🐛 Bug]: Cannot run test with npm setup HOT 4
- [🐛 Bug]: Timeout 30000ms. while running cy.confirmMetamaskTransaction() method after latest update
- No response from RPC HOT 2
- confirmSignatureRequest() failing in Playwright + Synpress - Error: page.waitForSelector: Target closed waiting for locator('.notification .request-signature__footer__sign-button') to be visible
- [🐛 Bug]: Wrong uncaught exception handing produces "process is not defined" error HOT 3
- [💡 Feature]: Synpress with fully parallel run with metamask windows HOT 4
- [🐛 Bug]: An error of 'Timeout 30000ms exceeded.' occurred in Docker mode But Correct in non Docker mode HOT 12
- Module parse failed: 'import' and 'export' may appear only with 'sourceType: module' (1:0) HOT 16
- [💡 Feature]: Validate all user inputs with zod
- [🐛 Bug]: Module parse failed: Unexpected token HOT 2
- [💡 Feature]: Save metamask configuration in a fixture so that the entire setup doesn't happen with every run
- [🐛 Bug]: `cy.importMetamaskAccount()` timeout on duplicate account HOT 1
- [💡 Feature]: Autoconnect a newly switched account to the dapp if one was connected previously HOT 1
- can't run with playwright HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from synpress.