-
-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
98 additions
and
11 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
examples/ethereum-wallet-mock/test/cypress/connectToDapp.cy.ts
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,7 @@ | ||
it('should mock MetaMask in the Test Dapp', () => { | ||
cy.connectToDapp() | ||
|
||
cy.get('#getAccounts').click() | ||
|
||
cy.get('#getAccountsResult').should('have.text', '0xd73b04b0e696b0945283defa3eee453814758f1a') | ||
}) |
8 changes: 0 additions & 8 deletions
8
...um-wallet-mock/test/cypress/00_mock.cy.ts → ...let-mock/test/cypress/switchAccount.cy.ts
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,22 @@ | ||
it('should add a new account with a specified name', () => { | ||
const accountName = 'Test Account 2' | ||
|
||
// Add a new account with the specified name | ||
cy.addNewAccount(accountName).then(() => { | ||
// Verify that the current account name matches the newly added account | ||
cy.getAccount().should('eq', accountName) | ||
}) | ||
}) | ||
|
||
it('should rename currently newly added account with specified name', () => { | ||
const newAccountName = 'Rename Account Name' | ||
|
||
// Add a new account with the initial name | ||
cy.addNewAccount(newAccountName).then(() => { | ||
// Rename the newly added account | ||
cy.renameAccount(newAccountName, 'Renaming test').then(() => { | ||
// Verify that the account name has been updated to the new name | ||
cy.getAccount().should('eq', 'Renaming test') | ||
}) | ||
}) | ||
}) |
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