craftacademylabs / cypress-metamask Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
If you set environment variables (NETWORK_NAME
, RPC_URL
, and CHAIN_ID
) the code follows the logic to create a custom network (
cypress-metamask/support/metamask.js
Lines 267 to 295 in 2da7a1c
cypress-metamask/support/metamask.js
Lines 203 to 206 in 2da7a1c
If you are wanting localhost (which was my case) I unset the RPC_URL
and CHAIN_ID
and this worked as expected.
The localhost network configuration in Metamask assumes localhost:8545 with chain id 1337. If the provided RPC URL uses 0.0.0.0
, localhost
, or 127.0.0.1
with the port 8545
with the same chain_id the setup of the custom network will fail. If these match it should not attempt to add a custom network and instead update the network to use localhost
instead.
When I call function setupMetamask() in this function call initialSetup() after browser create custom network window can't not switch to main window. Last week it's work but not it's can't work.
Details of the issue: Basically, the functionality of switching between the main cypress window and the metamask window fails way too often. When it happens, I get nice results like this:
So, the question is: Can we have a better way to detect displayed window and switch accordingly?
Thanks in advance for your help!
Thanks for the good work!
As a feature request, is it possible that this library adds a type definition (augmentation) of the custom methods added to cypress to use this library into an e2e cypress setup built with typescript?
Thanks in advance for helping me out with this!
When running the tests using the following command I am getting an error:
"cy:open": "CYPRESS_REMOTE_DEBUGGING_PORT=9222 cypress open"
Error:
'CYPRESS_REMOTE_DEBUGGING_PORT' is not recognized as an internal or external command, operable program or batch file.
I am unsure how to fix this.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.