-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* step 1 of improving connect * further improvement of connect * minor ux improvements * fix improve button do not wrap * fix no wallet tests * fix specs * fix Donation/approve * finish improving connect * remove only test * fix specs for connect walletconnect
- Loading branch information
Showing
34 changed files
with
8,339 additions
and
8,500 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import DePayWidgets from '../../../src' | ||
import React from 'react' | ||
import ReactDOM from 'react-dom' | ||
import { mock, resetMocks } from 'depay-web3-mock' | ||
import { wallets } from 'depay-web3-wallets' | ||
|
||
describe('WalletConnect Payment', () => { | ||
|
||
const blockchain = 'ethereum' | ||
const accounts = ['0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'] | ||
beforeEach(resetMocks) | ||
|
||
it('allows to connect wallet via WalletConnect', () => { | ||
cy.visit('cypress/test.html').then((contentWindow) => { | ||
cy.document().then((document)=>{ | ||
let connectedAccount, connectedWallet | ||
DePayWidgets.Connect({ document }).then(({ account, wallet })=>{ | ||
connectedAccount = account | ||
connectedWallet = wallet | ||
}) | ||
cy.get('.ReactShadowDOMOutsideContainer').shadow().contains('.DialogHeader h1', 'Select a wallet').then(()=>{ | ||
mock({ | ||
blockchain, | ||
accounts: { return: accounts }, | ||
wallet: 'walletconnect', | ||
connector: wallets.WalletConnect.connector | ||
}) | ||
|
||
cy.get('.ReactShadowDOMOutsideContainer').shadow().find('.Card[title="Connect WalletConnect"]').click().then(()=>{ | ||
cy.wait(1000).then(()=>{ | ||
expect(connectedAccount).to.equal(accounts[0]) | ||
expect(connectedWallet.name).to.equal('WalletConnect') | ||
}) | ||
}) | ||
}) | ||
}) | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.