fix all tests

This commit is contained in:
Moody Salem 2020-06-30 14:02:09 -04:00
parent d1a31fe763
commit 3277d70e93
No known key found for this signature in database
GPG Key ID: 8CB5CD10385138DB
4 changed files with 5 additions and 5 deletions

@ -1,5 +1,5 @@
describe('Pool', () => {
beforeEach(() => cy.visit('/#/pool'))
beforeEach(() => cy.visit('/pool'))
it('can search for a pool', () => {
cy.get('#join-pool-button').click()
cy.get('#token-search-input').type('DAI', { delay: 200 })

@ -1,5 +1,5 @@
describe('Send', () => {
beforeEach(() => cy.visit('/#/send'))
beforeEach(() => cy.visit('/send'))
it('can enter an amount into input', () => {
cy.get('#sending-no-swap-input')

@ -1,5 +1,5 @@
describe('Swap', () => {
beforeEach(() => cy.visit('/#/swap'))
beforeEach(() => cy.visit('/swap'))
it('can enter an amount into input', () => {
cy.get('#swap-currency-input .token-amount-input')
.type('0.001', { delay: 200 })

@ -69,13 +69,13 @@ class CustomizedBridge extends _Eip1193Bridge {
// sets up the injected provider to be a mock ethereum provider with the given mnemonic/index
Cypress.Commands.overwrite('visit', (original, url, options) => {
return original(url, {
return original(url.startsWith('/') && url.length > 2 && !url.startsWith('/#') ? `/#${url}` : url, {
...options,
onBeforeLoad(win) {
options && options.onBeforeLoad && options.onBeforeLoad(win)
const provider = new JsonRpcProvider('https://rinkeby.infura.io/v3/acb7e55995d04c49bfb52b7141599467', 4)
const signer = new Wallet(PRIVATE_KEY_TEST_NEVER_USE, provider)
win.ethereum = new CustomizedBridge(signer, provider)
}
},
})
})