Commit 115c6550 authored by Jordan Frankfurt's avatar Jordan Frankfurt Committed by GitHub

feat: mining mode switch to disable auto-mine (#6450)

* feat: mining mode switch to update so we can make assertions about pending transaction state

* update test to use explicit mining

* Update hardhat.config.js
Co-authored-by: default avatarZach Pomerantz <zzmp@uniswap.org>

---------
Co-authored-by: default avatarZach Pomerantz <zzmp@uniswap.org>
parent 3d8d29fd
...@@ -96,6 +96,8 @@ describe('Swap', () => { ...@@ -96,6 +96,8 @@ describe('Swap', () => {
cy.get('#swap-button').click() cy.get('#swap-button').click()
cy.get('#confirm-swap-or-send').click() cy.get('#confirm-swap-or-send').click()
cy.get(getTestSelector('dismiss-tx-confirmation')).click() cy.get(getTestSelector('dismiss-tx-confirmation')).click()
cy.then(() => hardhat.send('hardhat_mine', ['0x1', '0xc'])).then(() => {
// ui check // ui check
cy.get('#swap-currency-output [data-testid="balance-text"]').should( cy.get('#swap-currency-output [data-testid="balance-text"]').should(
'have.text', 'have.text',
...@@ -108,6 +110,7 @@ describe('Swap', () => { ...@@ -108,6 +110,7 @@ describe('Swap', () => {
.should('eq', initialBalance + BALANCE_INCREMENT) .should('eq', initialBalance + BALANCE_INCREMENT)
}) })
}) })
})
it('should have the correct default input/output and token selection should work', () => { it('should have the correct default input/output and token selection should work', () => {
cy.visit('/swap') cy.visit('/swap')
......
...@@ -21,6 +21,11 @@ module.exports = { ...@@ -21,6 +21,11 @@ module.exports = {
accounts: { accounts: {
count: 1, count: 1,
}, },
// Disable auto-mining so that e2e tests can explicitly test pending states.
mining: {
auto: false,
interval: 0,
},
}, },
}, },
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment