-
-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'new-dawn' into feat/import-wallet-using-cypress
- Loading branch information
Showing
11 changed files
with
87 additions
and
27 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
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
32 changes: 32 additions & 0 deletions
32
wallets/metamask/test/cypress/confirmTransactionAndWaitForMining.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,32 @@ | ||
it('should confirm contract deployment and wait for mining', () => { | ||
cy.get('#tokenAddresses').should('be.empty') | ||
cy.get('#createToken').click() | ||
|
||
cy.confirmTransactionAndWaitForMining().then(() => { | ||
cy.get('#tokenAddresses').should('include', /^0x/) | ||
}) | ||
}) | ||
|
||
it('should confirm legacy transaction and wait for mining', () => { | ||
cy.get('#sendButton').click() | ||
|
||
cy.confirmTransactionAndWaitForMining() | ||
}) | ||
|
||
it('should confirm EIP-1559 transaction and wait for mining', () => { | ||
cy.get('#sendEIP1559Button').click() | ||
|
||
cy.confirmTransactionAndWaitForMining().then(() => { | ||
cy.get('#tokenAddresses').should('include', /^0x/) | ||
}) | ||
}) | ||
|
||
it('should work correctly when calling sequentially', () => { | ||
cy.get('#sendEIP1559Button').click() | ||
cy.confirmTransactionAndWaitForMining().then(() => { | ||
cy.get('#sendEIP1559Button').click() | ||
cy.confirmTransactionAndWaitForMining().then(() => { | ||
cy.get('#tokenAddresses').should('include', /^0x/) | ||
}) | ||
}) | ||
}) |
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,5 @@ | ||
it('should lock & unlock the wallet without any error', () => { | ||
cy.lock().then(() => { | ||
cy.unlock() | ||
}) | ||
}) |
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,18 +1,9 @@ | ||
it('should reject new network request', () => { | ||
cy.createAnvilNode({ | ||
chainId: 1338, | ||
port: 8546 | ||
}).then(() => { | ||
cy.get('#addEthereumChain').click() | ||
cy.get('#addEthereumChain').click() | ||
|
||
cy.rejectNewNetwork().then(() => { | ||
cy.get('#chainId').should('have.text', '0x1') | ||
cy.rejectNewNetwork().then(() => { | ||
cy.get('#chainId').should('have.text', '0x7a69') | ||
|
||
cy.emptyAnvilNode() | ||
}) | ||
cy.emptyAnvilNode() | ||
}) | ||
}) | ||
|
||
after(() => { | ||
cy.switchNetwork('Ethereum Mainnet') | ||
}) |