You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a dapp developer that has to integrate several different wallets and advise users how to interact with them, I would like to have one testing solution that let's me test my integration with different wallets to ensure wallet functionality and UX (User Experience) is aligned with what I deliver to users.
Describe the solution you'd like
To introduce some kind of adapter pattern to dAppwright. This would specify an interface of common interactions (ie. switch networks, add account, approve transaction, etc) that a wallet adapter would use to define functionality.
As a developer, I would be able to keep the testing code in my test suite but use a before hook to set the desired wallet to verify a flow.
flowchart TD
subgraph Playwright Tests
suite[Test Suite] --> before["before#40;#41; - dAppwright.Launch#40;wallet#41;"] --> test["test() - dAppwright.SignMessage#40;#41;"]
end
subgraph dAppwright
test --> router[router]
router -- or --> coinbase["Coinbase Wallet Adapter"]
router -- or --> metamask[Metamask Adapter]
coinbase --> coinbaseAction["perform SignMessage"]
metamask --> metamaskAaction["perform SignMessage"]
end
Loading
Describe alternatives you've considered
There are many libraries attempting to bridge the gap of integrating with wallets but not from a testing perspective. I personally haven't been able to find an alternative in the market beyond waiting for another library like Synpress to adopt a pattern like this as well, but that solution is on a different platform.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem?
As a dapp developer that has to integrate several different wallets and advise users how to interact with them, I would like to have one testing solution that let's me test my integration with different wallets to ensure wallet functionality and UX (User Experience) is aligned with what I deliver to users.
Describe the solution you'd like
To introduce some kind of adapter pattern to dAppwright. This would specify an interface of common interactions (ie. switch networks, add account, approve transaction, etc) that a wallet adapter would use to define functionality.
As a developer, I would be able to keep the testing code in my test suite but use a
before
hook to set the desired wallet to verify a flow.Describe alternatives you've considered
There are many libraries attempting to bridge the gap of integrating with wallets but not from a testing perspective. I personally haven't been able to find an alternative in the market beyond waiting for another library like Synpress to adopt a pattern like this as well, but that solution is on a different platform.
Beta Was this translation helpful? Give feedback.
All reactions