-
-
Notifications
You must be signed in to change notification settings - Fork 775
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cypress testing/add connection metamask wallet test (#9429)
* updating dependencies to use custom fork of cypress-metamask * add script and options for running cypress tests * redirect webserver logs to /dev/null * update docker-compose file: use default accounts for ganache * test running connect site with metamask on ci * attempt at passing in env from config * add ganache-cli to dev dependencies * updated script call * moving where NETWORK_NAME is defined * build please * moving network_name again * remove network_name * add superuser creation to script * take two at creating a superuser * third times a charm - create superuser * try loading user data from fixtures * scroll metamask button into view * add cypress settings to gain access to screenshots/videos * no longer need the scrolling command
- Loading branch information
Showing
11 changed files
with
501 additions
and
522 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,3 +57,7 @@ src/ | |
_build/ | ||
**/.vs | ||
**/dist/* | ||
|
||
# cypress artifacts | ||
cypress/videos | ||
cypress/screenshots |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
{} | ||
{ | ||
"chromeWebSecurity": true, | ||
"baseUrl": "http://localhost:8000", | ||
"projectId": "e7rv3w" | ||
} |
24 changes: 24 additions & 0 deletions
24
cypress/integration/connect-wallet/test_connect_with_metamask.js
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,24 @@ | ||
describe('connect wallet: metamask', () => { | ||
before(() => { | ||
cy.setupMetamask(); | ||
cy.changeMetamaskNetwork('localhost'); | ||
}); | ||
|
||
after(() => { | ||
cy.disconnectMetamaskWallet(); | ||
cy.clearWindows(); | ||
}); | ||
|
||
it('pulls address from metamask accounts', () => { | ||
cy.impersonateUser(); | ||
|
||
cy.get('#navbarDropdownWallet').as('wallet').click(); | ||
cy.contains('Connect Wallet').click(); | ||
cy.contains('MetaMask').click(); | ||
|
||
cy.acceptMetamaskAccess(); | ||
|
||
cy.get('@wallet').click(); | ||
cy.get('#wallet-btn').should('contain.text', 'Change Wallet'); | ||
}); | ||
}); |
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.